Player

Get Recently Played Tracks

Changed on

Get tracks from the current user's recently played tracks. Note: Currently doesn't support podcast episodes.

get/me/player/recently-played

Request

  • Base URL
    https://api.spotify.com/v1
  • URL
    https://api.spotify.com/v1/me/player/recently-played
  • Auth
    OAuth 2
    Authorization code: https://accounts.spotify.com/authorize
    Token URL: https://accounts.spotify.com/api/token scopes: user-read-recently-played

Query parameters

limitinteger

The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.

Example:10
afterinteger

A Unix timestamp in milliseconds. Returns all items after (but not including) this cursor position. If after is specified, before must not be specified.

Example:1484811043508
beforeinteger

A Unix timestamp in milliseconds. Returns all items before (but not including) this cursor position. If before is specified, after must not be specified.

Response

A paged set of tracks

hrefstring

A link to the Web API endpoint returning the full result of the request.

limitinteger

The maximum number of items in the response (as set in the query or by default).

nextstring

URL to the next page of items. ( null if none)

totalinteger

The total number of items available to return.

Example response

{
  "items": [
    {
      "track": {
        "album": {
          "album_type": "compilation",
          "total_tracks": 9,
          "available_markets": [
            "CA",
            "BR",
            "IT"
          ],
          "id": "2up3OPMp9Tb4dAKM2erWXQ",
          "images": [
            {
              "url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
              "height": 300,
              "width": 300
            }
          ],
          "release_date": "1981-12",
          "release_date_precision": "year",
          "uri": "spotify:album:2up3OPMp9Tb4dAKM2erWXQ"
        }
      }
    }
  ]
}

Changes

    • info

      response property allOf[subschema #2]/items/items/track/allOf[TrackObject]/external_ids reactivated

    • info

      response property allOf[subschema #2]/items/items/track/allOf[TrackObject]/album/allOf[SimplifiedAlbumObject]/allOf[AlbumBase]/available_markets deprecated

    • info

      response property allOf[subschema #2]/items/items/track/allOf[TrackObject]/available_markets deprecated

    • info

      response property allOf[subschema #2]/items/items/track/allOf[TrackObject]/external_ids deprecated

    • info

      response property allOf[subschema #2]/items/items/track/allOf[TrackObject]/linked_from deprecated

    • info

      response property allOf[subschema #2]/items/items/track/allOf[TrackObject]/popularity deprecated