Spotify playlist API
A public playlist's tracks, 50 a page; parent is the playlist.
- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
- Status
- Betashape may still gain fields
Pass the cursor back until it is null.
You send one of url or id.
Request
Send your key in the x-api-key header.
curl -G "https://api.socialscrape.io/v1/spotify/playlist" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode 'id=37i9dQZF1DX4UtSsGT1Sbe'import os
import requests
params = {
"id": "37i9dQZF1DX4UtSsGT1Sbe",
}
res = requests.get(
"https://api.socialscrape.io/v1/spotify/playlist",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
timeout=60,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const url = new URL("https://api.socialscrape.io/v1/spotify/playlist");
url.search = new URLSearchParams({
id: "37i9dQZF1DX4UtSsGT1Sbe",
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape Spotify playlist",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/spotify/playlist",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "id",
"value": "37i9dQZF1DX4UtSsGT1Sbe"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | url | one of | Spotify playlist URL. |
id | string | one of | Spotify playlist id. |
cursor | string | Opaque cursor from the previous page; pass it back unchanged. Also accepted as continuationToken, continuation_token, next_max_id, max_id, max_cursor, min_time, after, page_token, pageToken, paginationToken, next_page_id, page. |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are public data, not yours.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_b30e35c1d5168cb158179ba4",
"data": {
"object": "list",
"items": [
{
"object": "song",
"platform": "spotify",
"id": "2LlQb7Uoj1kKyGhlkBf9aC",
"url": "https://open.spotify.com/track/2LlQb7Uoj1kKyGhlkBf9aC",
"title": "Thriller",
"artists": [
"Michael Jackson"
],
"album": "Thriller",
"duration_seconds": 358.807,
"cover_url": "https://i.scdn.co/image/ab67616d0000b27332a7d87248d1b75463483df5",
"preview_url": null,
"released_at": "1982-11-30",
"isrc": null,
"explicit": false,
"is_original": null,
"stats": {
"plays": 1101594236,
"uses": null,
"likes": null
},
"extra": {
"added_at": "2026-07-09T14:06:14.326Z",
"album_id": "2ANVost0y2y52ema1E9xAZ",
"artist_ids": [
"3fMbdgg4jU18AjLCKBhRSm"
],
"audio_attributes": {
"bpm": 118.4749984741211,
"key": {
"camelotKey": {
"color": "#56eff2",
"value": "12A"
},
"key": "C#",
"mode": "MODE_MINOR"
}
},
"disc_number": 1,
"playable": true
}
},
{
"object": "song",
"platform": "spotify",
"id": "2WfaOiMkCvy7F5fcp2zZ8L",
"url": "https://open.spotify.com/track/2WfaOiMkCvy7F5fcp2zZ8L",
"title": "Take on Me",
"artists": [
"a-ha"
],
"album": "Hunting High and Low",
"duration_seconds": 225.28,
"cover_url": "https://i.scdn.co/image/ab67616d0000b273e8dd4db47e7177c63b0b7d53",
"preview_url": null,
"released_at": "1985-06-01",
"isrc": null,
"explicit": false,
"is_original": null,
"stats": {
"plays": 2979495144,
"uses": null,
"likes": null
},
"extra": {
"added_at": "2026-07-09T14:06:14.326Z",
"album_id": "1ER3B6zev5JEAaqhnyyfbf",
"artist_ids": [
"2jzc5TC5TVFLXQlBNiIUzE"
],
"audio_attributes": {
"bpm": 84.41200256347656,
"key": {
"camelotKey": {
"color": "#56d9f8",
"value": "11B"
},
"key": "A",
"mode": "MODE_MAJOR"
}
},
"disc_number": 1,
"playable": true
}
}
],
"cursor": "eyJvIjo1MH0",
"has_more": true,
"parent": {
"object": "collection",
"platform": "spotify",
"id": "37i9dQZF1DX4UtSsGT1Sbe",
"url": "https://open.spotify.com/playlist/37i9dQZF1DX4UtSsGT1Sbe",
"kind": "playlist",
"title": "All Out 80s",
"description": "The biggest songs of the 1980s. Cover: Michael Jackson",
"owner": {
"id": "spotify",
"handle": "spotify",
"name": "Spotify",
"url": "https://open.spotify.com/user/spotify",
"avatar_url": "https://i.scdn.co/image/ab6775700000ee8555c25988a6ac314394d3fbf5",
"verified": null
},
"item_count": 150,
"cover_url": "https://i.scdn.co/image/ab67706f000000028c767aab2034bb8fafd33124",
"updated_at": null,
"extra": {
"followers": 12060235,
"format": "editorial",
"uri": "spotify:playlist:37i9dQZF1DX4UtSsGT1Sbe"
}
}
},
"cursor": "eyJvIjo1MH0",
"has_more": true
}Fields
A page of results. Each entry in items is a Song. cursor and has_more page through the rest.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "song" | ||
platform | Platform | yes | |
id | string | yes | |
url | string or null | ||
title | string or null | ||
artists | string[] or null | ||
album | string or null | ||
duration_seconds | number or null | ||
cover_url | string or null | ||
preview_url | string or null | ||
released_at | string (ISO 8601 date) or null | ||
isrc | string or null | ||
explicit | boolean or null | ||
is_original | boolean or null | TikTok "original sound" |
Show the other 2 fields
| Field | Type | Always | Notes |
|---|---|---|---|
stats | SongStats | ||
extra | object or null |
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), unsupported_url (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
How do I get more than one page?
Send the same request with cursor set to the cursor you received, until has_more is false. Each page costs its own price. See pagination.
Is there an SDK call for it?
The preview Python client has client.spotify.playlist(...) and the TypeScript client client.spotify.playlist(). Both return the same envelope as the HTTP API. The packages are not published yet; plain HTTP works today in any language.
Can an AI agent call it?
Yes. The MCP server reaches every built endpoint, with the same prices.