Skip to content
DocumentationAPI Reference

Get Current User's Playlists

me.playlists.list(PlaylistListParams**kwargs) -> SyncCursorURLPage[SimplifiedPlaylistObject]
GET/me/playlists

Get a list of the playlists owned or followed by the current Spotify user.

ParametersExpand Collapse
limit: Optional[int]

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

minimum1
maximum50
offset: Optional[int]

'The index of the first playlist to return. Default: 0 (the first object). Maximum offset: 100.000. Use with limit to get the next set of playlists.'

ReturnsExpand Collapse
class SimplifiedPlaylistObject:
id: Optional[str]

The Spotify ID for the playlist.

collaborative: Optional[bool]

true if the owner allows other users to modify the playlist.

description: Optional[str]

The playlist description. Only returned for modified, verified playlists, otherwise null.

external_urls: Optional[ExternalURLObject]

Known external URLs for this playlist.

published: Optional[bool]

The playlist's public/private status (if it should be added to the user's profile or not): true the playlist will be public, false the playlist will be private, null the playlist status is not relevant. For more about public/private status, see Working with Playlists

spotify: Optional[str]

The Spotify URL for the object.

href: Optional[str]

A link to the Web API endpoint providing full details of the playlist.

images: Optional[List[ImageObject]]

Images for the playlist. The array may be empty or contain up to three images. The images are returned by size in descending order. See Working with Playlists. Note: If returned, the source URL for the image (url) is temporary and will expire in less than a day.

height: Optional[int]

The image height in pixels.

url: str

The source URL of the image.

width: Optional[int]

The image width in pixels.

published: Optional[bool]

The playlist's public/private status (if it should be added to the user's profile or not): true the playlist will be public, false the playlist will be private, null the playlist status is not relevant. For more about public/private status, see Working with Playlists

name: Optional[str]

The name of the playlist.

owner: Optional[Owner]

The user who owns the playlist

display_name: Optional[str]

The name displayed on the user's profile. null if not available.

published: Optional[bool]

The playlist's public/private status (if it should be added to the user's profile or not): true the playlist will be public, false the playlist will be private, null the playlist status is not relevant. For more about public/private status, see Working with Playlists

snapshot_id: Optional[str]

The version identifier for the current playlist. Can be supplied in other requests to target a specific playlist version

tracks: Optional[PlaylistTracksRefObject]

A collection containing a link ( href ) to the Web API endpoint where full details of the playlist's tracks can be retrieved, along with the total number of tracks in the playlist. Note, a track object may be null. This can happen if a track is no longer available.

href: Optional[str]

A link to the Web API endpoint where full details of the playlist's tracks can be retrieved.

published: Optional[bool]

The playlist's public/private status (if it should be added to the user's profile or not): true the playlist will be public, false the playlist will be private, null the playlist status is not relevant. For more about public/private status, see Working with Playlists

total: Optional[int]

Number of tracks in the playlist.

type: Optional[str]

The object type: "playlist"

uri: Optional[str]

The Spotify URI for the playlist.

Get Current User's Playlists

import os
from spotted import Spotted

client = Spotted(
    access_token=os.environ.get("SPOTIFY_ACCESS_TOKEN"),  # This is the default and can be omitted
)
page = client.me.playlists.list()
page = page.items[0]
print(page.id)
{
  "href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
  "limit": 20,
  "next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
  "offset": 0,
  "previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
  "total": 4,
  "items": [
    {
      "id": "id",
      "collaborative": true,
      "description": "description",
      "external_urls": {
        "published": true,
        "spotify": "spotify"
      },
      "href": "href",
      "images": [
        {
          "height": 300,
          "url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
          "width": 300,
          "published": true
        }
      ],
      "name": "name",
      "owner": {
        "id": "id",
        "external_urls": {
          "published": true,
          "spotify": "spotify"
        },
        "href": "href",
        "published": true,
        "type": "user",
        "uri": "uri",
        "display_name": "display_name"
      },
      "published": true,
      "snapshot_id": "snapshot_id",
      "tracks": {
        "href": "href",
        "published": true,
        "total": 0
      },
      "type": "type",
      "uri": "uri"
    }
  ],
  "published": true
}
Returns Examples
{
  "href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
  "limit": 20,
  "next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
  "offset": 0,
  "previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
  "total": 4,
  "items": [
    {
      "id": "id",
      "collaborative": true,
      "description": "description",
      "external_urls": {
        "published": true,
        "spotify": "spotify"
      },
      "href": "href",
      "images": [
        {
          "height": 300,
          "url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
          "width": 300,
          "published": true
        }
      ],
      "name": "name",
      "owner": {
        "id": "id",
        "external_urls": {
          "published": true,
          "spotify": "spotify"
        },
        "href": "href",
        "published": true,
        "type": "user",
        "uri": "uri",
        "display_name": "display_name"
      },
      "published": true,
      "snapshot_id": "snapshot_id",
      "tracks": {
        "href": "href",
        "published": true,
        "total": 0
      },
      "type": "type",
      "uri": "uri"
    }
  ],
  "published": true
}