One Spotify track by URL or ID: lifetime play count, popularity, duration, artists and album details.
2 credits/ call
Never more than 12 credits a call.
You only pay when data comes back.
curl -X POST "https://api.primaryapi.com/v1/run/spotify.track" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b"}'{
"output": {
"found": true,
"data": {
"name": "<string | null>",
"trackNumber": "<integer | null>",
"playcount": "<integer | null>",
"explicit": "<boolean | null>", …
}
},
"credits": 2
}Input and output
2 fields
https://open.spotify.com/track/0VjIjW4G….18 fields
Good to know
Spotify shows a play count of 0 until a track passes 1,000 streams.
Terms of use. Play counts come from public web-player data. Cover art and metadata are copyrighted: links are passed through, nothing is re-hosted.
More from Spotify. Same key, same credits.
The same key and credits work for every API.