Get a list of the playlists owned or followed by a Spotify user.
Endpoint
GET https://api.spotify.com/v1/users/{user_id}/playlists
Request Parameters
| Path parameter | Value |
|---|---|
| user_id | The user's Spotify user ID. |
| Header field | Value |
|---|---|
Authorization | Required. A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. Private playlists are only retrievable for the current user and requires the playlist-read-private scope to have been authorized by the user. Note that a user's collaborative playlists are not currently retrievable. |
| Query parameter | Value |
|---|---|
| limit | Optional. The maximum number of playlists to return. Default: 20. Minimum: 1. Maximum: 50. |
| offset | Optional. The index of the first playlist to return. Default: 0 (the first object). Use with limit to get the next set of playlists. |
Response Format
On success, the HTTP status code in the response header is 200 OK and the response body contains an array of simplified playlist objects (wrapped in a paging object) in JSON format. On error, the header status code is an error code and the response body contains an error object.
Example
curl -X GET "https://api.spotify.com/v1/users/wizzler/playlists" -H "Authorization: Bearer {your access token}"
{
"href": "https://api.spotify.com/v1/users/wizzler/playlists",
"items": [ {
"collaborative": false,
"external_urls": {
"spotify": "http://open.spotify.com/user/wizzler/playlists/53Y8wT46QIMz5H4WQ8O22c"
},
"href": "https://api.spotify.com/v1/users/wizzler/playlists/53Y8wT46QIMz5H4WQ8O22c",
"id": "53Y8wT46QIMz5H4WQ8O22c",
"images" : [ ],
"name": "Wizzlers Big Playlist",
"owner": {
"external_urls": {
"spotify": "http://open.spotify.com/user/wizzler"
},
"href": "https://api.spotify.com/v1/users/wizzler",
"id": "wizzler",
"type": "user",
"uri": "spotify:user:wizzler"
},
"public": true,
"tracks": {
"href": "https://api.spotify.com/v1/users/wizzler/playlists/53Y8wT46QIMz5H4WQ8O22c/tracks",
"total": 30
},
"type": "playlist",
"uri": "spotify:user:wizzler:playlist:53Y8wT46QIMz5H4WQ8O22c"
}, {
"collaborative": false,
"external_urls": {
"spotify": "http://open.spotify.com/user/wizzlersmate/playlists/1AVZz0mBuGbCEoNRQdYQju"
},
"href": "https://api.spotify.com/v1/users/wizzlersmate/playlists/1AVZz0mBuGbCEoNRQdYQju",
"id": "1AVZz0mBuGbCEoNRQdYQju",
"images" : [ ],
"name": "Another Playlist",
"owner": {
"external_urls": {
"spotify": "http://open.spotify.com/user/wizzlersmate"
},
"href": "https://api.spotify.com/v1/users/wizzlersmate",
"id": "wizzlersmate",
"type": "user",
"uri": "spotify:user:wizzlersmate"
},
"public": true,
"tracks": {
"href": "https://api.spotify.com/v1/users/wizzlersmate/playlists/1AVZz0mBuGbCEoNRQdYQju/tracks",
"total": 58
},
"type": "playlist",
"uri": "spotify:user:wizzlersmate:playlist:1AVZz0mBuGbCEoNRQdYQju"
...
} ],
"limit": 9,
"next": null,
"offset": 0,
"previous": null,
"total": 9
}
playlist object (simplified)
| Key | Value Type | Value Description |
|---|---|---|
| collaborative | Boolean | true if the owner allows other users to modify the playlist. Note: only non-collaborative playlists are currently returned by the Web API. |
| external_urls | an external URL object | Known external URLs for this playlist. |
| href | string | A link to the Web API endpoint providing full details of the playlist. |
| id | string | The Spotify ID for the playlist. |
| images | an array of image objects | 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. |
| name | string | The name of the playlist. |
| owner | a user object | The user who owns the playlist |
| public | Boolean or null | The playlist's public/private status: true the playlist is public, false the playlist is private, null the playlist status is not relevant. For more about public/private status, see Working with Playlists. |
| tracks | a tracks object | 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. |
| type | string | The object type: "playlist" |
| uri | string | The Spotify URI for the artist. |
paging object
| Key | Value Type | Value Description |
|---|---|---|
| href | string | A link to the Web API endpoint returning the full result of the request. |
| items | an array of objects | The requested data. |
| 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) |
| offset | integer | The offset of the items returned (as set in the query or by default). |
| previous | string | URL to the previous page of items. (null if none) |
| total | integer | The total number of items available to return. |