Apple Music API

A web service for searching the Apple Music catalog and working with a user's personal music library.

Introduced
2017
WWDC17
Kind
Service
Runs on
Get it from
Apple Developer Program
iOS
iPadOS
Mac Catalyst
macOS
tvOS
visionOS
watchOS

Overview

Apple Music API is a web service for information about media in the Apple Music catalog and in a user's iCloud Music Library. It returns albums, songs, artists, playlists, music videos, stations, ratings, charts, recommendations and recently played content. With the user's authorization, apps can also create or modify playlists and apply ratings.

Every request carries a developer token, a JSON Web Token signed with ES256 using a MusicKit private key from your developer account. Requests for personal data also need a Music User Token. Apple says the API is available for Apple platforms, Android and the web; on Apple platforms, Apple recommends MusicKit for Swift, which can generate tokens automatically.

Catalog access

Fetch albums, songs, artists, playlists, music videos and stations from Apple Music.

Personal library

With a Music User Token, read a user's iCloud Music Library, history and recommendations.

Playlists and ratings

With user authorization, create or modify playlists and rate the user's content.

Search and charts

Search the catalog or library, and get charts of popular albums, songs and videos.

charts.sh
curl -H 'Authorization: Bearer [developer token]' \ "https://api.music.apple.com/v1/catalog/us/charts?types=playlists&with=dailyGlobalTopCharts,cityCharts"

History

How it grew up.

2017

API introduced

Apple Music API is introduced at WWDC17 in the Introducing MusicKit session.

2021

Search suggestions

A new /search/suggestions endpoint replaces /search/hints and adds typeahead top results.

2022

Artist artwork

Artist resources gain an artwork attribute, replacing plain silhouettes.