100 free credits. No credit card required.Start building
Logo
Apple Music logo
100 free credits. No credit card required

Apple Music Charts API

Returns a country's Apple Music chart for songs, albums, music videos or playlists, ranked from the top, with artist, artwork, release date and genres.

GET /v1/apple_music/charts

Last updated November 2026Maintained by the SocialCrawl team

When to use the Apple Music Charts API

Use it to see what a market is playing right now without naming a track, or to track chart positions country by country over time.

From the API reference

Returns what a country is playing most on Apple Music right now: the Top Songs, Top Albums, Top Music Videos or Top Playlists chart, with no keyword in. Each item is a Post: content.text is the title, author.username the artist, url the Apple Music link and content.thumbnail_url the artwork. The chart position is on ext.trend: rank (1 is the top), country_code, chart and Apple's own chart_title and updated_at. ext.apple_music carries kind, release_date, artist_id, artist_url, genres and content_advisory. published_at is the release date at midnight UTC. Playlists have no artist or release date, so those are null. The item ids work with /v1/apple_music/track and /v1/apple_music/album for the full record. A country Apple Music does not publish a chart for is a free 400. Exact repeats within an hour are served from cache at 0 credits.

Searching 69 platforms in parallel

·TikTok logoTikTok·Instagram logoInstagram·YouTube logoYouTube·Facebook logoFacebook·X logoX·LinkedIn logoLinkedIn·Reddit logoReddit·Threads logoThreads·Pinterest logoPinterest·Twitch logoTwitch·Truth Social logoTruth Social·Snapchat logoSnapchat·Kick logoKick·Bluesky logoBluesky·Kwai logoKwai·Rumble logoRumble·Spotify logoSpotify·Apple Music logoApple Music·TikTok Shop logoTikTok Shop·Amazon Shop logoAmazon Shop·Google Shopping logoGoogle Shopping·Trustpilot logoTrustpilot·TripAdvisor logoTripAdvisor·Yelp logoYelp·Linktree logoLinktree·Komi logoKomi·Pillar logoPillar·lnk.bio logolnk.bio·Facebook Ads logoFacebook Ads·Google Ads logoGoogle Ads·LinkedIn Ads logoLinkedIn Ads·Google Search logoGoogle Search·Google News logoGoogle News·Finance logoFinance·Polymarket logoPolymarket·Tavily logoTavily·Hacker News logoHacker News·GitHub logoGitHub·Perplexity logoPerplexity·Naver logoNaver·Utility logoUtility·Universal Search logoUniversal Search
·TikTok logoTikTok·Instagram logoInstagram·YouTube logoYouTube·Facebook logoFacebook·X logoX·LinkedIn logoLinkedIn·Reddit logoReddit·Threads logoThreads·Pinterest logoPinterest·Twitch logoTwitch·Truth Social logoTruth Social·Snapchat logoSnapchat·Kick logoKick·Bluesky logoBluesky·Kwai logoKwai·Rumble logoRumble·Spotify logoSpotify·Apple Music logoApple Music·TikTok Shop logoTikTok Shop·Amazon Shop logoAmazon Shop·Google Shopping logoGoogle Shopping·Trustpilot logoTrustpilot·TripAdvisor logoTripAdvisor·Yelp logoYelp·Linktree logoLinktree·Komi logoKomi·Pillar logoPillar·lnk.bio logolnk.bio·Facebook Ads logoFacebook Ads·Google Ads logoGoogle Ads·LinkedIn Ads logoLinkedIn Ads·Google Search logoGoogle Search·Google News logoGoogle News·Finance logoFinance·Polymarket logoPolymarket·Tavily logoTavily·Hacker News logoHacker News·GitHub logoGitHub·Perplexity logoPerplexity·Naver logoNaver·Utility logoUtility·Universal Search logoUniversal Search
·TikTok logoTikTok·Instagram logoInstagram·YouTube logoYouTube·Facebook logoFacebook·X logoX·LinkedIn logoLinkedIn·Reddit logoReddit·Threads logoThreads·Pinterest logoPinterest·Twitch logoTwitch·Truth Social logoTruth Social·Snapchat logoSnapchat·Kick logoKick·Bluesky logoBluesky·Kwai logoKwai·Rumble logoRumble·Spotify logoSpotify·Apple Music logoApple Music·TikTok Shop logoTikTok Shop·Amazon Shop logoAmazon Shop·Google Shopping logoGoogle Shopping·Trustpilot logoTrustpilot·TripAdvisor logoTripAdvisor·Yelp logoYelp·Linktree logoLinktree·Komi logoKomi·Pillar logoPillar·lnk.bio logolnk.bio·Facebook Ads logoFacebook Ads·Google Ads logoGoogle Ads·LinkedIn Ads logoLinkedIn Ads·Google Search logoGoogle Search·Google News logoGoogle News·Finance logoFinance·Polymarket logoPolymarket·Tavily logoTavily·Hacker News logoHacker News·GitHub logoGitHub·Perplexity logoPerplexity·Naver logoNaver·Utility logoUtility·Universal Search logoUniversal Search
·TikTok logoTikTok·Instagram logoInstagram·YouTube logoYouTube·Facebook logoFacebook·X logoX·LinkedIn logoLinkedIn·Reddit logoReddit·Threads logoThreads·Pinterest logoPinterest·Twitch logoTwitch·Truth Social logoTruth Social·Snapchat logoSnapchat·Kick logoKick·Bluesky logoBluesky·Kwai logoKwai·Rumble logoRumble·Spotify logoSpotify·Apple Music logoApple Music·TikTok Shop logoTikTok Shop·Amazon Shop logoAmazon Shop·Google Shopping logoGoogle Shopping·Trustpilot logoTrustpilot·TripAdvisor logoTripAdvisor·Yelp logoYelp·Linktree logoLinktree·Komi logoKomi·Pillar logoPillar·lnk.bio logolnk.bio·Facebook Ads logoFacebook Ads·Google Ads logoGoogle Ads·LinkedIn Ads logoLinkedIn Ads·Google Search logoGoogle Search·Google News logoGoogle News·Finance logoFinance·Polymarket logoPolymarket·Tavily logoTavily·Hacker News logoHacker News·GitHub logoGitHub·Perplexity logoPerplexity·Naver logoNaver·Utility logoUtility·Universal Search logoUniversal Search
Apple Music API

What can you do with the Charts API?

The Charts endpoint gives you structured Apple Music data with computed fields in a single request. No scraping infrastructure to build or maintain.

Example Request

# GET /v1/apple_music/charts: 1 credit per call. Cache hits are free and failed calls are refunded.
# Check the price first for 0 credits: add dry_run=1 to the query. Nothing is fetched or charged.
# --max-time 25: this endpoint's measured p99 latency x 1.5.
# --retry 3: retries timeouts, 429 and 5xx, honoring Retry-After.
# -o response.json keeps only the final attempt's body.
# One Idempotency-Key per request, reused on every retry, so a retried call is never charged twice.
IDEMPOTENCY_KEY=$(od -An -N16 -tx1 /dev/urandom | tr -d ' \n')
curl -sS --max-time 25 --retry 3 -o response.json \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  "https://www.socialcrawl.dev/v1/apple_music/charts?country=de&type=songs&limit=10" && cat response.json
# GET /v1/apple_music/charts: 1 credit per call. Cache hits are free and failed calls are refunded.
# Check the price first for 0 credits: add dry_run=1 to the query. Nothing is fetched or charged.
import os
import random
import time
import uuid

import requests

API_KEY = os.environ.get("SOCIALCRAWL_API_KEY", "YOUR_API_KEY")
TIMEOUT_S = 25  # this endpoint's measured p99 latency x 1.5.
MAX_RETRIES = 3
URL = "https://www.socialcrawl.dev/v1/apple_music/charts"


def backoff(attempt):
    # Exponential backoff with jitter: about 1 s, 2 s, then 4 s.
    return 2 ** attempt * (0.5 + random.random() / 2)


def socialcrawl(params):
    # One Idempotency-Key per request, reused on every retry, so a retried call is never charged twice.
    idempotency_key = str(uuid.uuid4())
    for attempt in range(MAX_RETRIES + 1):
        try:
            res = requests.get(
                URL,
                params=params,
                headers={"x-api-key": API_KEY, "Idempotency-Key": idempotency_key},
                timeout=TIMEOUT_S,
            )
            body = res.json()
        except (requests.RequestException, ValueError):
            # A timeout, a dropped connection or a non-JSON gateway page: retry with the same key.
            if attempt == MAX_RETRIES:
                raise
            time.sleep(backoff(attempt))
            continue
        if body["success"]:
            return body
        error = body["error"]
        # Branch on error["type"], never on the message text.
        if error["type"] == "RESOURCE_NOT_FOUND":
            return None  # refunded: nothing to read
        retry_after = res.headers.get("Retry-After")
        # SERVICE_UNAVAILABLE without Retry-After is a withdrawn endpoint: permanent.
        permanent = error["type"] == "SERVICE_UNAVAILABLE" and retry_after is None
        if not error.get("retryable") or permanent or attempt == MAX_RETRIES:
            raise RuntimeError(f"{error['type']}: {error['message']} (request_id {body['request_id']})")
        # Retry-After (seconds) wins; otherwise back off.
        time.sleep(float(retry_after) if retry_after else backoff(attempt))


params = {
    "country": "de",
    "type": "songs",
    "limit": "10",
}
body = socialcrawl(params)
if body is not None:
    print(body["data"])
// GET /v1/apple_music/charts: 1 credit per call. Cache hits are free and failed calls are refunded.
// Check the price first for 0 credits: add dry_run=1 to the query. Nothing is fetched or charged.
const API_KEY = process.env.SOCIALCRAWL_API_KEY ?? "YOUR_API_KEY";
const TIMEOUT_MS = 25_000; // this endpoint's measured p99 latency x 1.5.
const MAX_RETRIES = 3;

type Page = { next_cursor: string | null; has_more: boolean };
type SocialCrawlResponse =
  | { success: true; data: any; pagination?: Page; credits_used: number; request_id: string }
  | { success: false; error: { type: string; message: string; retryable: boolean }; request_id: string };

const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
// Exponential backoff with jitter: about 1 s, 2 s, then 4 s.
const backoffMs = (attempt: number) => 2 ** attempt * 1000 * (0.5 + Math.random() / 2);

async function socialcrawl(url: URL) {
  // One Idempotency-Key per request, reused on every retry, so a retried call is never charged twice.
  const idempotencyKey = crypto.randomUUID();
  for (let attempt = 0; ; attempt++) {
    let res: Response;
    let body: SocialCrawlResponse;
    try {
      res = await fetch(url, {
        headers: {
          "x-api-key": API_KEY,
          "Idempotency-Key": idempotencyKey,
        },
        signal: AbortSignal.timeout(TIMEOUT_MS),
      });
      body = (await res.json()) as SocialCrawlResponse;
    } catch (error) {
      // A timeout, a dropped connection or a non-JSON gateway page: retry with the same key.
      if (attempt >= MAX_RETRIES) throw error;
      await sleep(backoffMs(attempt));
      continue;
    }
    if (body.success) return body;
    // Branch on error.type, never on the message text.
    if (body.error.type === "RESOURCE_NOT_FOUND") return null; // refunded: nothing to read
    const retryAfter = res.headers.get("Retry-After");
    // SERVICE_UNAVAILABLE without Retry-After is a withdrawn endpoint: permanent.
    const permanent = body.error.type === "SERVICE_UNAVAILABLE" && retryAfter === null;
    if (!body.error.retryable || permanent || attempt >= MAX_RETRIES) {
      throw new Error(`${body.error.type}: ${body.error.message} (request_id ${body.request_id})`);
    }
    // Retry-After (seconds) wins; otherwise back off.
    await sleep(retryAfter ? Number(retryAfter) * 1000 : backoffMs(attempt));
  }
}

const url = new URL("https://www.socialcrawl.dev/v1/apple_music/charts");
url.searchParams.set("country", "de");
url.searchParams.set("type", "songs");
url.searchParams.set("limit", "10");

const body = await socialcrawl(url);
if (body) console.log(body.data);

Parameters worth sending

  • country=de Results for one country.

Parameters

ParameterRequiredDescription
countryNoCountry as an ISO 3166-1 alpha-2 code, in any case (`us`, `DE`, `kr`). Apple Music publishes a chart for most countries where it is sold; one it does not is rejected with a free 400. `uk` is read as `gb`. Defaults to `us`.
typeNoWhich chart: `songs` (the default), `albums`, `music-videos` or `playlists`. (songs | albums | music-videos | playlists)
limitNoHow many chart positions to return, from the top, 1 to 100. Defaults to 50.
sinceNoOnly rows published on or after this date: YYYY-MM-DD (midnight UTC) or an ISO 8601 timestamp. Rows older than it are left off each page. This list is not in date order, so the walk does not stop at the date: keep following `next_cursor`, and each page costs what a page costs even when every row on it is filtered out. A row with no date is kept. `published_after`, `start_date`, `from_date`, `publish_time` (`yesterday`, `this-week`, `this-month`, `last-3-months`, `last-6-months`) and `max_age_days` are accepted and applied as `since`.
untilNoOnly rows published on or before this date: YYYY-MM-DD (that whole UTC day is included) or an ISO 8601 timestamp. Newer rows are left off each page and the walk does not stop, so older pages follow. A row with no date is kept. `published_before`, `end_date` and `to_date` are accepted and applied as `until`.
Example Response

What does the Apple Music Charts API return?

This example shows the endpoint's response shape and fields. Values are illustrative; this is not a live capture.

Example response
{
  "success": true,
  "platform": "apple_music",
  "endpoint": "/v1/apple_music/charts",
  "data": {
    "items": [
      {
        "post": {
          "id": "6769070199",
          "url": "https://music.apple.com/de/album/movin-to-the-sun/6769069923?i=6769070199",
          "content": {
            "text": "Movin' To The Sun",
            "media_urls": null,
            "thumbnail_url": "https://is1-ssl.mzstatic.com/image/thumb/Music211/v4/96/61/7a/96617ab5-51da-7cfc-97e5-c5a6a893c210/1087654.jpg/100x100bb.jpg",
            "duration_seconds": null
          },
          "author": {
            "username": "HUGEL, Imael Angel & Ultra Naté",
            "display_name": "HUGEL, Imael Angel & Ultra Naté",
            "avatar_url": null,
            "verified": null
          },
          "engagement": {
            "views": null,
            "likes": null,
            "comments": null,
            "shares": null,
            "saves": null
          },
          "flags": {
            "nsfw": null,
            "spoiler": null,
            "pinned": null,
            "deleted": false
          },
          "published_at": "2026-05-22T00:00:00.000Z",
          "ext": {
            "apple_music": {
              "kind": "songs",
              "release_date": "2026-05-22",
              "artist_id": "978839124",
              "artist_url": "https://music.apple.com/de/artist/hugel/978839124",
              "genres": [
                {
                  "id": "7",
                  "name": "Electronic"
                },
                {
                  "id": "34",
                  "name": "Musik"
                },
                {
                  "id": "17",
                  "name": "Dance"
                }
              ],
              "content_advisory": null
            },
            "trend": {
              "rank": 1,
              "country_code": "DE",
              "chart": "songs",
              "chart_title": "Top-Titel",
              "updated_at": "2026-09-23T01:27:30.000Z"
            }
          }
        },
        "computed": {
          "engagement_rate": null,
          "language": null,
          "content_category": "other",
          "estimated_reach": null
        }
      }
    ],
    "total": 10,
    "dropped": 0
  },
  "credits_used": 1,
  "credits_remaining": 9999,
  "request_id": "req-a1b2c3d4e5f6",
  "pagination": {
    "next_cursor": null,
    "has_more": false,
    "page_size": 10
  }
}

Illustrative fixture for the documented response shape. Values are examples, not a production capture.

API Details

How does the Apple Music Charts API work?

Send a GET request with your API key and get back clean, structured JSON in our unified schema. Supported computed fields are populated when the source provides the required inputs.

Method

GET

Response

JSON

Why SocialCrawl

Why use SocialCrawl for Apple Music Charts data?

We handle the complexity of Apple Music data extraction so you can focus on building. Unified schema, AI enrichment, and zero platform logic in your code.

Developer First

How do you scrape social media data in seconds?

The fastest social media scraping API for developers. Scrape profiles, posts, comments, and analytics from 69 platforms covering 10B+ monthly active users.

One schema, every platform

Query 69 platforms with identical response structures. Write your integration once.

Computed fields, not just scraped

When an endpoint supports these metrics and the source provides the required inputs, the normalized record includes engagement_rate, estimated_reach, content_category, and language. Ready to use.

See your data before you code

Visual Data Explorer. Paste any URL, get rich result cards, sortable tables, CSV export.

import requests

response = requests.get(
    'https://www.socialcrawl.dev/v1/tiktok/profile',
    params={'handle': 'charlidamelio'},
    headers={'x-api-key': 'sc_YOUR_API_KEY'}
)
data = response.json()
[ .JSON ]
{
  "success": true,
  "platform": "tiktok",
  "data": {
    "author": {
      "username": "charlidamelio",
      "followers": 152400000
    },
    "engagement": {
      "likes": 12400000000,
      "engagement_rate": 0.087
    },
    "metadata": {
      "language": "en",
      "content_category": "lifestyle"
    }
  }
}
+ 69 platforms
FAQ

Have a question? We got answers

Find answers to frequently asked questions about SocialCrawl's API, pricing, and capabilities.

Contact us
Does Apple Music have an API for charts?
SocialCrawl has one. /v1/apple_music/charts returns what a country is playing most on Apple Music right now, as the Top Songs, Top Albums, Top Music Videos or Top Playlists chart, with no keyword needed.
How do I call the Apple Music charts API?
Send a GET request to /v1/apple_music/charts with an x-api-key header. country takes an ISO code in any case (us, DE, kr) and defaults to us, type takes songs (the default), albums, music-videos or playlists, and limit takes 1 to 100 and defaults to 50.
What does each chart item contain?
Each item is a Post: content.text is the title, author.username the artist, url the Apple Music link and content.thumbnail_url the artwork. ext.trend holds rank, country_code, chart, chart_title and updated_at, and ext.apple_music holds kind, release_date, artist_id, artist_url, genres and content_advisory.
Can I get the full track or album record for a chart entry?
Yes. The item ids work with /v1/apple_music/track and /v1/apple_music/album. Playlists have no artist or release date, so those fields are null for them.
Which countries have an Apple Music chart?
It covers most countries where Apple Music is sold. A country with no published chart is rejected with a free 400, and uk is read as gb.
How much does it cost and how fresh is the chart?
Each call costs 1 credit on the standard tier. Apple refreshes the chart about once a day, so exact repeats within an hour come from cache at 0 credits. Credits for failed or empty calls are refunded automatically.

Ask AI about SocialCrawl

Ready to scrape Apple Music Charts data?

Get your API key and start pulling Apple Music data in under 60 seconds.

Start for free

🤖 AI agent or LLM? Read this page as markdown