Lifetime stream counts for a Spotify track, every track of an album, or an artist's top tracks, from one URL.
1.13 credits/ result
At least 2 credits a call.
You only pay when data comes back.
curl -X POST "https://api.primaryapi.com/v1/run/spotify.play_count" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b"}'{
"output": {
"found": true,
"data": {
"totalPlayCount": "<integer | null>",
"entityType": "<track | album | artist>",
"nextCursor": "<string | null>",
"items": [
{
"name": "<string | null>",
"playCount": "<integer | null>",
"trackNumber": "<integer | null>",
"type": "<\"track\">", …
}
]
}
},
"credits": 2
}Input and output
2 fields
https://open.spotify.com/track/0VjIjW4G….4 fields
limitGood to know
Unknown URL? It comes back as not found, not as an error.
Terms of use. Spotify terms bar scraping; play counts come from public web-player data, not the official Web API. Cover art is 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.