Skip to content
DocumentationAPI Reference

Get Current User's Playlists

PlaylistListPage me().playlists().list(PlaylistListParamsparams = PlaylistListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/me/playlists

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

ParametersExpand Collapse
PlaylistListParams params
Optional<Long> limit

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

minimum1
maximum50
Optional<Long> offset

'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:
Optional<String> id

The Spotify ID for the playlist.

Optional<Boolean> collaborative

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

Optional<String> description

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

Optional<ExternalUrlObject> externalUrls

Known external URLs for this playlist.

Optional<Boolean> published

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

Optional<String> spotify

The Spotify URL for the object.

Optional<String> href

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

Optional<List<ImageObject>> images

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.

Optional<Long> height

The image height in pixels.

String url

The source URL of the image.

Optional<Long> width

The image width in pixels.

Optional<Boolean> published

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

Optional<String> name

The name of the playlist.

Optional<Owner> owner

The user who owns the playlist

Optional<String> displayName

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

Optional<Boolean> published

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

Optional<String> snapshotId

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

Optional<PlaylistTracksRefObject> tracks

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.

Optional<String> href

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

Optional<Boolean> published

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

Optional<Long> total

Number of tracks in the playlist.

Optional<String> type

The object type: "playlist"

Optional<String> uri

The Spotify URI for the playlist.

Get Current User's Playlists

package dev.cjav.spotted.example;

import dev.cjav.spotted.client.SpottedClient;
import dev.cjav.spotted.client.okhttp.SpottedOkHttpClient;
import dev.cjav.spotted.models.me.playlists.PlaylistListPage;
import dev.cjav.spotted.models.me.playlists.PlaylistListParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        SpottedClient client = SpottedOkHttpClient.fromEnv();

        PlaylistListPage page = client.me().playlists().list();
    }
}
{
  "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
}