Get a Playlist's Items
Developing
GET
/playlists/{playlist_id}/tracks
category-playlists
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.spotify.com/v1/playlists//tracks' \
--header 'Authorization;'
Response Response Example
200 - Example 1
{
"href": "string",
"items": [
{
"added_at": "2019-08-24T14:15:22Z",
"added_by": {
"display_name": "string",
"external_urls": {
"spotify": "string"
},
"followers": {
"href": "string",
"total": 0
},
"href": "string",
"id": "string",
"images": [
{
"height": 0,
"url": "string",
"width": 0
}
],
"type": "string",
"uri": "string"
},
"is_local": true,
"track": {
"album": {
"album_group": "string",
"album_type": "string",
"artists": [
{
"external_urls": {
"spotify": "string"
},
"href": "string",
"id": "string",
"name": "string",
"type": "string",
"uri": "string"
}
],
"available_markets": [
"string"
],
"external_urls": {
"spotify": "string"
},
"href": "string",
"id": "string",
"images": [
{
"height": 0,
"url": "string",
"width": 0
}
],
"name": "string",
"release_date": "string",
"release_date_precision": "string",
"restrictions": {
"reason": "string"
},
"total_tracks": 0,
"type": "string",
"uri": "string"
},
"artists": [
{
"external_urls": {
"spotify": "string"
},
"followers": {
"href": "string",
"total": 0
},
"genres": [
"string"
],
"href": "string",
"id": "string",
"images": [
{
"height": 0,
"url": "string",
"width": 0
}
],
"name": "string",
"popularity": 0,
"type": "string",
"uri": "string"
}
],
"available_markets": [
"string"
],
"disc_number": 0,
"duration_ms": 0,
"explicit": true,
"external_ids": {
"ean": "string",
"isrc": "string",
"upc": "string"
},
"external_urls": {
"spotify": "string"
},
"href": "string",
"id": "string",
"is_local": true,
"is_playable": true,
"linked_from": {
"external_urls": {
"spotify": "string"
},
"href": "string",
"id": "string",
"type": "string",
"uri": "string"
},
"name": "string",
"popularity": 0,
"preview_url": "string",
"restrictions": {
"reason": "string"
},
"track_number": 0,
"type": "string",
"uri": "string"
}
}
],
"limit": 0,
"next": "string",
"offset": 0,
"previous": "string",
"total": 0
}
Request
Path Params
playlist_id
string
required
Query Params
market
string
optional
from_token
. Provide this parameter if you want to apply TrackRelinking. For episodes, if a valid user access token is specified in the request header, the country associated with the user account will take priority over this parameter.
Note: If neither market or user country are provided, the episode is considered unavailable for the client.
fields
string
optional
fields=total,limit
A dot separator can be used to specify non-reoccurring fields, while parentheses can be used to specify reoccurring fields within objects. For example, to get just the added date and user ID of the adder:
fields=items(added_at,added_by.id)
Use multiple parentheses to drill down into nested objects, for example:
fields=items(track(name,href,album(name,href)))
Fields can be excluded by prefixing them with an exclamation mark, for example:
fields=items.track.album(!external_urls,images)
limit
integer
optional
offset
integer
optional
additional_types
string
optional
track
type. Valid types are: track
and episode
. Note : This parameter was introduced to allow existing clients to maintain their current behaviour and might be deprecated in the future. In addition to providing this parameter, make sure that your client properly handles cases of new types in the future by checking against the type
field of each object.Header Params
Authorization
string
required
Responses
Modified at 2022-09-12 10:04:50