Spotify API
Spotify Play count API
Fetch stream counts and stats for a Spotify track, album, or artist URL.
POST/v1/run/spotify.play_count
Requests
-
30d
Try it
Make your first request
Sample response
Free runs return only the first 3 results. Fund a key to get the full response.
{
"data": {
"items": [
{
"albumName": "Example title",
"artistName": "Example title",
"durationMs": 13,
"id": "a1b2c3d4",
"name": "Example title",
"playCount": 12500,
"type": "general",
"url": "https://example.com/page"
}
]
},
"found": true
}Response interface
interface SpotifyPlayCountResponse {
data: {
items: {
albumName?: string;
artistName?: string;
durationMs?: number;
id: string;
name: string;
playCount: number;
type?: string;
url: string;
}[];
} | null;
found: boolean;
}Full parameter and response reference - every field, type, and example for this endpoint.
Reference
Request, response, and price
Last verified 2026-09-16 · uptime and latency measured over 30dPOST /v1/run/spotify.play_count
curl -X POST https://api.getanyapi.com/v1/run/spotify.play_count \
-H "Authorization: Bearer $ANYAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT"}'| Field | Type | Example value |
|---|---|---|
| Request body | ||
| url | string | "https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT"Spotify track, album, or artist URL to fetch stream counts for (e.g. https://open.spotify.com/track/3n3Ppam7vgaVa1iaRUc9Lp). |
| Response | ||
| data | object | |
| data.items | object[] | Play-count records for the requested Spotify entity (one per track). Populated whenever the provider has data for the entity. |
| data.items[].albumName | string | Name of the album the track belongs to. Empty when the upstream omits it. |
| data.items[].artistName | string | Name of the primary artist. Empty when the upstream omits it. |
| data.items[].durationMs | integer | Track duration in milliseconds. |
| data.items[].id | string | The Spotify entity ID. Populated whenever the provider has data for the entity. |
| data.items[].name | string | The track (or entity) name. Populated whenever the provider has data for the entity. |
| data.items[].playCount | integer | Total number of streams/plays for the track. Populated whenever the provider has data for the entity. |
| data.items[].type | string | The Spotify entity type (e.g. "track"). |
| data.items[].url | string | Canonical open.spotify.com URL for the entity, with tracking query params stripped. Populated whenever the provider has data for the entity. |
| found | boolean | Whether the track/album/artist was found and returned play-count records. |
| Price | ||
| Price per request | USD | $0.0033 |
| Price /1k req | USD | $3.30 |
FAQ
About the Spotify Play count API
The AnyAPI Spotify Play count API returns Spotify play count data as normalized JSON from one POST call to /v1/run/spotify.play_count. Fetch stream counts and stats for a Spotify track, album, or artist URL. AnyAPI returns one normalized schema whichever source serves it. It costs from $3.30 per 1,000 requests, in US dollars with no subscription and no monthly minimum.
It costs from $3.30 per 1,000 requests, in US dollars with no subscription and no monthly minimum. You fund one USD wallet, each call draws it down, and a failed request costs $0.
Fetch stream counts and stats for a Spotify track, album, or artist URL. The response is normalized JSON with the same envelope every AnyAPI endpoint returns, so parsing a second endpoint is a change of URL and nothing else.