Consola del desarrollador
Gracias por tu visita. Esta página solo está disponible en inglés.

Amazon Music Web API

Web API Player V1.0

Player

Methods for retrieving recent playback activity.

Get Current User's Recently Played Tracks

GET
/player/recentlyPlayed
Authorization Scope: [music::history]
Get tracks from the current Amazon Music user’s recently played tracks. Optional parameters can be used to limit the number of tracks returned.

Learn more about pagination.

Query Parameters

Name Data Type Required Description
limit number No The maximum number of tracks to return (default: 60). Minimum of 1, maximum of 60.
cursor string No The cursor/token for the page to continue pagination results from.

Example

curl --request GET '<base url>/player/recentlyPlayed?limit=2' \
--header 'x-api-key: <your security profile ID>' \
--header 'Authorization: Bearer <your auth token>'

Response

Amazon Music response object containing a response collection of the current users playlists.

Name Data Type Required Description
user Response Collection No Collection of recently played tracks by the current user

Example

{
  "data": {
    "user": {
      "id": "zqll6htnhyb2welrqsrtrhdvaa",
      "name": "Tony Starked",
      "url": "https://music.amazon.com/profiles/zqll6htnhyb2welrqsrtrhdvaa",
      "recentTrackPlayback": {
        "pageInfo": {
          "hasNextPage": true,
          "token": "1629502893999:3ae81437-f6ab-488c-b53d-590ede50cb4a"
        },
        "edgeCount": 2,
        "edges": [
          {
            "playedAt": "2022-03-29T09:29:32.376Z",
            "node": {
              "id": "B08C5GH2P9",
              "title": "West End Girls",
              "url": "https://music.amazon.com/albums/B08C5JCMKD/?trackAsin=B08C5GH2P9&do=play"
            }
          },
          {
            "playedAt": "2022-03-29T07:45:15.311Z",
            "node": {
              "id": "B000TEL8WQ",
              "title": "West End Girls (2001 - Remaster)",
              "url": "https://music.amazon.com/albums/B000TENNME/?trackAsin=B000TEL8WQ&do=play"
            }
          }
        ]
      }
    }
  }
}

Get Current User's Recently Played Entities

GET
/me/recentlyPlayedEntities
Authorization Scope: [music::history]
Get a list of entities recently played by the current Amazon Music user. Optional parameters can be used to limit the number of entities returned.

Learn more about pagination.

Query Parameters

Name Data Type Required Description
entityTypes enum(EntityType) No EntityTypes to be fetched.
limit number No The maximum number of entities to return (default: 100). Minimum of 1, maximum of 100.
cursor string No The cursor/token for the page to continue pagination results from.

EntityType

Enum

Album
Artist
Category
Playlist
PodcastEpisode
PodcastShow
Track
User

Example

curl --request GET '<base url>/v1/me/recentlyPlayedEntities' \
--header 'x-api-key: <your security profile ID>' \
--header 'Authorization: Bearer <your auth token>'

Responses

Amazon Music response object containing:

Name Data Type Required Description
user User No Data about the current Amazon Music user and their recently played entities

Example

(Some lines omitted for brevity)

{
  "data": {
    "user": {
      "id": "j6qncekh7w5vldgykxisqhup7q",
      "name": null,
      "url": "https://music.amazon.com/profiles/j6qncekh7w5vldgykxisqhup7q",
      "recentEntitiesPlayback": {
        "pageInfo": {
          "hasNextPage": true,
          "token": "000000000000001649747125758:ALBUM:B09J9ZRZC5"
        },
        "edgeCount": 5,
        "edges": [
          {
            "id": "recentlyPlayedId1",
            "playedDate": "2022-07-15T00:02:40.566Z",
            "node": {
              "_type": "Playlist",
              "id": "03263b84-88b4-4576-9050-cfce1cc9730a",
              "title": "New songs",
              "url": "https://music.amazon.com/my/playlists/c991116d-b8fa-4aa1-a88a-06afe4f6c852"
            }
          },
          {
            "id": "recentlyPlayedId2",
            "playedDate": "2022-07-15T00:02:40.566Z",
            "node": {
              "_type": "Album",
              "id": "B0847V9254",
              "title": "Changes",
              "url": "https://music.amazon.com/albums/B0847V9254"
            }
          },
          ...
          }
        ]
      }
    }
  }
}

Get User's Recently Played Entities

GET
/users/{id}/recentlyPlayedEntities
Authorization Scope: [music::catalog]
Get a list of entities recently played by a specified Amazon Music user. Optional parameters can be used to limit the number of entities returned.

Learn more about pagination.

Path Parameters

Name Data Type Required Description
id string Yes The requested user’s Amazon Music ID.

Query Parameters

Name Data Type Required Description
entityTypes enum(EntityType) No EntityTypes to be fetched.
limit number No The maximum number of entities to return (default: 100). Minimum of 1, maximum of 100.
cursor string No The cursor/token for the page to continue pagination results from.

EntityType

Enum

Album
Artist
Category
Playlist
PodcastEpisode
PodcastShow
Track
User

Example

curl --request GET '<base url>/v1/users/k35wo4lm34masdsadevrs7a/recentlyPlayedEntities' \
--header 'x-api-key: <your security profile ID>' \
--header 'Authorization: Bearer <your auth token>'

Responses

Amazon Music response object containing:

Name Data Type Required Description
user User No Data about the current Amazon Music user and their recently played entities

Example

(Some lines omitted for brevity)

{
  "data": {
    "user": {
      "id": "j6qncekh7w5vldgykxisqhup7q",
      "name": null,
      "url": "https://music.amazon.com/profiles/j6qncekh7w5vldgykxisqhup7q",
      "recentEntitiesPlayback": {
        "pageInfo": {
          "hasNextPage": true,
          "token": "000000000000001649747125758:ALBUM:B09J9ZRZC5"
        },
        "edgeCount": 5,
        "edges": [
          {
            "id": "recentlyPlayedId1",
            "playedDate": "2022-07-15T00:02:40.566Z",
            "node": {
              "_type": "Playlist",
              "id": "03263b84-88b4-4576-9050-cfce1cc9730a",
              "title": "New songs",
              "url": "https://music.amazon.com/my/playlists/c991116d-b8fa-4aa1-a88a-06afe4f6c852"
            }
          },
          {
            "id": "recentlyPlayedId2",
            "playedDate": "2022-07-15T00:02:40.566Z",
            "node": {
              "_type": "Album",
              "id": "B0847V9254",
              "title": "Changes",
              "url": "https://music.amazon.com/albums/B0847V9254"
            }
          },
          ...
          }
        ]
      }
    }
  }
}