Spotify album
Beta GET /v1/spotify/album
GET /v1/spotify/album
The album with its tracks (up to 200), label, copyright and release date.
- Cost: 1 credit
- Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
- Cache: Results are kept up to 30 days; send
max_age_daysto reuse them for free. - Timeout: A request still running after about 25 seconds answers
202with a job to poll (Batch and jobs).
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
url | URL | one of | Spotify album URL. Accepted hosts: open.spotify.com, spotify.com, spotify.link. |
id | string | one of | Spotify album id. |
Send at least one of url, id. If you send several, the first listed is used and the rest are ignored.
Every request also accepts:
trim:truefor a smaller response withoutnullfields andextra.raw:trueto also get the platform's original object asraw.max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).
Example request#
Set your key in the environment first (see Authentication).
curl
curl -G "https://api.socialscrape.io/v1/spotify/album" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode "id=5AEDGbliTTfjOB8TSm1sxt"Python
import os
import requests
params = {
"id": "5AEDGbliTTfjOB8TSm1sxt",
}
res = requests.get(
"https://api.socialscrape.io/v1/spotify/album",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])TypeScript
const url = new URL("https://api.socialscrape.io/v1/spotify/album");
url.search = new URLSearchParams({
"id": "5AEDGbliTTfjOB8TSm1sxt"
}).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);
}n8n
{
"nodes": [
{
"name": "SocialScrape Spotify album",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/spotify/album",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "id",
"value": "5AEDGbliTTfjOB8TSm1sxt"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Example response#
This is a sample from a recorded response, lists and long text are shortened. Status 200.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_29f4e13231054599921cc3e1",
"data": {
"object": "album",
"platform": "spotify",
"id": "5AEDGbliTTfjOB8TSm1sxt",
"url": "https://open.spotify.com/album/5AEDGbliTTfjOB8TSm1sxt",
"title": "Speak Now (Taylor's Version)",
"artists": [
"Taylor Swift"
],
"released_at": "2023-07-07",
"track_count": 22,
"cover_url": "https://i.scdn.co/image/ab67616d0000b2730b04da4f224b51ff86e0a481",
"label": "Taylor Swift",
"tracks": [
{
"object": "song",
"platform": "spotify",
"id": "7G0gBu6nLdhFDPRLc0HdDG",
"url": "https://open.spotify.com/track/7G0gBu6nLdhFDPRLc0HdDG",
"title": "Mine (Taylor's Version)",
"artists": [
"Taylor Swift"
],
"album": "Speak Now (Taylor's Version)",
"duration_seconds": 231.706,
"cover_url": "https://i.scdn.co/image/ab67616d0000b2730b04da4f224b51ff86e0a481",
"preview_url": null,
"released_at": "2023-07-07",
"isrc": null,
"explicit": false,
"is_original": null,
"stats": {
"plays": 296875369,
"uses": null,
"likes": null
},
"extra": {
"album_id": "5AEDGbliTTfjOB8TSm1sxt",
"artist_ids": [
"06HL4z0CvFAxyc27GXpf02"
],
"disc_number": 1,
"playable": true,
"track_number": 1,
"uri": "spotify:track:7G0gBu6nLdhFDPRLc0HdDG",
"video_count": 0
}
},
{
"object": "song",
"platform": "spotify",
"id": "3MytWN8L7shNYzGl4tAKRp",
"url": "https://open.spotify.com/track/3MytWN8L7shNYzGl4tAKRp",
"title": "Sparks Fly (Taylor’s Version)",
"artists": [
"Taylor Swift"
],
"album": "Speak Now (Taylor's Version)",
"duration_seconds": 261.23,
"cover_url": "https://i.scdn.co/image/ab67616d0000b2730b04da4f224b51ff86e0a481",
"preview_url": null,
"released_at": "2023-07-07",
"isrc": null,
"explicit": false,
"is_original": null,
"stats": {
"plays": 197955576,
"uses": null,
"likes": null
},
"extra": {
"album_id": "5AEDGbliTTfjOB8TSm1sxt",
"artist_ids": [
"06HL4z0CvFAxyc27GXpf02"
],
"disc_number": 1,
"playable": true,
"track_number": 2,
"uri": "spotify:track:3MytWN8L7shNYzGl4tAKRp",
"video_count": 0
}
},
{
"object": "song",
"platform": "spotify",
"id": "79uDOz0zuuWS7HWxzMmTa2",
"url": "https://open.spotify.com/track/79uDOz0zuuWS7HWxzMmTa2",
"title": "Back To December (Taylor's Version)",
"artists": [
"Taylor Swift"
],
"album": "Speak Now (Taylor's Version)",
"duration_seconds": 294.189,
"cover_url": "https://i.scdn.co/image/ab67616d0000b2730b04da4f224b51ff86e0a481",
"preview_url": null,
"released_at": "2023-07-07",
"isrc": null,
"explicit": false,
"is_original": null,
"stats": {
"plays": 319451738,
"uses": null,
"likes": null
},
"extra": {
"album_id": "5AEDGbliTTfjOB8TSm1sxt",
"artist_ids": [
"06HL4z0CvFAxyc27GXpf02"
],
"disc_number": 1,
"playable": true,
"track_number": 3,
"uri": "spotify:track:79uDOz0zuuWS7HWxzMmTa2",
"video_count": 0
}
}
],
"extra": {
"artist_ids": [
"06HL4z0CvFAxyc27GXpf02"
],
"artist_urls": [
"https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02"
],
"copyright": [
"© 2023 Taylor Swift",
"℗ 2023 Taylor Swift"
],
"disc_count": 1,
"is_pre_release": false,
"more_albums_by_artist": [
{
"cover_url": "https://i.scdn.co/image/ab67616d0000b273cf3de6b538d8b1ed73a4d5d1",
"id": "4hF2gTGuPYlykYuphDxi8J",
"release_date": "2026",
"release_date_precision": "YEAR",
"title": "The Life of a Showgirl: The Encore",
"type": "album",
"url": "https://open.spotify.com/album/4hF2gTGuPYlykYuphDxi8J"
},
{
"cover_url": "https://i.scdn.co/image/ab67616d0000b273d7812467811a7da6e6a44902",
"id": "4a6NzYL1YHRUgx9e3YZI6I",
"release_date": "2025",
"release_date_precision": "YEAR",
"title": "The Life of a Showgirl",
"type": "album",
"url": "https://open.spotify.com/album/4a6NzYL1YHRUgx9e3YZI6I"
},
{
"cover_url": "https://i.scdn.co/image/ab67616d0000b273e787cffec20aa2a396a61647",
"id": "1NAmidJlEaVgA3MpcPFYGq",
"release_date": "2019",
"release_date_precision": "YEAR",
"title": "Lover",
"type": "album",
"url": "https://open.spotify.com/album/1NAmidJlEaVgA3MpcPFYGq"
}
],
"playable": true,
"release_date": "2023-07-07T00:00:00Z",
"release_date_precision": "DAY",
"type": "album",
"uri": "spotify:album:5AEDGbliTTfjOB8TSm1sxt"
}
},
"cursor": null,
"has_more": null
}Response#
A Album object in data.
See Data models for every field. The envelope around data is described in Responses.
Errors#
Failures are free: credits_charged is 0. Branch on error.code, never on the message.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
unsupported_url | 400 | no | The URL is not one this endpoint accepts (wrong platform or form). |
not_found | 404 | no | The platform says this profile, post or item does not exist. |
Every request can also fail with the account and platform errors listed on the Errors page.
Example error:
{
"ok": false,
"error": {
"code": "not_found",
"message": "The platform says this profile, post or item does not exist.",
"retryable": false
},
"credits_charged": 0,
"request_id": "req_c003e3caa49c54ac1c1b9d8d"
}Related endpoints#
- Spotify artist (
GET /v1/spotify/artist) - Spotify track (
GET /v1/spotify/track) - Spotify podcast (
GET /v1/spotify/podcast) - Spotify playlist (
GET /v1/spotify/playlist) - Spotify podcast episodes (
GET /v1/spotify/podcast/episodes) - Spotify search (
GET /v1/spotify/search)