Introducing the Instagram APIRead more →

Spotify Track Search API. Tracks matching your search.

Tracks by keyword, artist or ISRC. We handle the proxies, blocks and platform changes.

Spotify Track Search API at a glance

Searches Spotify tracks by keyword, artist or ISRC, in any language, and returns them a page at a time in Spotify's order. Each has its title, credited artists with their IDs, album, exact length, cover, explicit flag, music video count and a preview clip. Set kind=episode to search podcast episodes instead. The Spotify Track API adds plays, release date, ISRC, label and credits.

GET /v1/spotify/search_tracks

Read the API reference
  • 1 credit per page, $0.75–$1.97 per 1,000 pages
  • 22 typed fields null when unknown
  • 100 tracks per page, Spotify's own ranking for the query
  • query is all it needs, e.g. rick astley

Send one request. Get up to 100 tracks back.

Copy the request in your language, or hand it to your agent. Sign up for an API key and your first 100 credits are free.

$ npm install socialtap
query = rick astley
GET /v1/spotify/search_tracksTry in
const params = new URLSearchParams({
  kind: "track",
  query: "rick astley",
});
const res = await fetch(`https://socialtap.dev/v1/spotify/search_tracks?${params}`, {
  headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, page, meta } = body;
console.log(data, meta.credits_charged);
200 OK · GET https://socialtap.dev/v1/spotify/search_tracksLong arrays and strings are shortened here. Real responses are complete.Docs

One schema on 21 platforms.

The response reference lists every field, its type and when it is null. See the full schema.

  • Null means unknown

    A field Spotify doesn't show is null, never zero or an empty string, so a real zero always means zero.

  • What it accepts

    What to search for, as in Spotify's search box: a title, an artist or both, in any language.

  • Write one parser

    Spotify, TikTok, Instagram and 18 more platforms answer in these fields, so the code that reads one reads them all.

platformstring
Platform ID (tiktok, youtube, …).
idstring
Platform-native post ID (string; Instagram shortcode, Reddit with its t3_ prefix).
urlstring
Canonical post URL.
typestring
Normalized content shape. New values may be added; treat unknown values as other.
platform_typestring
The platform's own product label, lowercase (reel, short, story, live, tweet, …).
titlestring
Headline (YouTube title, Reddit title); null on caption-only platforms.
textstring
Caption, description or body as plain text.
languagestring
BCP-47 language of text, when the platform states it.

What teams build with the Spotify Track Search API.

  • Turn title and artist into a track ID

  • Find a recording's tracks by ISRC

  • Build a music search box with previews

  • Find podcast episodes that mention a guest

Good to know before you build.

  • Results are one kind: tracks, or podcast episodes with kind=episode. For artists, albums, playlists and podcasts, send the same query to their search endpoints.
  • An episode is a post of platform_type episode, as the Spotify Podcast Episodes API lists it, with its description, exact release time, length and preview. author is its show, by name and cover only, and platform_specific.spotify.podcast_id the show's ID.
  • Search lists no play count, release date, ISRC, label or credits, so those are null or empty: the Spotify Track API returns them.
  • Results are in Spotify's order, which depends on the page size, so a smaller limit isn't always the top of a larger one. A walk ends with page.end_reason platform_limit where Spotify stops serving, however many tracks it matched.
  • Spotify repeats about a third of each page on the next. Repeats are dropped, so a page usually holds fewer tracks than its limit while next_cursor goes on.
  • Spotify answers a weak query with its nearest guesses, so an empty page is rare and any result may be a loose match.
  • is_playable says whether Spotify plays the track in the country we request from, which may not be yours.
  • When Spotify's search doesn't answer, the first pages come from a web search engine's index, each track read from Spotify, with a partial_data warning, Spotify's filters are read as plain words, and a music video reads as audio. That list holds only what the index has, often a small part of Spotify's, in the engine's order. A next_cursor stays on the list it came from: if Spotify's search stops answering mid-walk, the next page fails with a retryable error instead of switching lists.
  • An empty query, a Spotify URI or a link to a Spotify page returns invalid_input, naming the endpoint that takes it where there is one. For a link to Spotify's search page, send its words instead.

1 credit per page. Failed requests are free.

Buy credits once and spend them on any endpoint, on any platform.

SourcePrice per successful pagePer 1,000 pages
Any source1 credit$0.75–$1.97
  • Cache hits are free.
  • Credits from packs and top-ups never expire.
  • A monthly plan's credits are spent first, and what is left of them ends at each renewal.
  • Prices exclude tax: sales tax is added at checkout where it applies.
  • Outside the US, plans and packs are sold to businesses: checkout asks for your VAT, GST or other business tax ID.

Questions about the Spotify Track Search API.

More in the API reference.

Can I search by ISRC?
Yes. Send isrc:GBARL9300135 as the query and you get the Spotify tracks of that recording.
How much does the Spotify Track Search API cost?
A page of up to 100 tracks costs 1 credit. Every successful page is charged, empty pages included. SocialTap credits cost $0.75–$1.97 per 1,000, depending on the plan or pack.
How do I get the next page?
Repeat the same request with cursor set to page.next_cursor from the previous response, keeping the other parameters. When page.has_more is false there are no more pages. Cursors expire after 24 hours.

Try it with your own search.

Type it in the playground, or copy the request into your code.

100free credits
  • No credit card
  • Failed requests are free
  • Works on all 218 endpoints
Start for free Read the docs