Web Service Endpoint

Get Multiple Library Albums

Fetch one or more library albums by using their identifiers.

URL

GET https://api.music.apple.com/v1/me/library/albums

Query Parameters

ids
[string]
(Required)

The unique identifiers for the library albums. The maximum fetch limit is 100.

l
string

The localization to use, specified by a language tag. The possible values are in the supportedLanguageTags array belonging to the Storefront object specified by storefront. Otherwise, the storefront’s defaultLanguageTag is used.

include
[string]

Additional relationships to include in the fetch.

Response Codes

OK

The request was successful.

Discussion

If successful, the HTTP status code is 200 (OK) and the data array in the ResponseRoot object contains an array of LibraryAlbum objects. If unsuccessful, the HTTP status code indicates the error and the details are in the errors array. See Handle a Response.

This endpoint requires a music user token. See Getting Keys and Creating Tokens.

Example

https://api.music.apple.com/v1/me/library/albums?ids=l.424stuk,l.JWErW12
{ "data": [ { "attributes": { "artistName": "Lana Del Rey", "artwork": { "height": 1200, "url": "https://example.mzstatic.com/image/thumb/Music2/v4/54/d5/76/54d5765e-8bc2-af71-483e-5a5fb5597c61/UMG_cvrart_00602537865659_01_RGB72_1500x1500_14UMGIM20562.jpeg/{w}x{h}bb.jpeg", "width": 1200 }, "name": "Ultraviolence (Deluxe)", "playParams": { "id": "l.424stuk", "isLibrary": true, "kind": "album" }, "trackCount": 0 }, "href": "/v1/me/library/albums/l.424stuk", "id": "l.424stuk", "type": "library-albums" }, { "attributes": { "artistName": "Sam Smith", "artwork": { "height": 1200, "url": "https://example.mzstatic.com/image/thumb/Music4/v4/e7/55/fa/e755fa2b-01c4-3c6d-1788-fa15ba1eabe8/UMG_cvrart_00602537780211_01_RGB72_1500x1500_13UAEIM58958.jpeg/{w}x{h}bb.jpeg", "width": 1200 }, "name": "In the Lonely Hour (Deluxe Version)", "playParams": { "id": "l.JWErW12", "isLibrary": true, "kind": "album" }, "trackCount": 0 }, "href": "/v1/me/library/albums/l.JWErW12", "id": "l.JWErW12", "type": "library-albums" } ]}

See Also

Requesting User Library Albums

Get a Library Album

Fetch a library album by using its identifier.

Get a Library Album's Relationship Directly by Name

Fetch a library album's relationship by using its identifier.

Get All Library Albums

Fetch all the library albums in alphabetical order.