Apple Music Top Albums API. Top albums, on request.
Most played albums chart by country. We handle the proxies, blocks and platform changes.
Apple Music Top Albums API at a glance
Returns Apple Music's chart of the most played albums in a country's store, top first, a page at a time, with each album's rank, label and UPC. Each row also has the credited artists with their IDs, full-size cover, release date, copyright, genres, track count, explicit rating, audio formats, Apple's notes and its Digital Master badge. Pick the store with country, the US by default.
GET /v1/applemusic/top_albums
- 1 credit per page, $0.75–$1.97 per 1,000 pages
- 20 typed fields null when unknown
- 50 most played albums per page, Apple Music's own chart order (1 = most played)
- 100 credits free when you sign up, no card, so you can build before you spend
Send one request. Get up to 50 most played albums back.
Copy the request in your language, or hand it to your agent. Sign up for an API key and your first 100 credits are free.
$ npm install socialtapconst params = new URLSearchParams({
country: "US",
});
const res = await fetch(`https://socialtap.dev/v1/applemusic/top_albums?${params}`, {
headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, page, meta } = body;
console.log(data, meta.credits_charged);import os
import requests
res = requests.get(
"https://socialtap.dev/v1/applemusic/top_albums",
params={"country": "US"},
headers={"x-api-key": os.environ["SOCIALTAP_API_KEY"]},
)
body = res.json()
if not res.ok:
raise RuntimeError(f"{body['error']['code']}: {body['error']['message']}")
data, page, meta = body["data"], body["page"], body["meta"]
print(data, meta["credits_charged"])require "json"
require "net/http"
uri = URI("https://socialtap.dev/v1/applemusic/top_albums")
uri.query = URI.encode_www_form('country' => 'US')
req = Net::HTTP::Get.new(uri)
req["x-api-key"] = ENV.fetch("SOCIALTAP_API_KEY")
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
body = JSON.parse(res.body)
raise "#{body["error"]["code"]}: #{body["error"]["message"]}" unless res.is_a?(Net::HTTPSuccess)
pp body["data"]
puts body["meta"]["credits_charged"]<?php
$query = http_build_query([
'country' => 'US',
]);
$ch = curl_init('https://socialtap.dev/v1/applemusic/top_albums?' . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['x-api-key: ' . getenv('SOCIALTAP_API_KEY')],
]);
$body = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}
print_r($body['data']);
echo $body['meta']['credits_charged'], PHP_EOL;package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"net/url"
"os"
)
func main() {
q := url.Values{}
q.Set("country", "US")
req, err := http.NewRequest("GET", "https://socialtap.dev/v1/applemusic/top_albums?"+q.Encode(), nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("x-api-key", os.Getenv("SOCIALTAP_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
var body struct {
Data json.RawMessage `json:"data"`
Page json.RawMessage `json:"page"`
Meta map[string]any `json:"meta"`
Error *struct {
Code string `json:"code"`
Message string `json:"message"`
} `json:"error"`
}
if err := json.NewDecoder(res.Body).Decode(&body); err != nil {
log.Fatal(err)
}
if body.Error != nil {
log.Fatalf("%s: %s", body.Error.Code, body.Error.Message)
}
fmt.Println(string(body.Data), body.Meta["credits_charged"])
}curl 'https://socialtap.dev/v1/applemusic/top_albums?country=US' \
-H "x-api-key: $SOCIALTAP_API_KEY"{
"data": [
{
"approximate_fields": [
"released_at"
],
"artist_name": "BigXthaPlug",
"artists": [
{
"avatar_url": "https://is1-ssl.mzstatic.com/image/thumb/AMCArtistImages221/v4/2d/37/2e/2d372ebd-cf1a-b1f5-2e2e-b8aebb430cf2/ami_U003aidentity_U003a8cd8358dbec0e6453567ddb7d3121e91-2026-10-09T12-14-49.366Z_cropped.png/871x871bb.jpg",
"display_name": "BigXthaPlug",
"id": "1482508209",
"is_verified": null,
"url": "https://music.apple.com/us/artist/bigxthaplug/1482508209",
"username": null
}
],
"copyrights": [
{
"text": "℗ 2026 BigXthaPlug under exclusive license to UnitedMasters LLC",
"type": "p"
}
],
"cover_url": "https://is1-ssl.mzstatic.com/image/thumb/Music211/v4/f2/30/e2/f230e2c5-8527-184a-12f7-442f85567061/711209295424.png/3000x3000bb.jpg",
"description": "On his previous album, 2025’s I Hope You’re Happy, the irrepressible Dallas rapper BigXthaPlug took a break from being the torchbearer for Texas storytelling rap and reinvented himself as a brokenhearted country crooner. That record was BigX’s highest-charting album to date, but …",
"duration_ms": null,
"genres": [
"Hip-Hop/Rap"
],
"id": "6827763091",
"is_explicit": true,
"label": "BigXthaPlug under exclusive license to UnitedMasters LLC",
"metrics": {
"track_count": 19
},
"platform": "applemusic",
"platform_specific": {
"applemusic": {
"audio_traits": [
"atmos",
"lossless",
"lossy-stereo"
],
"content_rating": "explicit",
"editorial_summary": "The Dallas MC returns to his Southern rap roots.",
"is_complete": true,
"is_mastered_for_itunes": false,
"is_prerelease": false,
"more_by_artist": [],
"other_versions": [],
"rank": 1,
"storefront": "us"
}
},
"released_at": "2026-11-02T00:00:00Z",
"title": "BETTER OVER TIME",
"tracks": [],
"type": "album",
"unknown_fields": [
"tracks",
"tracks[].artists",
"platform_specific.applemusic.more_by_artist"
],
"upc": "711209295424",
"url": "https://music.apple.com/us/album/better-over-time/6827763091"
},
{
"approximate_fields": [
"released_at"
],
"artist_name": "Drake",
"artists": [
{
"avatar_url": "https://is1-ssl.mzstatic.com/image/thumb/AMCArtistImages112/v4/1b/71/65/1b716513-b0c1-9c6b-45aa-cbb9198248cc/01607cf1-1d52-43d2-84ce-d6fc1f4a3475_ami-identity-7665599cc626d803af7956b3691905e7-2022-11-30T21-07-19.526Z_cropped.png/1825x1825bb.jpg",
"display_name": "Drake",
"id": "271256",
"is_verified": null,
"url": "https://music.apple.com/us/artist/drake/271256",
"username": null
}
],
"copyrights": [
{
"text": "℗ 2026 OVO, under exclusive license to Republic Records, a division of UMG Recordings, Inc.",
"type": "p"
}
],
"cover_url": "https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/bb/45/62/bb4562a3-45a2-539c-b557-a18ea060a476/26UMGIM63616.rgb.jpg/4500x4500bb.jpg",
"description": "& other nicknames I call my dear city",
"duration_ms": null,
"genres": [
"R&B/Soul"
],
"id": "6818209777",
"is_explicit": true,
"label": "OVO/Republic",
"metrics": {
"track_count": 24
},
"platform": "applemusic",
"platform_specific": {
"applemusic": {
"audio_traits": [
"lossless",
"lossy-stereo"
],
"content_rating": "explicit",
"editorial_summary": "The 2026 album, now with videos and four previously unreleased tracks.",
"is_complete": true,
"is_mastered_for_itunes": true,
"is_prerelease": false,
"more_by_artist": [],
"other_versions": [],
"rank": 2,
"storefront": "us"
}
},
"released_at": "2026-10-02T00:00:00Z",
"title": "HABIBTI (FOMO)",
"tracks": [],
"type": "album",
"unknown_fields": [
"tracks",
"tracks[].artists",
"platform_specific.applemusic.more_by_artist"
],
"upc": "00881061707059",
"url": "https://music.apple.com/us/album/habibti-fomo/6818209777"
},
{
"approximate_fields": [
"released_at"
],
"artist_name": "Olivia Rodrigo",
"artists": [
{
"avatar_url": "https://is1-ssl.mzstatic.com/image/thumb/AMCArtistImages221/v4/ba/36/7a/ba367a61-9f8a-8905-9dbd-7a99db6ee77b/ami-identity-5b05d351a6e3c7256ef7680c8aef2894-2026-06-12T04-01-34.107Z_cropped.png/972x972bb.jpg",
"display_name": "Olivia Rodrigo",
"id": "979458609",
"is_verified": null,
"url": "https://music.apple.com/us/artist/olivia-rodrigo/979458609",
"username": null
}
],
"copyrights": [
{
"text": "℗ 2026 Olivia Rodrigo, under exclusive license to Geffen Records",
"type": "p"
}
],
"cover_url": "https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/1d/1b/f9/1d1bf9b1-44c6-9a6c-6ffb-c158488c06ce/26UMGIM39303.rgb.jpg/4000x4000bb.jpg",
"description": "A pop savant raises her game and her standards on her third album. Olivia Rodrigo has loved and lost many times since she cried through the suburbs as the heartbroken teenager in “drivers license.” She’s grown up, and her standards have gotten higher—for a good love song, but als…",
"duration_ms": null,
"genres": [
"Pop"
],
"id": "1889992111",
"is_explicit": true,
"label": "Olivia Rodrigo PS",
"metrics": {
"track_count": 14
},
"platform": "applemusic",
"platform_specific": {
"applemusic": {
"audio_traits": [
"atmos",
"lossless",
"lossy-stereo"
],
"content_rating": "explicit",
"editorial_summary": "A pop savant raises her game and her standards on her third album.",
"is_complete": true,
"is_mastered_for_itunes": true,
"is_prerelease": false,
"more_by_artist": [],
"other_versions": [],
"rank": 3,
"storefront": "us"
}
},
"released_at": "2026-06-12T00:00:00Z",
"title": "you seem pretty sad for a girl so in love",
"tracks": [],
"type": "album",
"unknown_fields": [
"tracks",
"tracks[].artists",
"platform_specific.applemusic.more_by_artist"
],
"upc": "00199957777902",
"url": "https://music.apple.com/us/album/you-seem-pretty-sad-for-a-girl-so-in-love/1889992111"
}
],
"page": {
"has_more": true,
"next_cursor": "c1.EXAMPLE_CURSOR",
"next_cursor_expires_at": "2026-10-26T12:00:00Z",
"end_reason": null
},
"meta": {
"request_id": "req_3f9c2a7d1e8b4c6a9f0e2d4b6a8c0e1f",
"platform": "applemusic",
"source": "api",
"is_cached": false,
"credits_charged": 1,
"latency_ms": 336,
"fetched_at": "2026-10-25T12:00:00Z",
"input": null,
"credits_remaining": 9999,
"client_request_id": null,
"warnings": []
}
}import { SocialTap } from "socialtap";
const client = new SocialTap(); // apiKey defaults to process.env.SOCIALTAP_API_KEY
const res = await client.applemusic.topAlbums.list({ country: "US" });
console.log(res.data);
console.log(res.credits.charged, res.meta.request_id);import java.net.URI;
import java.net.URLEncoder;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
public class Main {
public static void main(String[] args) throws Exception {
String query = "country=" + encode("US");
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://socialtap.dev/v1/applemusic/top_albums?" + query))
.header("x-api-key", System.getenv("SOCIALTAP_API_KEY"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
// An error is {"error": {"code", "message", ...}}; success is {data, meta}, meta.credits_charged its price.
if (response.statusCode() >= 400) throw new RuntimeException(response.body());
System.out.println(response.body());
}
static String encode(String value) {
return URLEncoder.encode(value, StandardCharsets.UTF_8);
}
}using System.Text.Json;
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("x-api-key", Environment.GetEnvironmentVariable("SOCIALTAP_API_KEY"));
var query = string.Join("&",
"country=" + Uri.EscapeDataString("US"));
var res = await http.GetAsync("https://socialtap.dev/v1/applemusic/top_albums?" + query);
using var body = JsonDocument.Parse(await res.Content.ReadAsStringAsync());
if (!res.IsSuccessStatusCode)
{
var error = body.RootElement.GetProperty("error");
throw new Exception($"{error.GetProperty("code")}: {error.GetProperty("message")}");
}
Console.WriteLine(body.RootElement.GetProperty("data"));
Console.WriteLine(body.RootElement.GetProperty("meta").GetProperty("credits_charged"));// Cargo.toml: reqwest = { version = "0.12", features = ["blocking", "json"] }, serde_json = "1"
use std::env;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let res = reqwest::blocking::Client::new()
.get("https://socialtap.dev/v1/applemusic/top_albums")
.query(&[("country", "US")])
.header("x-api-key", env::var("SOCIALTAP_API_KEY")?)
.send()?;
let ok = res.status().is_success();
let body: serde_json::Value = res.json()?;
if !ok {
return Err(format!("{}: {}", body["error"]["code"], body["error"]["message"]).into());
}
println!("{} {}", body["data"], body["meta"]["credits_charged"]);
Ok(())
}200 OK · GET https://socialtap.dev/v1/applemusic/top_albumsLong arrays and strings are shortened here. Real responses are complete.Docs One schema on 2 platforms.
The response reference lists every field, its type and when it is null. See the full schema.
Null means unknown
A field Apple Music doesn't show is null, never zero or an empty string, so a real zero always means zero.
No input needed
Every parameter is optional: the plain request returns the default list.
Write one parser
Apple Music and Spotify answer in these fields, so the code that reads one reads them all.
platformstring- Platform ID (applemusic, spotify, soundcloud, …).
idstring- Platform-native album ID (string), the one in its page's URL.
urlstring- Canonical album page URL.
typestring- What kind of release it is, as the platform says: album, single, ep or compilation; null when the platform does not say. New values may be added; treat unknown values as album.
titlestring- The release's title as the platform shows it (with an edition or a suffix like "- Single" where it writes one).
descriptionstring- About the release, as plain text (the service's editorial notes, or what its uploader wrote); null when it has none or the platform shows none.
artist_namestring- Who the platform credits for the release, as one display string (it can name more people than have an account linked: artists holds the linked ones); null when the source does not name them.
artistsobject[]- The platform accounts of the artists credited on the release, main artist first, in the platform's order; [] when none is linked, as on a Various Artists compilation (listed in unknown_fields when the source cannot see them).
Live data from 33 platforms.
What teams build with the Apple Music Top Albums API.
Track the most played albums each day
Compare an album's rank across countries
Feed label dashboards with UPCs and labels
Spot new releases breaking into the chart
Good to know before you build.
- platform_specific.applemusic.rank is the row's place in the chart, top first, and stays the same whatever limit you ask for. Apple publishes no play counts, so the rank is all the chart says.
- tracks, more_by_artist and other_versions are [] and listed in unknown_fields, because a chart names no tracks. metrics.track_count says how many there are, and the Apple Music Album API lists them.
- Apple serves about 200 rows per chart, fewer in a few small stores, and the walk then ends with page.end_reason end: that is the whole chart.
- since and until filter by release date. A chart isn't in date order, so they don't end the walk early: every page is read and charged until the chart ends.
- Charts differ by store, and platform_specific.applemusic.storefront says which store answered. A store's titles can be in its own language: lang asks for another where Apple offers it, and a language it doesn't offer gets the store's own.
- The Apple Music Top Tracks API charts songs and music videos, and the Apple Music Top Playlists API playlists.
- When Apple's catalog API fails, the top of the chart comes from Apple's RSS feed and ends the walk with platform_limit: label, upc, description, track count, copyrights, audio formats and badges are null or [], type comes from the title alone (null where it doesn't say), and only the first artist is named. The feed has no languages, so a request with lang fails rather than answer in another.
1 credit per page. Failed requests are free.
Buy credits once and spend them on any endpoint, on any platform.
| Source | Price per successful page | Per 1,000 pages |
|---|---|---|
Platform API api | 1 credit | $0.75–$1.97 |
- Cache hits are free.
- Credits from packs and top-ups never expire.
- A monthly plan's credits are spent first, and what is left of them ends at each renewal.
- Prices exclude tax: sales tax is added at checkout where it applies.
- Outside the US, plans and packs are sold to businesses: checkout asks for your VAT, GST or other business tax ID.
Questions about the Apple Music Top Albums API.
More in the API reference.
How much does the Apple Music Top Albums API cost?
How do I get the next page?
See what's on the list right now.
Run it in the playground, or copy the request into your code.
- No credit card
- Failed requests are free
- Works on all 218 endpoints