Apple Music Library API

Authenticated user library resources

Operations 8

GET /me/library/songs Get the user's library songs
GET /me/library/albums Get the user's library albums
GET /me/library/artists Get the user's library artists
GET /me/library/playlists Get the user's library playlists
POST /me/library/playlists Create a new library playlist
GET /me/library/search Search the user's library
GET /me/recommendations Get personalized recommendations for the user
GET /me/recent/played Get the user's recently played resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/apple-music-library-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

apple-music-library-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Apple Music Catalog Library API
  version: '1.0'
  description: 'REST API for the Apple Music catalog and the authenticated user''s library.

    Catalog endpoints (songs, albums, artists, music videos, playlists,

    stations, search, charts) require an Apple Developer JWT in the

    Authorization header. User-library endpoints additionally require a

    Music User Token in the Music-User-Token header.

    '
  contact:
    name: Apple Developer Documentation
    url: https://developer.apple.com/documentation/applemusicapi
servers:
- url: https://api.music.apple.com/v1
  description: Apple Music API v1
security:
- DeveloperToken: []
tags:
- name: Library
  description: Authenticated user library resources
paths:
  /me/library/songs:
    get:
      tags:
      - Library
      summary: Get the user's library songs
      responses:
        '200':
          description: OK
      security:
      - DeveloperToken: []
        MusicUserToken: []
  /me/library/albums:
    get:
      tags:
      - Library
      summary: Get the user's library albums
      responses:
        '200':
          description: OK
      security:
      - DeveloperToken: []
        MusicUserToken: []
  /me/library/artists:
    get:
      tags:
      - Library
      summary: Get the user's library artists
      responses:
        '200':
          description: OK
      security:
      - DeveloperToken: []
        MusicUserToken: []
  /me/library/playlists:
    get:
      tags:
      - Library
      summary: Get the user's library playlists
      responses:
        '200':
          description: OK
      security:
      - DeveloperToken: []
        MusicUserToken: []
    post:
      tags:
      - Library
      summary: Create a new library playlist
      responses:
        '201':
          description: Created
      security:
      - DeveloperToken: []
        MusicUserToken: []
  /me/library/search:
    get:
      tags:
      - Library
      summary: Search the user's library
      parameters:
      - name: term
        in: query
        required: true
        schema:
          type: string
      - name: types
        in: query
        schema:
          type: string
      responses:
        '200':
          description: OK
      security:
      - DeveloperToken: []
        MusicUserToken: []
  /me/recommendations:
    get:
      tags:
      - Library
      summary: Get personalized recommendations for the user
      responses:
        '200':
          description: OK
      security:
      - DeveloperToken: []
        MusicUserToken: []
  /me/recent/played:
    get:
      tags:
      - Library
      summary: Get the user's recently played resources
      responses:
        '200':
          description: OK
      security:
      - DeveloperToken: []
        MusicUserToken: []
components:
  securitySchemes:
    DeveloperToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Apple Music developer token (JWT) generated from a Music Key in the

        Apple Developer account.

        '
    MusicUserToken:
      type: apiKey
      in: header
      name: Music-User-Token
      description: 'Music User Token obtained via MusicKit on a signed-in device. Required

        for user-library endpoints.

        '