- Docs
- Apple Music
- Apple Music search API
Apple Music search API
Public results for artists, albums, songs, playlists, stations and music videos.
GET /v1/apple-music/search
GET /v1/apple-music/search
Public results for artists, albums, songs, playlists, stations and music videos. Without type every section is returned, 8 of each; with type, 25 of that kind. Music videos come back as songs with extra.type "music_video", playlists and stations as collections. radio_episode is not offered by Apple's public catalog search and answers invalid_params.
- Cost: 1 credit
- 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 |
|---|---|---|---|
query | string | yes | Search terms. Also accepted as keyword, q. |
type | string | no | Kind of result; all returns every section. One of all, song, album, artist, playlist, station, music_video, radio_episode. |
Every request also accepts:
cursor: the cursor from the previous page (Pagination).region: two-letter country code for results that vary by country. Changing it restarts the cursor chain.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).
1curl -G "https://api.socialscrape.dev/v1/apple-music/search" \2 -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3 --data-urlencode "query=taylor swift"1import os2import requests34params = {5 "query": "taylor swift",6}7res = requests.get(8 "https://api.socialscrape.dev/v1/apple-music/search",9 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},10 params=params,11)12body = res.json()1314if body["ok"]:15 print(body["data"])16else:17 print(body["error"]["code"], body["error"]["message"])1const url = new URL("https://api.socialscrape.dev/v1/apple-music/search");2url.search = new URLSearchParams({3 "query": "taylor swift"4}).toString();5const res = await fetch(url, {6 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },7});8const body = await res.json();910if (body.ok) {11 console.log(body.data);12} else {13 console.error(body.error.code, body.error.message);14}1{2 "nodes": [3 {4 "name": "SocialScrape Apple Music search",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/apple-music/search",14 "sendQuery": true,15 "queryParameters": {16 "parameters": [17 {18 "name": "query",19 "value": "taylor swift"20 }21 ]22 },23 "sendHeaders": true,24 "headerParameters": {25 "parameters": [26 {27 "name": "x-api-key",28 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"29 }30 ]31 }32 }33 }34 ],35 "connections": {}36}Example response#
This is a sample from a recorded response, lists and long text are shortened. Status 200.
1{2 "ok": true,3 "credits_charged": 1,4 "credits_remaining": 4999,5 "cached": false,6 "cached_at": null,7 "request_id": "req_f3f43a799c553e6ac0c4b212",8 "data": {9 "object": "list",10 "items": [11 {12 "object": "profile",13 "platform": "apple_music",14 "id": "159260351",15 "handle": null,16 "name": "Taylor Swift",17 "headline": null,18 "url": "https://music.apple.com/us/artist/taylor-swift/159260351",19 "kind": "artist",20 "bio": null,21 "avatar_url": "https://is1-ssl.mzstatic.com/image/thumb/AMCArtistImages221/v4/6d/67/88/6d67888b-9e7f-53af-7853-0f91d6fd2332/ami_U003aidentity_U003a994af5c375f4c3aa96cd6ced4a700799-2026-09-25T04-00-05.358Z_cropped.png/1200x1200bb.jpg",22 "banner_url": null,23 "verified": null,24 "is_private": null,25 "external_url": null,26 "links": null,27 "location": null,28 "category": "Pop",29 "created_at": null,30 "stats": {31 "followers": null,32 "following": null,33 "posts": null,34 "likes": null,35 "views": null36 },37 "extra": {38 "editorial_notes": {39 "short": "Favorite Taylor’s artist page for updates on The Life of a Showgirl."40 },41 "genres": [42 "Pop"43 ]44 }45 },46 {47 "object": "album",48 "platform": "apple_music",49 "id": "6814997249",50 "url": "https://music.apple.com/us/album/the-life-of-a-showgirl-the-encore/6814997249",51 "title": "The Life of a Showgirl: The Encore",52 "artists": [53 "Taylor Swift"54 ],55 "released_at": "2026-09-24",56 "track_count": 16,57 "cover_url": "https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/a0/dd/fd/a0ddfd72-ee9e-f046-6466-a5dbefc696fa/26UM1IM21436.rgb.jpg/1200x1200bb.jpg",58 "label": "Taylor Swift",59 "tracks": null,60 "extra": {61 "content_rating": "explicit",62 "genres": [63 "Pop",64 "Music"65 ],66 "is_single": false,67 "upc": "00881061651819"68 }69 }70 ],71 "cursor": "eyJvIjo4fQ",72 "has_more": true,73 "parent": null74 },75 "cursor": "eyJvIjo4fQ",76 "has_more": true77}Response#
A list of Song or Album or Profile or Collection objects in data.items, with data.cursor and data.has_more.
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. |
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:
1{2 "ok": false,3 "error": {4 "code": "invalid_params",5 "message": "A parameter is missing, unknown or has the wrong type.",6 "retryable": false7 },8 "credits_charged": 0,9 "request_id": "req_21e71a697946aeb5d33eb46f"10}Related endpoints#
- Apple Music artist (
GET /v1/apple-music/artist) - Apple Music album (
GET /v1/apple-music/album) - Apple Music track (
GET /v1/apple-music/track)