Introducing the Instagram APIRead more →

Spotify Track API. Send a track link or ID.

Song with exact plays, ISRC and songwriter credits. We handle the proxies, blocks and platform changes.

Spotify Track API at a glance

Returns a public Spotify track from its link, share link, URI or ID, with its exact play count, ISRC, label and songwriter and producer credits. It also has the artists, album, release date, length, cover, performance languages, popularity score, explicit flag and a preview clip. A podcast episode's link returns that episode.

GET /v1/spotify/track

Read the API reference
  • 1 credit per request, $0.75–$1.97 per 1,000 requests
  • 22 typed fields null when unknown
  • url is all it needs, e.g. https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC
  • 100 credits free when you sign up, no card, so you can build before you spend

Send one request. Get 22 fields 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
url = https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC
GET /v1/spotify/trackTry in
const params = new URLSearchParams({
  url: "https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC",
});
const res = await fetch(`https://socialtap.dev/v1/spotify/track?${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, meta } = body;
console.log(data, meta.credits_charged);
200 OK · GET https://socialtap.dev/v1/spotify/trackLong 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

    The track or podcast episode: its link (open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC or open.spotify.com/episode/0ndqMvnUJkNmQrhK98R09Y, also under /intl-de/ and /embed/, with any share parameters, or an album's link with ?highlight=spotify:track:…), a share link (spotify.link/…), its URI (spotify:track:4uLU6hMCjMI75M1A2tKUQC, spotify:episode:0ndqMvnUJkNmQrhK98R09Y) or its 22-character ID.

  • 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 API.

  • Track a song's plays over time

  • Match tracks across services by ISRC

  • See who wrote and produced a song

  • Enrich a music catalog from shared links

  • Read an episode's details from its link

Good to know before you build.

  • Spotify's plays are metrics.view_count, the first credited artist is author and the others are coauthors. type is audio, or video for a music video.
  • metrics.view_count is null, not 0, for a track below the threshold where Spotify starts showing plays.
  • published_at is the release date with no time, listed in approximate_fields, and platform_specific.spotify.release_date_precision says when it is only a month or a year.
  • media[].url is Spotify's preview, a short clip, and null when the track has none.
  • platform_specific.spotify.is_playable is for the country we request from, which may not be yours.
  • A track Spotify withholds in that country, with no title, artist or length, returns private_or_unavailable. One that only doesn't play there returns with is_playable false.
  • When Spotify's main API fails, the answer comes from the embed page without the play count, album, ISRC or credits: those are null or listed in unknown_fields.
  • A podcast episode is a post of platform_type episode with its release time, description, length, preview and is_paywalled, and no plays, album, ISRC or credits, which Spotify shows for no episode.
  • An episode's author is its show, by name and cover only, and platform_specific.spotify.podcast_id is the show's ID. From the embed page its description and paywall flag are null and a video episode reads as audio.
  • A bare ID is tried as a track, then as an episode. An audiobook chapter's link has the same form and returns not_found.

1 credit per request. Failed requests are free.

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

SourcePrice per successful requestPer 1,000 requests
Platform API api1 credit$0.75–$1.97
Public page page1 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 API.

More in the API reference.

Can I download the full song?
No. media[].url is Spotify's preview, a short clip. The full audio isn't returned.
How much does the Spotify Track API cost?
A request costs 1 credit. SocialTap credits cost $0.75–$1.97 per 1,000, depending on the plan or pack.

Try it on a link you already have.

Paste 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