spotify

Spotify Web API — search music, control playback, manage playlists and library

v1.0.1Base: https://api.spotify.com/v1Auth: oauth2
Chat with this API

Use this API

Web

Chat in the browser →

CLI (one command)

agentbridge chat spotify

SDK / Agents

fetch("/api/spotify/manifest")

MCP (Claude Desktop / Cursor / Windsurf)

{
  "mcpServers": {
    "spotify": {
      "command": "npx",
      "args": ["@agentbridgeai/mcp", "--api", "spotify"]
    }
  }
}

Add to ~/.claude/claude_desktop_config.json or Cursor/Windsurf MCP settings.

Actions (25)

GET/me

get_current_user

Get the current user's Spotify profile

GET/search

search

Search for tracks, artists, albums, or playlists on Spotify

Parameters

qstringrequiredSearch query
typestringrequiredComma-separated list: track, artist, album, playlist
limitintegerMax results (1-50)
offsetintegerResult offset for pagination
GET/me/top/tracks

get_top_tracks

Get the current user's top tracks

Parameters

time_rangestringOver what time frame: short_term (4 weeks), medium_term (6 months), long_term (all time)
limitintegerMax results (1-50)
GET/me/top/artists

get_top_artists

Get the current user's top artists

Parameters

time_rangestringOver what time frame: short_term, medium_term, long_term
limitintegerMax results (1-50)
GET/me/playlists

get_my_playlists

Get a list of the current user's playlists

Parameters

limitintegerMax results (1-50)
offsetintegerResult offset
POST/me/playlists

create_playlist

Create a playlist for the current Spotify user

Parameters

namestringrequiredPlaylist name
descriptionstringPlaylist description
publicbooleanWhether the playlist is public
GET/playlists/{playlist_id}

get_playlist

Get a Spotify playlist by ID

Parameters

playlist_idstringrequiredThe Spotify playlist ID
GET/playlists/{playlist_id}/items

get_playlist_tracks

Get tracks in a Spotify playlist

Parameters

playlist_idstringrequiredThe Spotify playlist ID
limitintegerMax results (1-100)
offsetintegerResult offset
POST/playlists/{playlist_id}/items

add_tracks_to_playlist

Add one or more tracks to a playlist

Parameters

playlist_idstringrequiredThe Spotify playlist ID
urisarrayrequiredArray of Spotify track URIs (e.g. spotify:track:4iV5W9uYEdYUVa79Axb7Rh)
positionintegerPosition to insert tracks (0-based)
DELETE/playlists/{playlist_id}/items

remove_tracks_from_playlist

Remove one or more tracks from a playlist

Parameters

playlist_idstringrequiredThe Spotify playlist ID
itemsarrayrequiredArray of objects with uri field (e.g. [{uri: "spotify:track:..."}])
GET/me/player

get_playback_state

Get the current user's playback state (device, track, progress, etc.)

PUT/me/player/play

start_playback

Start or resume playback on a device

Parameters

device_idstringDevice ID to play on
context_uristringSpotify URI of context to play (album, artist, playlist)
urisarrayArray of Spotify track URIs to play
offsetobjectWhere in context to start (e.g. {position: 0})
PUT/me/player/pause

pause_playback

Pause playback on a device

Parameters

device_idstringDevice ID to pause on
POST/me/player/next

skip_next

Skip to the next track

Parameters

device_idstringDevice ID
POST/me/player/previous

skip_previous

Skip to the previous track

Parameters

device_idstringDevice ID
GET/me/player/currently-playing

get_currently_playing

Get the track currently playing on the user's Spotify

GET/me/player/recently-played

get_recently_played

Get the current user's recently played tracks

Parameters

limitintegerMax results (1-50)
GET/me/tracks

get_saved_tracks

Get the current user's saved (liked) tracks

Parameters

limitintegerMax results (1-50)
offsetintegerResult offset
PUT/me/library

save_tracks

Save (like) one or more tracks to the user's library

Parameters

urisstringrequiredComma-separated list of Spotify track URIs
DELETE/me/library

remove_saved_tracks

Remove one or more tracks from the user's saved library

Parameters

urisstringrequiredComma-separated list of Spotify track URIs
GET/albums/{id}

get_album

Get a Spotify album by ID

Parameters

idstringrequiredThe Spotify album ID
GET/tracks/{id}

get_track

Get a Spotify track by ID

Parameters

idstringrequiredThe Spotify track ID
GET/artists/{id}

get_artist

Get a Spotify artist by ID

Parameters

idstringrequiredThe Spotify artist ID
GET/artists/{id}/top-tracks

get_artist_top_tracks

Get an artist's top tracks

Parameters

idstringrequiredThe Spotify artist ID
marketstringISO 3166-1 alpha-2 country code (e.g. US)
GET/recommendations

get_recommendations

Get track recommendations based on seed artists, tracks, or genres

Parameters

seed_artistsstringComma-separated artist IDs (up to 5 total seeds)
seed_tracksstringComma-separated track IDs (up to 5 total seeds)
seed_genresstringComma-separated genres (up to 5 total seeds)
limitintegerMax results (1-100)