
Spotify Web API
Spotify Web API
Spotify Web API lets apps search tracks, manage playlists, and control playback — the base layer for music integrations and recommendations.
Public search and metadata work with Client Credentials — no user OAuth needed
Playback control APIs work only for Premium users
Register an app at developer.spotify.com to get a Client ID and Secret. Use Client Credentials Flow for public data; Authorization Code Flow for user-scoped operations. Send Authorization: Bearer <token> on every request.
Uptime · 30-day window
About this API
Spotify Web API exposes Spotify's catalog, user playback state, and audio analysis via REST. One particularly valuable surface is the audio features endpoint: every track has tempo, energy, valence, danceability, acousticness, and more as 0–1 scores — ready-made features for music recommendation systems.
There are two OAuth flows. Client Credentials Flow handles public-data calls (search, metadata) and is the simpler setup. Authorization Code Flow runs user consent and unlocks playlists, recently played, and playback control. The Web Playback SDK can stream Spotify audio inside a browser, but the user must be Premium and must accept Spotify's terms.
Rate limiting uses a sliding window; exceeding it returns 429 plus a Retry-After header. Batch operations (e.g. bulk track sync) need backoff logic. A few categories of data — lyrics, detailed listener demographics — are not exposed publicly; lyrics typically come from licensed partners like Musixmatch.
What you can build
- 1Add "Now playing" sharing to your app
- 2Build personalized recommendations from a user's listening history
- 3Manage and sync user playlists
- 4Pull album, artist, and playlist metadata
- 5Integrate Spotify podcasts into a podcast app
Strengths & limitations
Strengths
- Public search and metadata work with Client Credentials — no user OAuth needed
- Audio features (tempo, energy, valence) make it great for recommendation
- Official Web Playback SDK can stream in-browser (Premium users only)
Limitations
- Playback control APIs work only for Premium users
- Sliding-window rate limit; throttling returns 429
- Some metadata (e.g. lyrics) is delivered via licensed partners and not exposed in the Web API
Example request
curl https://spotify.com/<endpoint> \
-H "Authorization: Bearer $ACCESS_TOKEN"Getting started
Register an app at developer.spotify.com to get a Client ID and Secret. Use Client Credentials Flow for public data; Authorization Code Flow for user-scoped operations. Send Authorization: Bearer <token> on every request.
FAQ
Is the API free to call?+
Yes, though playback control endpoints require the user to be on Spotify Premium.
Client Credentials vs Authorization Code?+
Client Credentials is for public data only and is simpler. Authorization Code unlocks user-scoped data like history and playlists.
Can I stream audio in a browser?+
Yes, via the Web Playback SDK, but the listener must be on Premium and accept the terms.
Are lyrics available?+
Not via the Web API — lyrics are served through licensed third parties such as Musixmatch.
Technical details
- Auth type
- oauth
- Pricing
- freemium
- Protocols
- REST
- SDKs
- javascript, python, java, ruby
- Response time
- 1006 ms
- Last health check
- 5/12/2026, 7:38:28 AM
Endpoints
Parsed from the OpenAPI spec. Showing 12 of 88 non-deprecated endpoints.
/albumsAlbumsGet Several Albums
/albums/{id}AlbumsGet Album
/albums/{id}/tracksAlbumsTracksGet Album Tracks
/artistsArtistsGet Several Artists
/artists/{id}ArtistsGet Artist
/artists/{id}/albumsArtistsAlbumsGet Artist's Albums
/artists/{id}/related-artistsArtistsGet Artist's Related Artists
/artists/{id}/top-tracksArtistsTracksGet Artist's Top Tracks
/audio-analysis/{id}TracksGet Track's Audio Analysis
/audio-featuresTracksGet Tracks' Audio Features
/audio-features/{id}TracksGet Track's Audio Features
/audiobooksAudiobooksGet Several Audiobooks
76 more endpoints not shown. See the OpenAPI spec for the full list.