Apple APImusic.apple.com ↗
Extract track URLs from any public Apple Music playlist. Get paginated results with total_items, total_pages, and per-track item_url fields.
What is the Apple API?
The Apple Music Playlist API exposes 1 endpoint — get_playlist_tracks — that returns all track URLs from a public Apple Music playlist as a paginated list. Each response includes an items array with individual item_url fields pointing to song pages on Apple Music, plus total_items and total_pages for navigating large collections. Pass any public playlist URL and control output size with page and limit parameters.
curl -X GET 'https://api.parse.bot/scraper/36381a7e-0090-42ea-8c91-6603ff46e20a/get_playlist_tracks?playlist_url=https%3A%2F%2Fmusic.apple.com%2Fch%2Fplaylist%2Foo%25C4%25B1%2Fpl.u-55D6ZNKiXYMJ2Wp' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace music-apple-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Apple Music Playlist API — list tracks from a public playlist."""
from parse_apis.music_apple_com_api import AppleMusic, InputFormatInvalid
client = AppleMusic()
playlist = "https://music.apple.com/ch/playlist/oo%C4%B1/pl.u-55D6ZNKiXYMJ2Wp"
# Fetch the first few tracks from a playlist, capped at 5 total items.
try:
for track in client.tracks.list(playlist_url=playlist, limit=5):
print(track.item_url)
except InputFormatInvalid as e:
print("Bad playlist URL:", e.message)
# Use .first() to grab just the leading track without iterating.
first_track = client.tracks.list(playlist_url=playlist, limit=1).first()
if first_track is not None:
print("First track:", first_track.item_url)
print("exercised: tracks.list")
Extracts track URLs from a public Apple Music playlist. Returns paginated results with item_url for each track. All tracks are fetched in a single upstream request; pagination is applied locally over the full track list. Each item_url points to the song on Apple Music (in album-context format with ?i=songId).
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for local pagination over the track list. |
| limit | integer | Maximum tracks per page, between 1 and 100. |
| playlist_urlrequired | string | Full Apple Music playlist URL, e.g. https://music.apple.com/ch/playlist/ooı/pl.u-55D6ZNKiXYMJ2Wp |
{
"type": "object",
"fields": {
"page": "current page number",
"items": "array of objects, each with an item_url string linking to the song on Apple Music",
"has_more": "boolean indicating whether more pages follow",
"total_items": "total number of tracks in the playlist",
"total_pages": "total number of pages given the current limit"
},
"sample": {
"data": {
"page": 1,
"items": [
{
"item_url": "https://music.apple.com/ch/album/take-a-guess-feat-aceii-milkreset/1803141796?i=1803141798"
},
{
"item_url": "https://music.apple.com/ch/album/outside/1698813052?i=1698813055"
}
],
"has_more": true,
"total_items": 28,
"total_pages": 3
},
"status": "success"
}
}About the Apple API
What the Endpoint Returns
get_playlist_tracks accepts a full Apple Music playlist URL via the playlist_url parameter and returns the complete track list for that playlist. The response includes an items array where each entry contains an item_url — a direct link to the song on Apple Music in its album context. Alongside the track list, the response provides total_items (the full count of tracks in the playlist), total_pages, page (current page), and has_more (a boolean indicating whether additional pages exist).
Pagination Behavior
All tracks are fetched in a single request to the source; pagination is then applied locally over that full list. The limit parameter accepts an integer between 1 and 100 to control how many tracks appear per page, and page selects which slice to return. This means total_items and total_pages are always accurate to the full playlist regardless of the page you request. If has_more is false, you are on the last page.
Input Requirements and Constraints
The only required input is playlist_url, which must be a full Apple Music URL in the format https://music.apple.com/{storefront}/playlist/{name}/{id}. The endpoint works with public playlists; private or user-library playlists that require an authenticated Apple Music session are not accessible. The storefront segment of the URL (e.g., ch, us) is part of the URL but does not affect which tracks are returned.
The Apple API is a managed, monitored endpoint for music.apple.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when music.apple.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official music.apple.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Mirror an Apple Music playlist into a local database by collecting all
item_urlvalues across paginated responses. - Build a playlist comparison tool by extracting
total_itemsand track URLs from two playlists and diffing the results. - Generate a shareable track list from a curated Apple Music playlist by iterating pages until
has_moreis false. - Monitor playlist changes over time by periodically fetching
total_itemsand comparing track URLs between runs. - Export Apple Music playlist track links into a spreadsheet or CMS for editorial or curation workflows.
- Seed a recommendation engine with track URLs sourced from genre or mood playlists on Apple Music.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Apple Music have an official developer API?+
What exactly is returned in the `items` array?+
items contains a single field: item_url, a string linking directly to the song on Apple Music. No additional track metadata such as title, artist, duration, or ISRC is included in the current response shape.Does the API return track metadata like artist name, song title, or album art?+
item_url per track, along with pagination fields (page, total_items, total_pages, has_more). You can fork this API on Parse and revise it to extract additional metadata fields from each track URL.Can this API access private or personal Apple Music playlists?+
How does pagination work when the playlist has fewer tracks than the default limit?+
limit, the response returns all tracks on page 1, total_pages equals 1, and has_more is false. The total_items count will reflect the actual number of tracks in the playlist.