History · GET

Track play-count history

GET /history/track

With a key: 1,000 requests / month free on RapidAPI, 5 requests a second on every plan; from $9 for 20K requests direct, valid 120 days. Per-request cost at 5 volumes.

About

A track's daily lifetime play count and `streams`, the plays it gained since the day before (null when the day before was not collected, or the count was corrected downwards). Pass `id` for one track (404 `HISTORY_NOT_FOUND` when it has no history yet) or `ids` for up to 50 (ids without history are listed in `missing`). `format=csv` returns a CSV download, one row per track and day.

Parameters 5

id Optional
In
query
Default
—
Description
One Spotify ID, URI or open.spotify.com URL. Use `id` or `ids`.
ids Optional
In
query
Default
—
Description
Up to 50 comma-separated IDs. Ids without history are listed in `missing`.
from Optional
In
query
Default
—
Description
First day, `YYYY-MM-DD` (UTC). Default 89 days before `to`; a range covers at most 366 days.
to Optional
In
query
Default
—
Description
Last day, `YYYY-MM-DD` (UTC). Default today.
format Optional
In
query
Default
json
Description
`csv` returns a CSV download, one row per item and day.

Request

Sent to https://spotify-proxy.checkleaked.cc/spotify-data with a direct-portal key in the x-rapidapi-key header, using the same example values the Run button sends.

Using a RapidAPI key? Delete the provider line in the JavaScript tab: the SDK then sends your key to RapidAPI with the host header it needs. The code snippets RapidAPI generates on its spotify81 listing fill in your key and host too.

Sample response

Live only

This endpoint has no recorded sample. Press Run to fetch a real response.

Errors

400
No parameter on this endpoint is required, so a 400 means one that was sent carries a value it does not accept — check the allowed values in the table above.
404
No Spotify item exists for the “id” and “ids” that was sent. Spotify ids are 22 characters of base62, so a share link has to be reduced to the id in it first.
401 / 403
The key is missing or not valid (code MISSING_API_KEY or INVALID_API_KEY). RapidAPI and the direct portal both read it from x-rapidapi-key; RapidAPI also needs x-rapidapi-host, which the SDK adds. On Apify the actor supplies it.
429
Rate limited. The demo on this site allows 100 requests per 15 minutes and 500 per day per visitor, inside a budget shared by every visitor. With a key it is 5 requests per second on every RapidAPI plan and 10 per second included with every direct key.
5xx
Temporary: wait for Retry-After, then retry two or three times at most. A 503's code names the cause — UPSTREAM_UNAVAILABLE, UPSTREAM_THROTTLED or LOAD_SHED. A timeout (UPSTREAM_TIMEOUT, or a 504) has already used the request's whole time budget, so retry it once at most. Retry a 500 with backoff.

The other 5 operations in the History group.