Web Service Endpoint

Get Recently Played Resources

Fetch the recently played resources for the user.

URL

GET https://api.music.apple.com/v1/me/recent/played

Query Parameters

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.

limit
integer

The limit on the number of objects, or number of objects in the specified relationship, that are returned.

offset
integer

The next page or group of objects to 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 Resource 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/recent/played
{ "data": [ { "attributes": { "artistName": "John Denver", "artwork": { "bgColor": "bfc388", "height": 600, "textColor1": "281b16", "textColor2": "362419", "textColor3": "463c2d", "textColor4": "52432f", "url": "https://example.mzstatic.com/image/thumb/Music/v4/f0/db/25/f0db2586-691b-2aca-e091-f08ff7fb9794/source/{w}x{h}bb.jpeg", "width": 603 }, "copyright": "\u2117 This compilation (P) 2005 SONY BMG MUSIC ENTERTAINMENT", "genreNames": [ "Country", "Music", "Singer/Songwriter", "Folk-Rock", "Rock", "Psychedelic", "Pop", "Pop/Rock", "Singer/ Songwriter", "Soft Rock" ], "isComplete": true, "isMasteredForItunes": false, "isSingle": false, "name": "John Denver's Greatest Hits", "playParams": { "id": "251043523", "kind": "album" }, "recordLabel": "RCA/Legacy", "releaseDate": "1973", "trackCount": 14, "url": "https://itunes.apple.com/us/album/john-denvers-greatest-hits/251043523" }, "href": "/v1/catalog/us/albums/251043523", "id": "251043523", "type": "albums" }, { "attributes": { "artwork": { "bgColor": "000000", "height": 1080, "textColor1": "cddeb6", "textColor2": "d2d2bd", "textColor3": "a4b291", "textColor4": "a8a897", "url": "https://example.mzstatic.com/image/thumb/Features71/v4/b1/6e/dc/b16edc23-1868-d55a-a0a6-5f2a0afedcbf/source/{w}x{h}{c}.jpeg", "width": 4320 }, "durationInMillis": 6917000, "editorialNotes": { "name": "9/22/16: Kings Of Leon", "short": "The Nashville band chat with Zane.", "standard": "The Nashville band chat with Zane." }, "isLive": false, "name": "9/22/16: Kings Of Leon", "playParams": { "id": "ra.1155929564", "kind": "radioStation" }, "url": "https://itunes.apple.com/us/station/9-22-16-kings-of-leon/ra.1155929564" }, "href": "/v1/catalog/us/stations/ra.1155929564", "id": "ra.1155929564", "type": "stations" }, { "attributes": { "artwork": { "bgColor": "31baa2", "height": 1080, "textColor1": "161616", "textColor2": "161616", "textColor3": "1c3732", "textColor4": "1c3732", "url": "https://example.mzstatic.com/image/thumb/Features30/v4/f0/fe/d7/f0fed768-90ee-42a3-2604-0a7917dfb0b7/source/{w}x{h}{c}.jpeg", "width": 4320 }, "durationInMillis": 0, "editorialNotes": { "name": "Bloomberg Radio", "short": "The latest business, financial and global news 24/7." }, "isLive": true, "name": "Bloomberg Radio", "playParams": { "id": "ra.1120787160", "kind": "radioStation" }, "url": "https://itunes.apple.com/us/station/bloomberg-radio/ra.1120787160" }, "href": "/v1/catalog/us/stations/ra.1120787160", "id": "ra.1120787160", "type": "stations" }, { "attributes": { "artistName": "Deerhunter", "artwork": { "bgColor": "131313", "height": 1227, "textColor1": "eaeaea", "textColor2": "cbcbcb", "textColor3": "bfbfbf", "textColor4": "a6a6a6", "url": "https://example.mzstatic.com/image/thumb/Music/v4/cd/24/27/cd2427cb-0225-c3ed-3048-23bd123957fe/source/{w}x{h}bb.jpeg", "width": 1350 }, "copyright": "\u2117 2010 4AD", "editorialNotes": { "short": "Luminous garage rock from experts of modern noir. ", "standard": "Deerhunter\u2019s dark, dreamy indie rock reached its crest on their fifth album, <i>Halcyon Digest</i>. Marrying punk grit with the romantic lilt of doo-wop ballads and early '60s pop, the band created a kind of modern noir\u2014seductive and mysterious but alluringly rough around the edges. Songs like \u201cRevival\u201d and \u201cMemory Boy\u201d ring out like a basement-dwelling version of The Byrds; \u201cBasement Scene\u201d is their \u201cLa Bamba\u201d\u2014a fascinating take on the past by one of the present\u2019s most unusual indie rock bands. " }, "genreNames": [ "Alternative", "Music", "Rock", "Prog-Rock/Art Rock", "Indie Rock", "Adult Alternative" ], "isComplete": true, "isMasteredForItunes": false, "isSingle": false, "name": "Halcyon Digest", "playParams": { "id": "387922299", "kind": "album" }, "recordLabel": "4AD", "releaseDate": "2010-09-28", "trackCount": 11, "url": "https://itunes.apple.com/us/album/halcyon-digest/387922299" }, "href": "/v1/catalog/us/albums/387922299", "id": "387922299", "type": "albums" } ], "href": "/v1/me/recent/played"}

See Also

Requesting Historical Information

Get Heavy Rotation Content

Fetch the resources in heavy rotation for the user.

Get Recently Played Stations

Fetch recently played radio stations for the user.

Get Recently Added Resources

Fetch the resources recently added to the library.