---
title: "Get Recently Played Tracks"
method: GET
path: "/me/player/recently-played"
tags: ["Player"]
---

# Get Recently Played Tracks

`GET /me/player/recently-played`

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

## Query parameters

- `limit` integer — The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
- `after` integer — A Unix timestamp in milliseconds. Returns all items after (but not including) this cursor position. If `after` is specified, `before` must not be specified.
- `before` integer — 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 `200`

A paged set of tracks

- CursorPagingPlayHistoryObject
  - `cursors` CursorObject
    - `after` string — The cursor to use as key to find the next page of items.
    - `before` string — The cursor to use as key to find the previous page of items.
  - `href` string — A link to the Web API endpoint returning the full result of the request.
  - `limit` integer — The maximum number of items in the response (as set in the query or by default).
  - `next` string — URL to the next page of items. ( `null` if none)
  - `total` integer — The total number of items available to return.
  - `items` PlayHistoryObject[]
    - `context` ContextObject
      - `external_urls` ExternalUrlObject
        - `spotify` string — The [Spotify URL](/documentation/web-api/#spotify-uris-and-ids) for the object.
      - `href` string — A link to the Web API endpoint providing full details of the track.
      - `type` string — The object type, e.g. "artist", "playlist", "album", "show".
      - `uri` string — The [Spotify URI](/documentation/web-api/#spotify-uris-and-ids) for the context.
    - `played_at` string, date-time — The date and time the track was played.
    - `track` TrackObject
      - `album` SimplifiedAlbumObject
        - `album_type` 'album' | 'single' | 'compilation', required — The type of the album.
        - `available_markets` string[], required — The markets in which the album is available: [ISO 3166-1 alpha-2 country codes](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). _**NOTE**: an album is considered available in a market when at least 1 of its tracks is available in that market._
        - `external_urls` ExternalUrlObject, required
          - `spotify` string — The [Spotify URL](/documentation/web-api/#spotify-uris-and-ids) for the object.
        - `href` string, required — A link to the Web API endpoint providing full details of the album.
        - `id` string, required — The [Spotify ID](/documentation/web-api/#spotify-uris-and-ids) for the album.
        - `images` ImageObject[], required — The cover art for the album in various sizes, widest first.
          - `height` integer, nullable, required — The image height in pixels.
          - `url` string, required — The source URL of the image.
          - `width` integer, nullable, required — The image width in pixels.
        - `name` string, required — The name of the album. In case of an album takedown, the value may be an empty string.
        - `release_date` string, required — The date the album was first released.
        - `release_date_precision` 'year' | 'month' | 'day', required — The precision with which `release_date` value is known.
        - `restrictions` AlbumRestrictionObject
          - `reason` 'market' | 'product' | 'explicit' — The reason for the restriction. Albums may be restricted if the content is not available in a given market, to the user's subscription type, or when the user's account is set to not play explicit content. Additional reasons may be added in the future.
        - `total_tracks` integer, required — The number of tracks in the album.
        - `type` 'album', required — The object type.
        - `uri` string, required — The [Spotify URI](/documentation/web-api/#spotify-uris-and-ids) for the album.
        - `album_group` 'album' | 'single' | 'compilation' | 'appears_on' — The field is present when getting an artist's albums. Compare to album_type this field represents relationship between the artist and the album.
        - `artists` SimplifiedArtistObject[], required — The artists of the album. Each artist object includes a link in `href` to more detailed information about the artist.
          - `external_urls` ExternalUrlObject
            - `spotify` string — The [Spotify URL](/documentation/web-api/#spotify-uris-and-ids) for the object.
          - `href` string — A link to the Web API endpoint providing full details of the artist.
          - `id` string — The [Spotify ID](/documentation/web-api/#spotify-uris-and-ids) for the artist.
          - `name` string — The name of the artist.
          - `type` 'artist' — The object type.
          - `uri` string — The [Spotify URI](/documentation/web-api/#spotify-uris-and-ids) for the artist.
      - `artists` ArtistObject[] — The artists who performed the track. Each artist object includes a link in `href` to more detailed information about the artist.
        - `external_urls` ExternalUrlObject
          - `spotify` string — The [Spotify URL](/documentation/web-api/#spotify-uris-and-ids) for the object.
        - `followers` FollowersObject
          - `href` string, nullable — This will always be set to null, as the Web API does not support it at the moment.
          - `total` integer — The total number of followers.
        - `genres` string[] — A list of the genres the artist is associated with. If not yet classified, the array is empty.
        - `href` string — A link to the Web API endpoint providing full details of the artist.
        - `id` string — The [Spotify ID](/documentation/web-api/#spotify-uris-and-ids) for the artist.
        - `images` ImageObject[] — Images of the artist in various sizes, widest first.
          - `height` integer, nullable, required — The image height in pixels.
          - `url` string, required — The source URL of the image.
          - `width` integer, nullable, required — The image width in pixels.
        - `name` string — The name of the artist.
        - `popularity` integer — The popularity of the artist. The value will be between 0 and 100, with 100 being the most popular. The artist's popularity is calculated from the popularity of all the artist's tracks.
        - `type` 'artist' — The object type.
        - `uri` string — The [Spotify URI](/documentation/web-api/#spotify-uris-and-ids) for the artist.
      - `available_markets` string[] — A list of the countries in which the track can be played, identified by their [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code.
      - `disc_number` integer — The disc number (usually `1` unless the album consists of more than one disc).
      - `duration_ms` integer — The track length in milliseconds.
      - `explicit` boolean — Whether or not the track has explicit lyrics ( `true` = yes it does; `false` = no it does not OR unknown).
      - `external_ids` ExternalIdObject
        - `ean` string — [International Article Number](http://en.wikipedia.org/wiki/International_Article_Number_%28EAN%29)
        - `isrc` string — [International Standard Recording Code](http://en.wikipedia.org/wiki/International_Standard_Recording_Code)
        - `upc` string — [Universal Product Code](http://en.wikipedia.org/wiki/Universal_Product_Code)
      - `external_urls` ExternalUrlObject
        - `spotify` string — The [Spotify URL](/documentation/web-api/#spotify-uris-and-ids) for the object.
      - `href` string — A link to the Web API endpoint providing full details of the track.
      - `id` string — The [Spotify ID](/documentation/web-api/#spotify-uris-and-ids) for the track.
      - `is_local` boolean — Whether or not the track is from a local file.
      - `is_playable` boolean — Part of the response when [Track Relinking](/documentation/general/guides/track-relinking-guide/) is applied. If `true`, the track is playable in the given market. Otherwise `false`.
      - `linked_from` LinkedTrackObject
        - `external_urls` ExternalUrlObject
          - `spotify` string — The [Spotify URL](/documentation/web-api/#spotify-uris-and-ids) for the object.
        - `href` string — A link to the Web API endpoint providing full details of the track.
        - `id` string — The [Spotify ID](/documentation/web-api/#spotify-uris-and-ids) for the track.
        - `type` string — The object type: "track".
        - `uri` string — The [Spotify URI](/documentation/web-api/#spotify-uris-and-ids) for the track.
      - `name` string — The name of the track.
      - `popularity` integer — The popularity of the track. The value will be between 0 and 100, with 100 being the most popular.<br/>The popularity of a track is a value between 0 and 100, with 100 being the most popular. The popularity is calculated by algorithm and is based, in the most part, on the total number of plays the track has had and how recent those plays are.<br/>Generally speaking, songs that are being played a lot now will have a higher popularity than songs that were played a lot in the past. Duplicate tracks (e.g. the same track from a single and an album) are rated independently. Artist and album popularity is derived mathematically from track popularity. _**Note**: the popularity value may lag actual popularity by a few days: the value is not updated in real time._
      - `preview_url` string — A link to a 30 second preview (MP3 format) of the track. Can be `null`
      - `restrictions` TrackRestrictionObject
        - `reason` string — The reason for the restriction. Supported values: - `market` - The content item is not available in the given market. - `product` - The content item is not available for the user's subscription type. - `explicit` - The content item is explicit and the user's account is set to not play explicit content. Additional reasons may be added in the future. **Note**: If you use this field, make sure that your application safely handles unknown values.
      - `track_number` integer — The number of the track. If an album has several discs, the track number is the number on the specified disc.
      - `type` 'track' — The object type: "track".
      - `uri` string — The [Spotify URI](/documentation/web-api/#spotify-uris-and-ids) for the track.

## Other responses

- `401` — Bad or expired token. This can happen if the user revoked a token or the access token has expired. You should re-authenticate the user.
- `403` — Bad OAuth request (wrong consumer key, bad nonce, expired timestamp...). Unfortunately, re-authenticating the user won't help here.
- `429` — The app has exceeded its rate limits.

---

[API](https://skmtc.net/spotify/apis/sonallux.md) · [All operations](https://skmtc.net/spotify/apis/sonallux/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spotify/sonallux/versions/1459b27f2e48/schema)
