Spotify Web API logo

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.

Visit site ↗Health checked 9h ago
Use it when

Public search and metadata work with Client Credentials — no user OAuth needed

Watch for

Playback control APIs work only for Premium users

First check

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.

Auth
oauth
CORS
No
HTTPS
Yes
Signup
Required
Latency
1006 ms
Protocol
REST
Pricing
freemium

Uptime · 30-day window

Probes: 1Uptime: 100%Avg latency: 1006ms
01

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.

02

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
03

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
04

Example request

Generic template — replace <endpoint> with the real path from the docs.
curl https://spotify.com/<endpoint> \
  -H "Authorization: Bearer $ACCESS_TOKEN"
05

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.

06

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.

07

Technical details

CORS: NoHTTPS: YesSignup: YesOpen source: No
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
08

Endpoints

Parsed from the OpenAPI spec. Showing 12 of 88 non-deprecated endpoints.

GET
/albumsAlbums

Get Several Albums

GET
/albums/{id}Albums

Get Album

GET
/albums/{id}/tracksAlbumsTracks

Get Album Tracks

GET
/artistsArtists

Get Several Artists

ids:query*
GET
/artists/{id}Artists

Get Artist

GET
/artists/{id}/albumsArtistsAlbums

Get Artist's Albums

GET
/artists/{id}/related-artistsArtists

Get Artist's Related Artists

GET
/artists/{id}/top-tracksArtistsTracks

Get Artist's Top Tracks

GET
/audio-analysis/{id}Tracks

Get Track's Audio Analysis

id:path*
GET
/audio-featuresTracks

Get Tracks' Audio Features

ids:query*
GET
/audio-features/{id}Tracks

Get Track's Audio Features

id:path*
GET
/audiobooksAudiobooks

Get Several Audiobooks

76 more endpoints not shown. See the OpenAPI spec for the full list.

09

Tags