MusicKit

Bring Apple Music's catalog and a person's library into your app.

Introduced
2017
WWDC17
Kind
Framework
Runs on
Get it from
iOS
15.0+
iPadOS
15.0+
Mac Catalyst
15.0+
macOS
12.0+
tvOS
15.0+
visionOS
1.0+
watchOS
8.0+

Overview

MusicKit lets your app search the Apple Music catalog, play songs and videos, read the library and create playlists, with the person's permission. It checks for a subscription and can offer a trial.

The Swift framework covers Apple platforms, the Apple Music API works from any server, and there are libraries for the web and Android.

Catalog

Search songs, albums, artists and playlists.

Playback

Play Apple Music and the local library.

Library

Add songs and create playlists with permission.

Everywhere

Swift, web, Android and the Apple Music API.

Search.swift
import MusicKit let status = await MusicAuthorization.request() guard status == .authorized else { return } var request = MusicCatalogSearchRequest( term: "Daft Punk", types: [Song.self] ) request.limit = 5 let response = try await request.response() for song in response.songs { print(song.title, song.artistName) }

History

How it grew up.

2017

Introduced

The Apple Music API and MusicKit for iOS.

2018

MusicKit JS

Apple Music playback comes to the web.

2021

MusicKit for Swift

A native Swift framework for Apple platforms.

2022

More content

Library access and the expanded Apple Music API.