Docs menu

Apple Music search

Beta 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
  • 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_days to reuse them for free.
  • Timeout: A request still running after about 25 seconds answers 202 with a job to poll (Batch and jobs).

Parameters#

NameTypeRequiredDescription
querystringyesSearch terms. Also accepted as keyword, q.
typestringnoKind 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: true for a smaller response without null fields and extra.
  • raw: true to also get the platform's original object as raw.
  • 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/apple-music/search" \
  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \
  --data-urlencode "query=taylor swift"
Python
import os
import requests

params = {
    "query": "taylor swift",
}
res = requests.get(
    "https://api.socialscrape.io/v1/apple-music/search",
    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/apple-music/search");
url.search = new URLSearchParams({
  "query": "taylor swift"
}).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 Apple Music search",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        0,
        0
      ],
      "parameters": {
        "method": "GET",
        "url": "https://api.socialscrape.io/v1/apple-music/search",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "query",
              "value": "taylor swift"
            }
          ]
        },
        "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_f3f43a799c553e6ac0c4b212",
  "data": {
    "object": "list",
    "items": [
      {
        "object": "profile",
        "platform": "apple_music",
        "id": "159260351",
        "handle": null,
        "name": "Taylor Swift",
        "headline": null,
        "url": "https://music.apple.com/us/artist/taylor-swift/159260351",
        "kind": "artist",
        "bio": null,
        "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",
        "banner_url": null,
        "verified": null,
        "is_private": null,
        "external_url": null,
        "links": null,
        "location": null,
        "category": "Pop",
        "created_at": null,
        "stats": {
          "followers": null,
          "following": null,
          "posts": null,
          "likes": null,
          "views": null
        },
        "extra": {
          "editorial_notes": {
            "short": "Favorite Taylor’s artist page for updates on The Life of a Showgirl."
          },
          "genres": [
            "Pop"
          ]
        }
      },
      {
        "object": "album",
        "platform": "apple_music",
        "id": "6814997249",
        "url": "https://music.apple.com/us/album/the-life-of-a-showgirl-the-encore/6814997249",
        "title": "The Life of a Showgirl: The Encore",
        "artists": [
          "Taylor Swift"
        ],
        "released_at": "2026-09-24",
        "track_count": 16,
        "cover_url": "https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/a0/dd/fd/a0ddfd72-ee9e-f046-6466-a5dbefc696fa/26UM1IM21436.rgb.jpg/1200x1200bb.jpg",
        "label": "Taylor Swift",
        "tracks": null,
        "extra": {
          "content_rating": "explicit",
          "genres": [
            "Pop",
            "Music"
          ],
          "is_single": false,
          "upc": "00881061651819"
        }
      }
    ],
    "cursor": "eyJvIjo4fQ",
    "has_more": true,
    "parent": null
  },
  "cursor": "eyJvIjo4fQ",
  "has_more": true
}

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.

CodeHTTPRetryMeaning
invalid_params400noA parameter is missing, unknown or has the wrong type.
not_found404noThe 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": "invalid_params",
    "message": "A parameter is missing, unknown or has the wrong type.",
    "retryable": false
  },
  "credits_charged": 0,
  "request_id": "req_21e71a697946aeb5d33eb46f"
}