Both read Spotify data. They make almost opposite trade-offs, and picking the wrong one wastes an afternoon. Here’s the honest split — from someone who maintains one of them and respects the other.
What the official Web API is for
The official Spotify Web API is the right tool when you need the private side of Spotify: a signed-in user’s library and playlists, playback control, personalized recommendations, the ability to actually change someone’s account.
The price of admission is real, though. You register an app, keep a client ID and secret, run the OAuth flow, and then you live inside per-app rate limits — the 429s I wrote about in handling Spotify rate limits. For user-scoped work, that ceremony is worth it. For reading public metadata, it’s a tollbooth on a road you didn’t need to be on.
What spotify_scraper is for
SpotifyScraper reads the public side — the data the web player already shows any browser — with no account, no client ID, no OAuth:
from spotify_scraper import SpotifyClient
with SpotifyClient() as client:
track = client.get_track("https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b")
print(track.name, "—", track.artists[0].name)
print(track.preview_url)
Tracks, albums, artists, playlists, shows, cover art, and 30-second previews — typed objects, sync or async, no rate-limit dance because you were never inside the API’s rate-limited surface. Lyrics are available too, if you pass your own sp_dc cookie. Under the hood it’s httpx and typed, frozen models, built to survive Spotify’s quiet markup changes.
How to choose
It comes down to one question — whose data is it?
- Private or user-scoped — someone’s library, their playback, their recommendations, modifying a playlist → only the official API can do it. Use it, and handle the
429s properly. - Public — metadata, cover art, previews, search, building a dataset → spotify_scraper removes the account, the keys, and the rate limit instead of managing them.
Plenty of projects use both: the official API for the account-bound parts, the scraper for bulk public reads that would otherwise burn through the rate limit for no reason.
One honest line either way
Neither gives you full song audio — that’s DRM-protected, full stop. And spotify_scraper is explicitly an unofficial reader of public data: not affiliated with or endorsed by Spotify, meant for the metadata, previews, and art the web player would show you anyway.
If the public path is yours: try it in the browser, then pip install spotifyscraper or read the source on GitHub.