NAV
shell javascript python

Spotify Web API

Welcome to the Spotify Web API specification. For more information about how to use the API, check out Spotify's developer site.

albums

several-albums

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action albums several-albums -p ids=... -p market=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["albums", "several-albums"]
params = {
    "ids": ...,
    "market": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["albums", "several-albums"]
var params = {
    ids: ...,
    market: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get Several Albums

HTTP Request

GET https://api.spotify.com/v1/albums

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
ids requiredA comma-separated list of IDs
marketThe market (an ISO 3166-1 alpha-2 country code)

album

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action albums album -p id=... -p market=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["albums", "album"]
params = {
    "id": ...,
    "market": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["albums", "album"]
var params = {
    id: ...,
    market: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get an Album

HTTP Request

GET https://api.spotify.com/v1/albums/{id}

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
id requiredThe Spotify ID for the album

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
marketThe market (an ISO 3166-1 alpha-2 country code)

album-tracks

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action albums album-tracks -p id=... -p market=... -p limit=... -p offset=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["albums", "album-tracks"]
params = {
    "id": ...,
    "market": ...,
    "limit": ...,
    "offset": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["albums", "album-tracks"]
var params = {
    id: ...,
    market: ...,
    limit: ...,
    offset: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get an Album's Tracks

HTTP Request

GET https://api.spotify.com/v1/albums/{id}/tracks

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
id requiredThe Spotify ID for the album

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
marketThe market (an ISO 3166-1 alpha-2 country code)
limitThe maximum number of track objects to return
offsetThe index of the first track to return

artists

several-artists

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action artists several-artists -p ids=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["artists", "several-artists"]
params = {
    "ids": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["artists", "several-artists"]
var params = {
    ids: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get Several Artists

HTTP Request

GET https://api.spotify.com/v1/artists

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
ids requiredA comma-separated list of IDs

artist

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action artists artist -p id=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["artists", "artist"]
params = {
    "id": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["artists", "artist"]
var params = {
    id: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get an Artist

HTTP Request

GET https://api.spotify.com/v1/artists/{id}

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
id requiredThe Spotify ID for the artist

artist-albums

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action artists artist-albums -p id=... -p album_type=... -p market=... -p limit=... -p offset=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["artists", "artist-albums"]
params = {
    "id": ...,
    "album_type": ...,
    "market": ...,
    "limit": ...,
    "offset": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["artists", "artist-albums"]
var params = {
    id: ...,
    album_type: ...,
    market: ...,
    limit: ...,
    offset: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get an Artist's Albums

HTTP Request

GET https://api.spotify.com/v1/artists/{id}/albums

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
id requiredThe Spotify ID for the artist

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
album_typeFilter by album types
marketThe market (an ISO 3166-1 alpha-2 country code)
limitThe maximum number of track objects to return
offsetThe index of the first track to return
# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action artists artist-related-artists -p id=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["artists", "artist-related-artists"]
params = {
    "id": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["artists", "artist-related-artists"]
var params = {
    id: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get an Artist's Related Artists

HTTP Request

GET https://api.spotify.com/v1/artists/{id}/related-artists

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
id requiredThe Spotify ID for the artist

artist-top-tracks

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action artists artist-top-tracks -p id=... -p country=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["artists", "artist-top-tracks"]
params = {
    "id": ...,
    "country": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["artists", "artist-top-tracks"]
var params = {
    id: ...,
    country: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get an Artist's Top Tracks

HTTP Request

GET https://api.spotify.com/v1/artists/{id}/top-tracks

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
id requiredThe Spotify ID for the artist

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
country requiredThe country (an ISO 3166-1 alpha-2 country code)

audio-analysis

audio-analysis-track

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action audio-analysis audio-analysis-track -p id=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["audio-analysis", "audio-analysis-track"]
params = {
    "id": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["audio-analysis", "audio-analysis-track"]
var params = {
    id: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get Audio Analysis for a Track

HTTP Request

GET https://api.spotify.com/v1/audio-analysis/{id}

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
id required

audio-features

audio-features-several-tracks

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action audio-features audio-features-several-tracks -p ids=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["audio-features", "audio-features-several-tracks"]
params = {
    "ids": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["audio-features", "audio-features-several-tracks"]
var params = {
    ids: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get Audio Features for Several Tracks

HTTP Request

GET https://api.spotify.com/v1/audio-features

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
ids requiredA comma-separated list of IDs

audio-features-track

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action audio-features audio-features-track -p id=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["audio-features", "audio-features-track"]
params = {
    "id": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["audio-features", "audio-features-track"]
var params = {
    id: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get Audio Features for a Track

HTTP Request

GET https://api.spotify.com/v1/audio-features/{id}

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
id required

browse

browse-categories

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action browse browse-categories -p country=... -p locale=... -p limit=... -p offset=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["browse", "browse-categories"]
params = {
    "country": ...,
    "locale": ...,
    "limit": ...,
    "offset": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["browse", "browse-categories"]
var params = {
    country: ...,
    locale: ...,
    limit: ...,
    offset: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get a List of Browse Categories

HTTP Request

GET https://api.spotify.com/v1/browse/categories

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
countryThe country (an ISO 3166-1 alpha-2 country code)
localeThe desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning "Spanish (Mexico)".
limitThe maximum number of category objects to return
offsetThe index of the first category to return

browse-category

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action browse browse-category -p category_id=... -p country=... -p locale=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["browse", "browse-category"]
params = {
    "category_id": ...,
    "country": ...,
    "locale": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["browse", "browse-category"]
var params = {
    category_id: ...,
    country: ...,
    locale: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get a Single Browse Category

HTTP Request

GET https://api.spotify.com/v1/browse/categories/{category_id}

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
category_id requiredThe Spotify ID of the category you wish to fetch.

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
countryThe country (an ISO 3166-1 alpha-2 country code)
localeThe desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning "Spanish (Mexico)".

category-playlists

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action browse category-playlists -p category_id=... -p country=... -p limit=... -p offset=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["browse", "category-playlists"]
params = {
    "category_id": ...,
    "country": ...,
    "limit": ...,
    "offset": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["browse", "category-playlists"]
var params = {
    category_id: ...,
    country: ...,
    limit: ...,
    offset: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get a Category's playlists

HTTP Request

GET https://api.spotify.com/v1/browse/categories/{category_id}/playlists

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
category_id requiredThe Spotify ID of the category you wish to fetch.

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
countryThe country (an ISO 3166-1 alpha-2 country code)
limitThe maximum number of playlist objects to return
offsetThe index of the first playlist to return
# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action browse featured-playlists -p country=... -p locale=... -p timestamp=... -p limit=... -p offset=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["browse", "featured-playlists"]
params = {
    "country": ...,
    "locale": ...,
    "timestamp": ...,
    "limit": ...,
    "offset": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["browse", "featured-playlists"]
var params = {
    country: ...,
    locale: ...,
    timestamp: ...,
    limit: ...,
    offset: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get a List of Featured Playlists

HTTP Request

GET https://api.spotify.com/v1/browse/featured-playlists

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
countryThe country (an ISO 3166-1 alpha-2 country code)
localeThe desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning "Spanish (Mexico)".
timestampA timestamp in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss) with the user's local time to get results tailored to a specific date and time in the day. If not provided, it defaults to the current UTC time. Example: "2014-10-23T09:00:00" for a user whose local time is 9AM.
limitThe maximum number of track objects to return
offsetThe index of the first track to return

new-releases

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action browse new-releases -p country=... -p limit=... -p offset=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["browse", "new-releases"]
params = {
    "country": ...,
    "limit": ...,
    "offset": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["browse", "new-releases"]
var params = {
    country: ...,
    limit: ...,
    offset: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get a List of New Releases

HTTP Request

GET https://api.spotify.com/v1/browse/new-releases

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
countryThe country (an ISO 3166-1 alpha-2 country code)
limitThe maximum number of track objects to return
offsetThe index of the first track to return

me

current-user

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action me current-user
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["me", "current-user"]
result = client.action(document, action)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["me", "current-user"]
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get Current User's Profile

HTTP Request

GET https://api.spotify.com/v1/me

current-user-saved-albums

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action me current-user-saved-albums -p ids=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["me", "current-user-saved-albums"]
params = {
    "ids": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["me", "current-user-saved-albums"]
var params = {
    ids: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Remove Albums for Current User

HTTP Request

DELETE https://api.spotify.com/v1/me/albums

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
ids requiredA comma-separated list of IDs

current-user-contains-saved-albums

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action me current-user-contains-saved-albums -p ids=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["me", "current-user-contains-saved-albums"]
params = {
    "ids": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["me", "current-user-contains-saved-albums"]
var params = {
    ids: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Check Current User's Saved Albums

HTTP Request

GET https://api.spotify.com/v1/me/albums/contains

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
ids requiredA comma-separated list of IDs

following

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action me following -p type=... -p ids=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["me", "following"]
params = {
    "type": ...,
    "ids": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["me", "following"]
var params = {
    type: ...,
    ids: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Unfollow Artists or Users

HTTP Request

DELETE https://api.spotify.com/v1/me/following

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
type requiredThe type to unfollow.
ids requiredA comma-separated list of the artists or users ids

following-contains

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action me following-contains -p type=... -p ids=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["me", "following-contains"]
params = {
    "type": ...,
    "ids": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["me", "following-contains"]
var params = {
    type: ...,
    ids: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Check if Current User Follows Artists or Users

HTTP Request

GET https://api.spotify.com/v1/me/following/contains

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
type requiredThe type to follow.
ids requiredA comma-separated string of the artists or users ids.

current-user-playlists

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action me current-user-playlists -p limit=... -p offset=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["me", "current-user-playlists"]
params = {
    "limit": ...,
    "offset": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["me", "current-user-playlists"]
var params = {
    limit: ...,
    offset: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get a List of Current User's Playlists

HTTP Request

GET https://api.spotify.com/v1/me/playlists

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
limitThe maximum number of track objects to return
offsetThe index of the first track to return

current-user-top-artists-and-tracks

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action me current-user-top-artists-and-tracks -p type=... -p time_range=... -p limit=... -p offset=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["me", "current-user-top-artists-and-tracks"]
params = {
    "type": ...,
    "time_range": ...,
    "limit": ...,
    "offset": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["me", "current-user-top-artists-and-tracks"]
var params = {
    type: ...,
    time_range: ...,
    limit: ...,
    offset: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get User's Top Artists and Tracks

HTTP Request

GET https://api.spotify.com/v1/me/top/{type}

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
type requiredThe type of item. "artists" or "tracks"

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
time_rangeOver what timeframe are the affinities computed. "long-term", "medium-term" or "short-term"
limitThe maximum number of track objects to return
offsetThe index of the first track to return

current-user-saved-tracks

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action me current-user-saved-tracks -p ids=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["me", "current-user-saved-tracks"]
params = {
    "ids": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["me", "current-user-saved-tracks"]
var params = {
    ids: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Remove Tracks for Current User

HTTP Request

DELETE https://api.spotify.com/v1/me/tracks

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
ids requiredA comma-separated list of IDs

current-user-contains-saved-tracks

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action me current-user-contains-saved-tracks -p ids=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["me", "current-user-contains-saved-tracks"]
params = {
    "ids": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["me", "current-user-contains-saved-tracks"]
var params = {
    ids: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Check Current User's Saved Tracks

HTTP Request

GET https://api.spotify.com/v1/me/tracks/contains

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
ids requiredA comma-separated list of IDs

recommendations

recommendations

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action recommendations recommendations -p limit=... -p market=... -p seed_artists=... -p seed_genres=... -p seed_tracks=... -p min_acousticness=... -p max_acousticness=... -p target_acousticness=... -p min_danceability=... -p max_danceability=... -p target_danceability=... -p min_duration_ms=... -p max_duration_ms=... -p target_duration_ms=... -p min_energy=... -p max_energy=... -p target_energy=... -p min_instrumentalness=... -p max_instrumentalness=... -p target_instrumentalness=... -p min_key=... -p max_key=... -p target_key=... -p min_liveness=... -p max_liveness=... -p target_liveness=... -p min_loudness=... -p max_loudness=... -p target_loudness=... -p min_mode=... -p max_mode=... -p target_mode=... -p min_popularity=... -p max_popularity=... -p target_popularity=... -p min_speechiness=... -p max_speechiness=... -p target_speechiness=... -p min_tempo=... -p max_tempo=... -p target_tempo=... -p min_time_signature=... -p max_time_signature=... -p target_time_signature=... -p min_valence=... -p max_valence=... -p target_valence=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["recommendations", "recommendations"]
params = {
    "limit": ...,
    "market": ...,
    "seed_artists": ...,
    "seed_genres": ...,
    "seed_tracks": ...,
    "min_acousticness": ...,
    "max_acousticness": ...,
    "target_acousticness": ...,
    "min_danceability": ...,
    "max_danceability": ...,
    "target_danceability": ...,
    "min_duration_ms": ...,
    "max_duration_ms": ...,
    "target_duration_ms": ...,
    "min_energy": ...,
    "max_energy": ...,
    "target_energy": ...,
    "min_instrumentalness": ...,
    "max_instrumentalness": ...,
    "target_instrumentalness": ...,
    "min_key": ...,
    "max_key": ...,
    "target_key": ...,
    "min_liveness": ...,
    "max_liveness": ...,
    "target_liveness": ...,
    "min_loudness": ...,
    "max_loudness": ...,
    "target_loudness": ...,
    "min_mode": ...,
    "max_mode": ...,
    "target_mode": ...,
    "min_popularity": ...,
    "max_popularity": ...,
    "target_popularity": ...,
    "min_speechiness": ...,
    "max_speechiness": ...,
    "target_speechiness": ...,
    "min_tempo": ...,
    "max_tempo": ...,
    "target_tempo": ...,
    "min_time_signature": ...,
    "max_time_signature": ...,
    "target_time_signature": ...,
    "min_valence": ...,
    "max_valence": ...,
    "target_valence": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["recommendations", "recommendations"]
var params = {
    limit: ...,
    market: ...,
    seed_artists: ...,
    seed_genres: ...,
    seed_tracks: ...,
    min_acousticness: ...,
    max_acousticness: ...,
    target_acousticness: ...,
    min_danceability: ...,
    max_danceability: ...,
    target_danceability: ...,
    min_duration_ms: ...,
    max_duration_ms: ...,
    target_duration_ms: ...,
    min_energy: ...,
    max_energy: ...,
    target_energy: ...,
    min_instrumentalness: ...,
    max_instrumentalness: ...,
    target_instrumentalness: ...,
    min_key: ...,
    max_key: ...,
    target_key: ...,
    min_liveness: ...,
    max_liveness: ...,
    target_liveness: ...,
    min_loudness: ...,
    max_loudness: ...,
    target_loudness: ...,
    min_mode: ...,
    max_mode: ...,
    target_mode: ...,
    min_popularity: ...,
    max_popularity: ...,
    target_popularity: ...,
    min_speechiness: ...,
    max_speechiness: ...,
    target_speechiness: ...,
    min_tempo: ...,
    max_tempo: ...,
    target_tempo: ...,
    min_time_signature: ...,
    max_time_signature: ...,
    target_time_signature: ...,
    min_valence: ...,
    max_valence: ...,
    target_valence: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get Recommendations Based on Seeds

HTTP Request

GET https://api.spotify.com/v1/recommendations

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
limitThe target size of the list of recommended tracks. For seeds with unusually small pools or when highly restrictive filtering is applied, it may be impossible to generate the requested number of recommended tracks. Debugging information for such cases is available in the response.
marketThe market (an ISO 3166-1 alpha-2 country code). Because min_*, max_* and target_* are applied to pools before relinking, the generated results may not precisely match the filters applied. Original, non-relinked tracks are available via the linked_from attribute of the relinked track response.
seed_artistsA comma-separated list of Spotify Artist IDs
seed_genresA comma separated list of genres. See the endpoint for fetching the list of genres.
seed_tracksA comma-separated list of Spotify Track IDs
min_acousticnessMinimum acousticness
max_acousticnessMaximum acousticness
target_acousticnessTarget acousticness
min_danceabilityMinimum danceability
max_danceabilityMaximum danceability
target_danceabilityTarget danceability
min_duration_msMinimum duration of the track (ms)
max_duration_msMaximum duration of the track (ms)
target_duration_msTarget duration of the track (ms)
min_energyMinimum energy
max_energyMaximum energy
target_energyTarget energy
min_instrumentalnessMinimum instrumentalness
max_instrumentalnessMaximum instrumentalness
target_instrumentalnessTarget instrumentalness
min_keyMinimum key
max_keyMaximum key
target_keyTarget key
min_livenessMinimum liveness
max_livenessMaximum liveness
target_livenessTarget liveness
min_loudnessMinimum loudness
max_loudnessMaximum loudness
target_loudnessTarget loudness
min_modeMinimum mode (Major is represented by 1 and minor is 0)
max_modeMaximum mode (Major is represented by 1 and minor is 0)
target_modeTarget mode (Major is represented by 1 and minor is 0)
min_popularityMinimum popularity
max_popularityMaximum popularity
target_popularityTarget popularity
min_speechinessMinimum speechiness
max_speechinessMaximum speechiness
target_speechinessTarget speechiness
min_tempoMinimum tempo (BPM)
max_tempoMaximum tempo (BPM)
target_tempoTarget tempo (BPM)
min_time_signatureMinimum time signature
max_time_signatureMaximum time signature
target_time_signatureTarget time signature
min_valenceMinimum valence
max_valenceMaximum valence
target_valenceTarget valence

available-genre-seeds

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action recommendations available-genre-seeds
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["recommendations", "available-genre-seeds"]
result = client.action(document, action)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["recommendations", "available-genre-seeds"]
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get Available Genre Seeds

HTTP Request

GET https://api.spotify.com/v1/recommendations/available-genre-seeds

search

search-item

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action search search-item -p q=... -p type=... -p market=... -p limit=... -p offset=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["search", "search-item"]
params = {
    "q": ...,
    "type": ...,
    "market": ...,
    "limit": ...,
    "offset": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["search", "search-item"]
var params = {
    q: ...,
    type: ...,
    market: ...,
    limit: ...,
    offset: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Search for an Item

HTTP Request

GET https://api.spotify.com/v1/search

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
q requiredThe search query's keywords (and optional field filters). The search is not case-sensitive: 'roadhouse' will match 'Roadhouse', 'roadHouse', etc. Keywords will be matched in any order unless surrounded by quotes, thus q=roadhouse&20blues will match both 'Blues Roadhouse' and 'Roadhouse of the Blues'. Quotation marks can be used to limit the match to a phrase: q=roadhouse&20blues will match 'My Roadhouse Blues' but not 'Roadhouse of the Blues'. By default, results are returned when a match is found in any field of the target object type. Searches can be made more specific by specifying an album, artist or track field filter. For example q=album:gold%20artist:abba&type=album will search for albums with the text 'gold' in the album name and the text 'abba' in an artist name. Other possible field filters, depending on object types being searched, include year, genre, upc, and isrc. For example, q=damian%20genre:reggae-pop&type=artist. The asterisk (*) character can, with some limitations, be used as a wildcard (maximum: 2 per query). It will match a variable number of non-white-space characters. It cannot be used in a quoted phrase, in a field filter, or as the first character of the keyword string. Searching for playlists will return results matching the playlist's name and/or description.
type requiredA comma-separated list of item types to search across. Search results will include hits from all the specified item types; for example q=name:abacab&type=album,track will return both albums and tracks with "abacab" in their name.
marketThe market (an ISO 3166-1 alpha-2 country code). If given, only items with content playable in that market will be returned.
limitThe maximum number of track objects to return
offsetThe index of the first track to return

tracks

several-tracks

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action tracks several-tracks -p ids=... -p market=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["tracks", "several-tracks"]
params = {
    "ids": ...,
    "market": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["tracks", "several-tracks"]
var params = {
    ids: ...,
    market: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get Several Tracks

HTTP Request

GET https://api.spotify.com/v1/tracks

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
ids requiredA comma-separated list of IDs
marketThe market (an ISO 3166-1 alpha-2 country code)

track

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action tracks track -p id=... -p market=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["tracks", "track"]
params = {
    "id": ...,
    "market": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["tracks", "track"]
var params = {
    id: ...,
    market: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get a Track

HTTP Request

GET https://api.spotify.com/v1/tracks/{id}

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
id required

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
marketThe market (an ISO 3166-1 alpha-2 country code)

users

users-profile

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action users users-profile -p user_id=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["users", "users-profile"]
params = {
    "user_id": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["users", "users-profile"]
var params = {
    user_id: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Get a User's Profile

HTTP Request

GET https://api.spotify.com/v1/users/{user_id}

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
user_id requiredThe user's Spotify user ID.

playlists

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action users playlists -p user_id=... -p name=... -p public=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["users", "playlists"]
params = {
    "user_id": ...,
    "name": ...,
    "public": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["users", "playlists"]
var params = {
    user_id: ...,
    name: ...,
    public: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Create a Playlist

HTTP Request

POST https://api.spotify.com/v1/users/{user_id}/playlists

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
user_id requiredThe user's Spotify user ID.

Request Body

The request body should be a "application/json" encoded object, containing the following items.

ParameterDescription
name
public

playlist

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action users playlist -p user_id=... -p playlist_id=... -p name=... -p public=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["users", "playlist"]
params = {
    "user_id": ...,
    "playlist_id": ...,
    "name": ...,
    "public": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["users", "playlist"]
var params = {
    user_id: ...,
    playlist_id: ...,
    name: ...,
    public: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Change a Playlist's Details

HTTP Request

PUT https://api.spotify.com/v1/users/{user_id}/playlists/{playlist_id}

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
user_id requiredThe user's Spotify user ID.
playlist_id requiredThe Spotify playlist ID.

Request Body

The request body should be a "application/json" encoded object, containing the following items.

ParameterDescription
name
public

playlist-followers

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action users playlist-followers -p user_id=... -p playlist_id=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["users", "playlist-followers"]
params = {
    "user_id": ...,
    "playlist_id": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["users", "playlist-followers"]
var params = {
    user_id: ...,
    playlist_id: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Unfollow a Playlist

HTTP Request

DELETE https://api.spotify.com/v1/users/{user_id}/playlists/{playlist_id}/followers

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
user_id requiredThe user's Spotify user ID.
playlist_id requiredThe Spotify playlist ID.

playlist-followers-contains

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action users playlist-followers-contains -p user_id=... -p playlist_id=... -p ids=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["users", "playlist-followers-contains"]
params = {
    "user_id": ...,
    "playlist_id": ...,
    "ids": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["users", "playlist-followers-contains"]
var params = {
    user_id: ...,
    playlist_id: ...,
    ids: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Check if Users Follow a Playlist

HTTP Request

GET https://api.spotify.com/v1/users/{user_id}/playlists/{playlist_id}/followers/contains

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
user_id requiredThe user's Spotify user ID.
playlist_id requiredThe Spotify playlist ID.

Query Parameters

The following parameters should be included as part of a URL query string.

ParameterDescription
ids requiredA comma-separated list of users ids

playlist-tracks

# Load the schema document
$ coreapi get https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml --format raml

# Interact with the API endpoint
$ coreapi action users playlist-tracks -p user_id=... -p playlist_id=... -p tracks=...
import coreapi

# Initialize a client & load the schema document
client = coreapi.Client()
document = client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml", format="raml")

# Interact with the API endpoint
action = ["users", "playlist-tracks"]
params = {
    "user_id": ...,
    "playlist_id": ...,
    "tracks": ...
}
result = client.action(document, action, params=params)
var coreapi = window.coreapi

// Initialize a client & load the schema document
var client = new coreapi.Client()
var document = null
client.get("https://raw.githubusercontent.com/spotify/web-api/master/specifications/raml/api.raml").then(function(result) {
    document = result
})

// Interact with the API endpoint
var action = ["users", "playlist-tracks"]
var params = {
    user_id: ...,
    playlist_id: ...,
    tracks: ...
}
client.action(document, action, params=params).then(function(result) {
    // Return value is in 'result'
})

Remove Tracks from a Playlist

HTTP Request

DELETE https://api.spotify.com/v1/users/{user_id}/playlists/{playlist_id}/tracks

Path Parameters

The following parameters should be included in the URL path.

ParameterDescription
user_id requiredThe user's Spotify user ID.
playlist_id requiredThe Spotify playlist ID.

Request Body

The request body should be a "application/json" encoded object, containing the following items.

ParameterDescription
tracks