MusicKit

MusicKit lets users play Apple Music and their local music library from your app or website. When users provide permission to access their Apple Music account, they can use your app or website to create playlists, add songs to their library, and play any of the millions of songs in the Apple Music catalog. If your app detects that the user is not yet an Apple Music member, you can offer a trial from within your app.

Apple Music API

Use the Apple Music API to retrieve information about albums, songs, artists, playlists, music videos, Apple Music stations, ratings, charts, recommendations, and the user’s most recently played content. With proper authorization from the user, you can also create or modify playlists and apply ratings to the user’s content. The API can be used with iOS apps, Android apps, and websites.

Get started. To communicate with the Apple Music service, you’ll need to create a MusicKit identifier and private key to sign your developer tokens using Certificates, Identifiers & Profiles in your Apple Developer Program account.

Learn more

Request Music Data with the Apple Music API. Let your app search for songs, playlists, artists, and more. Your app can even request music we think your users will love.

Learn about the Apple Music API

iOS Apps

Get details on how to build iOS apps that integrate Apple Music using the Apple Music API, as well as the StoreKit and MediaPlayer frameworks.

Authorize Apple Music with StoreKit. Check if a user has an Apple Music membership to automatically play music, or let them start a trial membership directly within your app.

Learn about StoreKit

Control Playback with MediaPlayer. Play any song from Apple Music and access a user’s music library, with their permission.

Learn about MediaPlayer

New

Android Apps

MusicKit for Android lets you build native Apple Music features into your Android app. Libraries are available to let users sign in to their Apple Music account and play music directly from your app.

Download the MusicKit SDK for Android

Authentication for Apple Music. The Authentication library provides a way to get access tokens to play music or make calls to the MusicKit Web APIs. This library prompts the user to sign in to Apple Music and, if Apple Music isn’t installed on the device, helps the user download it before returning to your app.

Learn more about Authentication on Android

Media Playback for Apple Music. The Media Playback library can be used to play songs, albums, and playlists on Apple Music without leaving your app. Your app can also control music playback from the lock screen or the background.

Learn more about Media Playback on Android

Websites

Songs from Apple Music can play directly in the browser. With the Apple Music player, users can stream songs from Apple Music in your website using the default player or one you’ve customized. Add an Apple Music player to your website using JavaScript.

Learn more about MusicKit JS