Spotify

Learn how to use Spotify with Composio

Overview

SLUG: SPOTIFY

Description

Spotify is a digital music and podcast streaming service with millions of tracks, personalized playlists, and social sharing features

Authentication Details

client_id
stringRequired
client_secret
stringRequired
full
stringDefaults to https://api.spotify.comRequired
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
stringDefaults to user-read-private user-read-email app-remote-control streaming user-modify-playback-state user-read-playback-state user-read-currently-playing
bearer_token
string

Connecting to Spotify

Create an auth config

Use the dashboard to create an auth config for the Spotify toolkit. This allows you to connect multiple Spotify accounts to Composio for agents to use.

1

Select App

Navigate to Spotify.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Spotify Auth Config”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using OAuth2

1from composio import Composio
2
3# Replace these with your actual values
4spotify_auth_config_id = "ac_YOUR_SPOTIFY_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/application
6
7composio = Composio()
8
9
10def authenticate_toolkit(user_id: str, auth_config_id: str):
11 connection_request = composio.connected_accounts.initiate(
12 user_id=user_id,
13 auth_config_id=auth_config_id,
14 )
15
16 print(
17 f"Visit this URL to authenticate Spotify: {connection_request.redirect_url}"
18 )
19
20 # This will wait for the auth flow to be completed
21 connection_request.wait_for_connection(timeout=15)
22 return connection_request.id
23
24
25connection_id = authenticate_toolkit(user_id, spotify_auth_config_id)
26
27# You can also verify the connection status using:
28connected_account = composio.connected_accounts.get(connection_id)
29print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Spotify toolkit’s playground

Python
1from composio import Composio
2from openai import OpenAI
3import json
4
5openai = OpenAI()
6composio = Composio()
7
8# User ID must be a valid UUID format
9user_id = "0000-0000-0000" # Replace with actual user UUID from your database
10
11tools = composio.tools.get(user_id=user_id, toolkits=["SPOTIFY"])
12
13print("[!] Tools:")
14print(json.dumps(tools))
15
16def invoke_llm(task = "What can you do?"):
17 completion = openai.chat.completions.create(
18 model="gpt-4o",
19 messages=[
20 {
21 "role": "user",
22 "content": task, # Your task here!
23 },
24 ],
25 tools=tools,
26 )
27
28 # Handle Result from tool call
29 result = composio.provider.handle_tool_calls(user_id=user_id, response=completion)
30 print(f"[!] Completion: {completion}")
31 print(f"[!] Tool call result: {result}")
32
33invoke_llm()

Tool List

Tool Name: Add items to playlist

Description

Add one or more items to a user's playlist.

Action Parameters

playlist_id
stringRequired
position
integer
uris
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create playlist

Description

Create a playlist for a spotify user. (the playlist will be empty until you [add tracks](/documentation/web-api/reference/add-tracks-to-playlist).) each user is generally limited to a maximum of 11000 playlists.

Action Parameters

collaborative
boolean
description
string
name
stringRequired
public
boolean
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get artist s top tracks

Description

Get spotify catalog information about an artist's top tracks by country.

Action Parameters

id
stringRequired
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get playlist

Description

Get a playlist owned by a spotify user.

Action Parameters

additional_types
string
fields
string
market
string
playlist_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get show

Description

Get spotify catalog information for a single show identified by its unique spotify id.

Action Parameters

id
stringRequired
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get show episodes

Description

Get spotify catalog information about an show’s episodes. optional parameters can be used to limit the number of episodes returned.

Action Parameters

id
stringRequired
limit
integerDefaults to 20
market
string
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Save albums for current user

Description

Save one or more albums to the current user's 'your music' library.

Action Parameters

ids
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Save tracks for current user

Description

Save one or more tracks to the current user's 'your music' library.

Action Parameters

ids
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Add item to playback queue

Description

Add an item to the end of the user's current playback queue. this api only works for users who have spotify premium. the order of execution is not guaranteed when you use this api with other player api endpoints.

Action Parameters

device_id
string
uri
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Add items to playlist

Description

Add one or more items to a user's playlist. <<DEPRECATED use add_items_to_playlist>>

Action Parameters

playlist_id
stringRequired
position
integer
uris
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Change playlist details

Description

Change a playlist's name and public/private state. (the user must, of course, own the playlist.)

Action Parameters

collaborative
boolean
description
string
name
string
playlist_id
stringRequired
public
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Check if users follow playlist

Description

Check to see if one or more spotify users are following a specified playlist.

Action Parameters

ids
stringRequired
playlist_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Check if user follows artists or users

Description

Check to see if the current user is following one or more artists or other spotify users.

Action Parameters

ids
stringRequired
type
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Check user s saved albums

Description

Check if one or more albums is already saved in the current spotify user's 'your music' library.

Action Parameters

ids
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Check user s saved audiobooks

Description

Check if one or more audiobooks are already saved in the current spotify user's library.

Action Parameters

ids
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Check user s saved episodes

Description

This spotify api endpoint (in beta) checks if episodes are saved in a user's library. feedback and issues can be shared in the developer forum.

Action Parameters

ids
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Check user s saved shows

Description

Check if one or more shows is already saved in the current spotify user's library.

Action Parameters

ids
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Check user s saved tracks

Description

Check if one or more tracks is already saved in the current spotify user's 'your music' library.

Action Parameters

ids
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Follow artists or users

Description

Add the current user as a follower of one or more artists or other spotify users.

Action Parameters

ids
arrayRequired
type
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Follow playlist

Description

Add the current user as a follower of a playlist.

Action Parameters

playlist_id
stringRequired
public
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get album

Description

Get spotify catalog information for a single album.

Action Parameters

id
stringRequired
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get album tracks

Description

Get spotify catalog information about an album’s tracks. optional parameters can be used to limit the number of tracks returned.

Action Parameters

id
stringRequired
limit
integerDefaults to 20
market
string
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get artist

Description

Get spotify catalog information for a single artist identified by their unique spotify id. <<DEPRECATED use get_artist>>

Action Parameters

id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get artist s albums

Description

Get spotify catalog information about an artist's albums. <<DEPRECATED use get_artist_s_albums>>

Action Parameters

id
stringRequired
include_groups
string
limit
integerDefaults to 20
market
string
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get artist s top tracks

Description

Get spotify catalog information about an artist's top tracks by country. <<DEPRECATED use get_artist_s_top_tracks>>

Action Parameters

id
stringRequired
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get an audiobook

Description

Get spotify catalog information for a single audiobook. audiobooks are only available within the us, uk, canada, ireland, new zealand and australia markets.

Action Parameters

id
stringRequired
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get artist

Description

Get spotify catalog information for a single artist identified by their unique spotify id.

Action Parameters

id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get artist s albums

Description

Get spotify catalog information about an artist's albums.

Action Parameters

id
stringRequired
include_groups
string
limit
integerDefaults to 20
market
string
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get audiobook chapters

Description

Get spotify catalog information about an audiobook's chapters. audiobooks are only available within the us, uk, canada, ireland, new zealand and australia markets.

Action Parameters

id
stringRequired
limit
integerDefaults to 20
market
string
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get available devices

Description

Get information about a user’s available spotify connect devices. some device models are not supported and will not be listed in the api response.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get available genre seeds

Description

Retrieve a list of available genres seed parameter values for [recommendations](/documentation/web-api/reference/get-recommendations).

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get available markets

Description

Get the list of markets where spotify is available.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get a chapter

Description

Get spotify catalog information for a single audiobook chapter. chapters are only available within the us, uk, canada, ireland, new zealand and australia markets.

Action Parameters

id
stringRequired
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get current user s playlists

Description

Get a list of the playlists owned or followed by the current spotify user. <<DEPRECATED use get_current_user_s_playlists>>

Action Parameters

limit
integerDefaults to 20
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get show episodes

Description

Get spotify catalog information about an show’s episodes. optional parameters can be used to limit the number of episodes returned. <<DEPRECATED use get_show_episodes>>

Action Parameters

id
stringRequired
limit
integerDefaults to 20
market
string
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get available devices

Description

Get information about a user’s available spotify connect devices. some device models are not supported and will not be listed in the api response. <<DEPRECATED use get_available_devices>>

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get category s playlists

Description

Get a list of spotify playlists tagged with a particular category.

Action Parameters

category_id
stringRequired
limit
integerDefaults to 20
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get currently playing track

Description

Get the object currently being played on the user's spotify account.

Action Parameters

additional_types
string
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get current user s profile

Description

Get detailed profile information about the current user (including the current user's username). <<DEPRECATED use get_current_user_s_profile>>

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get current user s playlists

Description

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

Action Parameters

limit
integerDefaults to 20
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get current user s profile

Description

Get detailed profile information about the current user (including the current user's username).

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get episode

Description

Get spotify catalog information for a single episode identified by its unique spotify id.

Action Parameters

id
stringRequired
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get followed artists

Description

Get the current user's followed artists.

Action Parameters

after
string
limit
integerDefaults to 20
type
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get playback state

Description

Get information about the user’s current playback state, including track or episode, progress, and active device. <<DEPRECATED use get_playback_state>>

Action Parameters

additional_types
string
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user s playlists

Description

Get a list of the playlists owned or followed by a spotify user. <<DEPRECATED use get_user_s_playlists>>

Action Parameters

limit
integerDefaults to 20
offset
integer
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get new releases

Description

Get a list of new album releases featured in spotify (shown, for example, on a spotify player’s “browse” tab).

Action Parameters

limit
integerDefaults to 20
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get playback state

Description

Get information about the user’s current playback state, including track or episode, progress, and active device.

Action Parameters

additional_types
string
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get playlist cover image

Description

Get the current image associated with a specific playlist.

Action Parameters

playlist_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get playlist items

Description

Get full details of the items of a playlist owned by a spotify user.

Action Parameters

additional_types
string
fields
string
limit
integerDefaults to 20
market
string
offset
integer
playlist_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get the user s queue

Description

Get the list of objects that make up the user's queue. <<DEPRECATED use get_the_user_s_queue>>

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get recently played tracks

Description

Get tracks from the current user's recently played tracks. **note**: currently doesn't support podcast episodes. <<DEPRECATED use get_recently_played_tracks>>

Action Parameters

after
integer
before
integer
limit
integerDefaults to 20

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get recently played tracks

Description

Get tracks from the current user's recently played tracks. **note**: currently doesn't support podcast episodes.

Action Parameters

after
integer
before
integer
limit
integerDefaults to 20

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get recommendations

Description

Recommendations are based on seed entity data, matched with similar artists and tracks. if data is ample, a track list and pool size are returned. for new or obscure artists and tracks, data may be insufficient for recommendations.

Action Parameters

limit
integerDefaults to 20
market
string
max_acousticness
integer
max_danceability
integer
max_duration_ms
integer
max_energy
integer
max_instrumentalness
integer
max_key
integer
max_liveness
integer
max_loudness
integer
max_mode
integer
max_popularity
integer
max_speechiness
integer
max_tempo
integer
max_time_signature
integer
max_valence
integer
min_acousticness
integer
min_danceability
integer
min_duration_ms
integer
min_energy
integer
min_instrumentalness
integer
min_key
integer
min_liveness
integer
min_loudness
integer
min_mode
integer
min_popularity
integer
min_speechiness
integer
min_tempo
integer
min_time_signature
integer
min_valence
integer
seed_artists
string
seed_genres
string
seed_tracks
string
target_acousticness
integer
target_danceability
integer
target_duration_ms
integer
target_energy
integer
target_instrumentalness
integer
target_key
integer
target_liveness
integer
target_loudness
integer
target_mode
integer
target_popularity
integer
target_speechiness
integer
target_tempo
integer
target_time_signature
integer
target_valence
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get several albums

Description

Get spotify catalog information for multiple albums identified by their spotify ids.

Action Parameters

ids
stringRequired
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get several artists

Description

Get spotify catalog information for several artists based on their spotify ids.

Action Parameters

ids
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get several audiobooks

Description

Get spotify catalog information for several audiobooks identified by their spotify ids. audiobooks are only available within the us, uk, canada, ireland, new zealand and australia markets.

Action Parameters

ids
stringRequired
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get several browse categories

Description

Get a list of categories used to tag items in spotify (on, for example, the spotify player’s “browse” tab).

Action Parameters

limit
integerDefaults to 20
locale
string
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get several chapters

Description

Get spotify catalog information for several audiobook chapters identified by their spotify ids. chapters are only available within the us, uk, canada, ireland, new zealand and australia markets.

Action Parameters

ids
stringRequired
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get several episodes

Description

Get spotify catalog information for several episodes based on their spotify ids.

Action Parameters

ids
stringRequired
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get several shows

Description

Get spotify catalog information for several shows based on their spotify ids.

Action Parameters

ids
stringRequired
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get several tracks

Description

Get spotify catalog information for multiple tracks based on their spotify ids.

Action Parameters

ids
stringRequired
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get several tracks audio features

Description

Get audio features for multiple tracks based on their spotify ids.

Action Parameters

ids
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get single browse category

Description

Get a single category used to tag items in spotify (on, for example, the spotify player’s “browse” tab).

Action Parameters

category_id
stringRequired
locale
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get currently playing track

Description

Get the object currently being played on the user's spotify account. <<DEPRECATED use get_currently_playing_track>>

Action Parameters

additional_types
string
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get the user s queue

Description

Get the list of objects that make up the user's queue.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get track

Description

Get spotify catalog information for a single track identified by its unique spotify id.

Action Parameters

id
stringRequired
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get track s audio analysis

Description

Get a low-level audio analysis for a track in the spotify catalog. the audio analysis describes the track’s structure and musical content, including rhythm, pitch, and timbre.

Action Parameters

id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get track s audio features

Description

Get audio feature information for a single track identified by its unique spotify id.

Action Parameters

id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user s profile

Description

Get public profile information about a spotify user. <<DEPRECATED use get_user_s_profile>>

Action Parameters

user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user s saved tracks

Description

Get a list of the songs saved in the current spotify user's 'your music' library. <<DEPRECATED use get_user_s_saved_tracks>>

Action Parameters

limit
integerDefaults to 20
market
string
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user s top artists

Description

Get the current user's top artists based on calculated affinity. <<DEPRECATED use get_user_s_top_artists>>

Action Parameters

limit
integerDefaults to 20
offset
integer
time_range
stringDefaults to medium_term

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user s top tracks

Description

Get the current user's top tracks based on calculated affinity. <<DEPRECATED use get_user_s_top_tracks>>

Action Parameters

limit
integerDefaults to 20
offset
integer
time_range
stringDefaults to medium_term

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user s playlists

Description

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

Action Parameters

limit
integerDefaults to 20
offset
integer
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user s profile

Description

Get public profile information about a spotify user.

Action Parameters

user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user s saved albums

Description

Get a list of the albums saved in the current spotify user's 'your music' library.

Action Parameters

limit
integerDefaults to 20
market
string
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user s saved audiobooks

Description

Get a list of the audiobooks saved in the current spotify user's 'your music' library.

Action Parameters

limit
integerDefaults to 20
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user s saved episodes

Description

This api endpoint, currently in beta, allows retrieving episodes saved in a spotify user's library. changes may occur without notice. feedback and issues can be shared in spotify's developer forum.

Action Parameters

limit
integerDefaults to 20
market
string
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user s saved shows

Description

Get a list of shows saved in the current spotify user's library. optional parameters can be used to limit the number of shows returned.

Action Parameters

limit
integerDefaults to 20
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user s saved tracks

Description

Get a list of the songs saved in the current spotify user's 'your music' library.

Action Parameters

limit
integerDefaults to 20
market
string
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user s top artists

Description

Get the current user's top artists based on calculated affinity.

Action Parameters

limit
integerDefaults to 20
offset
integer
time_range
stringDefaults to medium_term

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user s top tracks

Description

Get the current user's top tracks based on calculated affinity.

Action Parameters

limit
integerDefaults to 20
offset
integer
time_range
stringDefaults to medium_term

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Pause playback

Description

Pause playback on the user's account. this api only works for users who have spotify premium. the order of execution is not guaranteed when you use this api with other player api endpoints.

Action Parameters

device_id
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Remove playlist items

Description

Remove one or more items from a user's playlist.

Action Parameters

playlist_id
stringRequired
snapshot_id
string
tracks
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Remove users saved albums

Description

Remove one or more albums from the current user's 'your music' library.

Action Parameters

ids
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Remove user s saved audiobooks

Description

Remove one or more audiobooks from the spotify user's library.

Action Parameters

ids
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Remove user s saved episodes

Description

This api endpoint, currently in beta, allows for the removal of episodes from a user's library and may change without notice. feedback and issues can be shared on the spotify developer forum.

Action Parameters

ids
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Remove user s saved shows

Description

Delete one or more shows from current spotify user's library.

Action Parameters

ids
arrayRequired
market
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Remove user s saved tracks

Description

Remove one or more tracks from the current user's 'your music' library.

Action Parameters

ids
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Save albums for current user

Description

Save one or more albums to the current user's 'your music' library. <<DEPRECATED use save_albums_for_current_user>>

Action Parameters

ids
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Save audiobooks for current user

Description

Save one or more audiobooks to the current spotify user's library.

Action Parameters

ids
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Save episodes for current user

Description

This api endpoint, currently in beta, allows saving episodes to a user's library. users are encouraged to provide feedback or report issues in the spotify developer forum.

Action Parameters

ids
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Save shows for current user

Description

Save one or more shows to current spotify user's library.

Action Parameters

ids
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Search for item

Description

Get spotify catalog information about albums, artists, playlists, tracks, shows, episodes or audiobooks that match a keyword string. audiobooks are only available within the us, uk, canada, ireland, new zealand and australia markets.

Action Parameters

include_external
string
limit
integerDefaults to 20
market
string
offset
integer
q
stringRequired
type
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Seek to position

Description

Seeks to the given position in the user’s currently playing track. this api only works for users who have spotify premium. the order of execution is not guaranteed when you use this api with other player api endpoints.

Action Parameters

device_id
string
position_ms
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Set playback volume

Description

Set the volume for the user’s current playback device. this api only works for users who have spotify premium. the order of execution is not guaranteed when you use this api with other player api endpoints.

Action Parameters

device_id
string
volume_percent
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Set repeat mode

Description

Set the repeat mode for the user's playback. this api only works for users who have spotify premium. the order of execution is not guaranteed when you use this api with other player api endpoints.

Action Parameters

device_id
string
state
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Skip to next

Description

Skips to next track in the user’s queue. this api only works for users who have spotify premium. the order of execution is not guaranteed when you use this api with other player api endpoints.

Action Parameters

device_id
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Skip to previous

Description

Skips to previous track in the user’s queue. this api only works for users who have spotify premium. the order of execution is not guaranteed when you use this api with other player api endpoints.

Action Parameters

device_id
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Skip to next

Description

Skips to next track in the user’s queue. this api only works for users who have spotify premium. the order of execution is not guaranteed when you use this api with other player api endpoints. <<DEPRECATED use skip_to_next>>

Action Parameters

device_id
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Start resume playback

Description

Start a new context or resume current playback on the user's active device. this api only works for users who have spotify premium. the order of execution is not guaranteed when you use this api with other player api endpoints. <<DEPRECATED use start_resume_playback>>

Action Parameters

context_uri
string
device_id
string
offset
object
position_ms
integer
uris
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Start resume playback

Description

Start a new context or resume current playback on the user's active device. this api only works for users who have spotify premium. the order of execution is not guaranteed when you use this api with other player api endpoints.

Action Parameters

context_uri
string
device_id
string
offset
object
position_ms
integer
uris
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Toggle playback shuffle

Description

Toggle shuffle on or off for user’s playback. this api only works for users who have spotify premium. the order of execution is not guaranteed when you use this api with other player api endpoints.

Action Parameters

device_id
string
state
booleanRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Transfer playback

Description

Transfer playback to a new device and optionally begin playback. this api only works for users who have spotify premium. the order of execution is not guaranteed when you use this api with other player api endpoints.

Action Parameters

device_ids
arrayRequired
play
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Unfollow artists or users

Description

Remove the current user as a follower of one or more artists or other spotify users.

Action Parameters

ids
arrayRequired
type
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Unfollow playlist

Description

Remove the current user as a follower of a playlist.

Action Parameters

playlist_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update playlist items

Description

To modify a playlist, use rearrange (with `range start`, `insert before`, `range length`, `snapshot id`) or replace items (`uris` in body/query). replace overwrites items. operations can't combine in one request; they are exclusive but share an endpoint.

Action Parameters

insert_before
integer
playlist_id
stringRequired
range_length
integer
range_start
integer
snapshot_id
string
uris
array

Action Response

data
objectRequired
error
string
successful
booleanRequired