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

Pricing

One price, in dollars

Providers
Octopus- served- uptime- p50$3.30/1k reqflat

Try it

Make your first request

Open in
Get a free key
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 30d
POST /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"}'
FieldTypeExample value
Request body
urlstring"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
dataobject
data.itemsobject[]Play-count records for the requested Spotify entity (one per track). Populated whenever the provider has data for the entity.
data.items[].albumNamestringName of the album the track belongs to. Empty when the upstream omits it.
data.items[].artistNamestringName of the primary artist. Empty when the upstream omits it.
data.items[].durationMsintegerTrack duration in milliseconds.
data.items[].idstringThe Spotify entity ID. Populated whenever the provider has data for the entity.
data.items[].namestringThe track (or entity) name. Populated whenever the provider has data for the entity.
data.items[].playCountintegerTotal number of streams/plays for the track. Populated whenever the provider has data for the entity.
data.items[].typestringThe Spotify entity type (e.g. "track").
data.items[].urlstringCanonical open.spotify.com URL for the entity, with tracking query params stripped. Populated whenever the provider has data for the entity.
foundbooleanWhether the track/album/artist was found and returned play-count records.
Price
Price per requestUSD$0.0033
Price /1k reqUSD$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.