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.

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.

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.

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.