Apple Music album API
The album with its tracks, label, UPC, copyright and editorial notes.
- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
- Status
- Betashape may still gain fields
You send one of url or id.
Request
Send your key in the x-api-key header.
curl -G "https://api.socialscrape.io/v1/apple-music/album" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode 'id=1468058165'import os
import requests
params = {
"id": "1468058165",
}
res = requests.get(
"https://api.socialscrape.io/v1/apple-music/album",
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/apple-music/album");
url.search = new URLSearchParams({
id: "1468058165",
}).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 Apple Music album",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/apple-music/album",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "id",
"value": "1468058165"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | url | one of | Apple Music album URL. |
id | string | one of | Apple Music album id. |
region | string | Two-letter country code (ISO 3166-1) for results that vary by country. Also accepted as country, geo. |
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_56093305f3637feb6c7d7917",
"data": {
"object": "album",
"platform": "apple_music",
"id": "1468058165",
"url": "https://music.apple.com/us/album/lover/1468058165",
"title": "Lover",
"artists": [
"Taylor Swift"
],
"released_at": "2019-08-23",
"track_count": 18,
"cover_url": "https://is1-ssl.mzstatic.com/image/thumb/Music125/v4/49/3d/ab/493dab54-f920-9043-6181-80993b8116c9/19UMGIM53909.rgb.jpg/1200x1200bb.jpg",
"label": "Taylor Swift",
"tracks": [
{
"object": "song",
"platform": "apple_music",
"id": "1468058169",
"url": "https://music.apple.com/us/album/i-forgot-that-you-existed/1468058165?i=1468058169",
"title": "I Forgot That You Existed",
"artists": [
"Taylor Swift"
],
"album": "Lover",
"duration_seconds": 170.651,
"cover_url": "https://is1-ssl.mzstatic.com/image/thumb/Music125/v4/49/3d/ab/493dab54-f920-9043-6181-80993b8116c9/19UMGIM53909.rgb.jpg/1200x1200bb.jpg",
"preview_url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview221/v4/9c/e2/97/9ce2976a-b1c8-aa80-3e94-f4562cbad53e/mzaf_13898706762824220632.plus.aac.ep.m4a",
"released_at": "2019-08-23",
"isrc": "USUG11901471",
"explicit": false,
"is_original": null,
"stats": {
"plays": null,
"uses": null,
"likes": null
},
"extra": {
"album_artist": "Taylor Swift",
"album_id": "1468058165",
"audio_locale": "en-US",
"audio_traits": [
"atmos",
"lossless",
"lossy-stereo"
],
"composer": "Taylor Swift, Louis Bell & Adam Feeney",
"disc_number": 1
}
},
{
"object": "song",
"platform": "apple_music",
"id": "1468058171",
"url": "https://music.apple.com/us/album/cruel-summer/1468058165?i=1468058171",
"title": "Cruel Summer",
"artists": [
"Taylor Swift"
],
"album": "Lover",
"duration_seconds": 178.426,
"cover_url": "https://is1-ssl.mzstatic.com/image/thumb/Music125/v4/49/3d/ab/493dab54-f920-9043-6181-80993b8116c9/19UMGIM53909.rgb.jpg/1200x1200bb.jpg",
"preview_url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview221/v4/44/af/81/44af8168-9609-1b85-5048-ada08dceacf3/mzaf_5595361395314573470.plus.aac.ep.m4a",
"released_at": "2019-08-23",
"isrc": "USUG11901472",
"explicit": false,
"is_original": null,
"stats": {
"plays": null,
"uses": null,
"likes": null
},
"extra": {
"album_artist": "Taylor Swift",
"album_id": "1468058165",
"audio_locale": "en-US",
"audio_traits": [
"atmos",
"lossless",
"lossy-stereo"
],
"composer": "Taylor Swift, Jack Antonoff & Annie Clark",
"disc_number": 1
}
},
{
"object": "song",
"platform": "apple_music",
"id": "1468058173",
"url": "https://music.apple.com/us/album/lover/1468058165?i=1468058173",
"title": "Lover",
"artists": [
"Taylor Swift"
],
"album": "Lover",
"duration_seconds": 221.3,
"cover_url": "https://is1-ssl.mzstatic.com/image/thumb/Music125/v4/49/3d/ab/493dab54-f920-9043-6181-80993b8116c9/19UMGIM53909.rgb.jpg/1200x1200bb.jpg",
"preview_url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview211/v4/e0/db/47/e0db47b0-7f70-0631-0414-cd4777d2fb3e/mzaf_6008069204816798831.plus.aac.ep.m4a",
"released_at": "2019-08-16",
"isrc": "USUG11901473",
"explicit": false,
"is_original": null,
"stats": {
"plays": null,
"uses": null,
"likes": null
},
"extra": {
"album_artist": "Taylor Swift",
"album_id": "1468058165",
"audio_locale": "en-US",
"audio_traits": [
"atmos",
"lossless",
"lossy-stereo"
],
"composer": "Taylor Swift",
"disc_number": 1
}
}
],
"extra": {
"artist_ids": [
"159260351"
],
"artist_urls": [
"https://music.apple.com/us/artist/taylor-swift/159260351"
],
"audio_traits": [
"atmos",
"lossless",
"lossy-stereo"
],
"copyright": "℗ 2019 Taylor Swift",
"editorial_notes": {
"short": "A love letter to love itself.",
"standard": "There’s a reason Taylor Swift sounds so confident and cool on Lover, her seventh album and the most free-spirited yet. She’s in love - pure, steady, starry-e..."
},
"genres": [
"Pop",
"Music"
]
}
},
"cursor": null,
"has_more": null
}Fields
One Album in data.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "album" | ||
platform | Platform | yes | |
id | string | yes | |
url | string or null | ||
title | string or null | ||
artists | string[] or null | ||
released_at | string (ISO 8601 date) or null | ||
track_count | integer or null | ||
cover_url | string or null | ||
label | string or null | ||
tracks | Song[] or null | ||
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.
Is there an SDK call for it?
The preview Python client has client.apple_music.album(...) and the TypeScript client client.appleMusic.album(). 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.