Search for tracks using the Spotify Web API

domain: developer.spotify.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Obtain a valid access token using the Client Credentials flow (suitable for server-side, non-user-specific searches) by POSTing to the token endpoint with your client credentials.
  2. Send a GET request to the search endpoint with q (your search query), type=track, and optional parameters such as market, limit, and offset.
  3. Include the access token in the Authorization header as a Bearer token.
  4. Parse the tracks.items array in the response; each item contains the track name, artists array, album, and id.
  5. Use the href or next fields in the response to paginate through additional results if needed.

Known gotchas

Related routes

Create and populate a Spotify playlist via the Web API
developer.spotify.com · 6 steps · unrated
Determine current Spotify Web API access to the audio-features and audio-analysis endpoints before building a feature that depends on track audio attributes
developer.spotify.com · 5 steps · unrated
Read a user's current Spotify playback state via the Web API Player endpoints
developer.spotify.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans