Apple Music Charts API
국가별 Apple Music 차트를 1위부터 순서대로 돌려줍니다. 곡, 앨범, 뮤직비디오, 플레이리스트 차트 중 하나를 고를 수 있고 아티스트, 커버 아트, 발매일, 장르가 함께 나옵니다.
GET /v1/apple_music/chartsApple Music Charts API는 언제 쓰나요
곡 이름 없이 한 시장에서 지금 많이 듣는 음악을 볼 때 사용하세요. 국가별 차트 순위를 꾸준히 추적할 때도 좋습니다.
API 레퍼런스 영문 원문
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.
75개 플랫폼을 병렬로 검색합니다
Charts API로 무엇을 할 수 있을까요
Charts 엔드포인트가 통합 스키마와 계산 필드를 담은 Apple Music 데이터를 한 번의 요청으로 보내드려요. 스크래핑 인프라를 직접 만들거나 유지할 필요가 없어요.
요청 예시
# 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);함께 보내면 좋은 파라미터
country=de지정한 국가의 결과만 반환합니다.
파라미터
| 파라미터 | 필수 | 설명 |
|---|---|---|
| country | 아니오 | Country 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`. |
| type | 아니오 | Which chart: `songs` (the default), `albums`, `music-videos` or `playlists`. (songs | albums | music-videos | playlists) |
| limit | 아니오 | How many chart positions to return, from the top, 1 to 100. Defaults to 50. |
| since | 아니오 | Only 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`. |
| until | 아니오 | Only 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`. |
Apple Music Charts API는 무엇을 돌려주나요
이 엔드포인트의 응답 구조와 필드를 보여 주는 예시예요. 값은 이해를 돕기 위한 것이며 실제 조회 결과는 아니에요.
응답 예시 보기
{
"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
}
}문서에 나온 응답 구조를 보여 주는 예시예요. 값은 이해를 돕기 위한 것이며 운영 환경에서 가져온 응답이 아니에요.
Apple Music Charts API는 어떻게 동작하나요
API 키와 함께 GET 요청을 보내면, 통합 스키마와 계산 필드를 담은 깔끔한 JSON이 돌아와요.
메서드
GET
응답 형식
JSON
소셜 미디어 데이터를 몇 초 만에 수집하는 방법
개발자를 위한 가장 빠른 소셜 미디어 스크래핑 API. 월간 활성 사용자 100억 명 이상을 포괄하는 75개 플랫폼에서 프로필, 게시물, 댓글, 분석 데이터를 수집하세요.
모든 플랫폼을 하나의 스키마로
동일한 응답 구조로 75개 플랫폼을 조회하세요. 연동은 한 번이면 충분합니다.
단순 수집을 넘어 계산된 필드 제공
엔드포인트가 해당 지표를 지원하고 계산에 필요한 원본 값이 있을 때, 정규화된 레코드에 engagement_rate, estimated_reach, content_category, language를 함께 담아 바로 활용할 수 있습니다.
코드 한 줄 쓰기 전에, 데이터부터
Visual Data Explorer에 URL만 붙여넣으면 결과 카드와 정형화된 테이블, CSV 내보내기를 바로 사용할 수 있습니다.
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(){
"success": true,
"platform": "tiktok",
"data": {
"author": {
"username": "charlidamelio",
"followers": 152400000
},
"engagement": {
"likes": 12400000000,
"engagement_rate": 0.087
},
"metadata": {
"language": "en",
"content_category": "lifestyle"
}
}
}자주 묻는 질문
API, 요금제, 기능에 대한 질문과 답변입니다.
문의하기애플 뮤직 차트용 API가 있나요?
차트 API는 어떻게 호출하나요?
차트 항목에는 무엇이 들어 있나요?
차트 항목의 곡이나 앨범 상세 정보도 받을 수 있나요?
어느 나라 차트를 볼 수 있나요?
요금은 얼마고 차트는 얼마나 최신인가요?
AI에게 SocialCrawl을 물어보세요
Apple Music Charts 데이터, 가져올 준비 되셨어요?
API 키 받고 60초 안에 Apple Music 데이터를 받아 가세요.
