Spotify
App · Music & Podcasts · 10 actions
Search tracks, albums, and artists, build and edit playlists, save music to your library, and see what's playing on Spotify.
Actions
| Action | What it does |
|---|---|
| Add tracks to playlist | Add one or more tracks to a Spotify playlist. |
| Create playlist | Create a new playlist in your connected Spotify account. |
| Get album details | Look up a Spotify album by its ID, including its track list. |
| Get artist details | Look up a Spotify artist by their ID. |
| Get current playback | Get details about what's currently playing on Spotify. |
| Get track details | Look up the details of a Spotify track by its ID. |
| Remove tracks from playlist | Remove one or more tracks from a Spotify playlist. |
| Save albums to library | Save one or more albums to your Spotify library. |
| Save tracks to library | Save one or more tracks to your Spotify library (Liked Songs). |
| Search Spotify | Search Spotify for tracks, albums, artists, or playlists by keyword and return the top matches. |
Add tracks to playlist
Add one or more tracks to a Spotify playlist.
Inputs
- Playlist
playlist_idtextRequired - The playlist to add tracks to. Paste a Spotify playlist link, a spotify:playlist: URI, or the playlist's ID.
- Tracks to add
track_urislistRequired - A list of tracks to add (up to 100). Each item can be a Spotify track link, a spotify:track: URI, or a track ID. Build the list with a Create a list step.
- Insert position
positionnumber - Where to place the tracks, counting from 0. Leave empty to add them at the end.At least 0.
Outputs
snapshot_idtext- Playlist snapshot ID representing the current version after tracks were added.
Example output
{
"snapshot_id": "abc123xyz789"
}Create playlist
Create a new playlist in your connected Spotify account. You can add a description, choose whether it's public, and make it collaborative.
Inputs
- Playlist name
nametextRequired - The name of the new playlist.
- Description
descriptiontext - An optional description shown on the playlist in Spotify.
- Public
publictrue/false - Make the playlist visible on your public profile.Default:
false. - Collaborative
collaborativetrue/false - Let others add and remove tracks. A collaborative playlist must be private, so keep Public set to No.Default:
false.
Outputs
playlistobject- Playlist details
Example output
{
"playlist": {
"collaborative": false,
"id": "abc123xyz789",
"name": "Sample Item",
"public": false,
"uri": "spotify:playlist:abc123xyz"
}
}Get album details
Look up a Spotify album by its ID, including its track list.
Inputs
- Album
album_idtextRequired - The album to look up. Paste a Spotify album link, a spotify:album: URI, or the album's ID.
Outputs
albumobject- Album details
Example output
{
"album": {
"artists": [
"mock_value"
],
"id": "abc123xyz789",
"name": "Sample Item",
"release_date": "2020-01-01",
"total_tracks": 1,
"tracks": [
{
"id": "trk123",
"name": "Sample Track",
"uri": "spotify:track:trk123"
}
],
"uri": "spotify:album:abc123xyz"
}
}Get artist details
Look up a Spotify artist by their ID.
Inputs
- Artist
artist_idtextRequired - The artist to look up. Paste a Spotify artist link, a spotify:artist: URI, or the artist's ID.
Outputs
artistobject- Artist details
Example output
{
"artist": {
"followers": 1,
"genres": [
"mock_value"
],
"id": "abc123xyz789",
"name": "Sample Item",
"popularity": 1,
"uri": "spotify:artist:abc123xyz"
}
}Get current playback
Get details about what's currently playing on Spotify.
Inputs
None.
Outputs
devicetext- Active device name, or null when no device is active
is_playingtrue/false- True if a track is currently playing, false if paused or nothing is playing
progress_msnumber- Current playback position in milliseconds, or null when nothing is playing
trackobject- Currently playing track, or null when nothing is playing
Example output
{
"device": "Web Player",
"is_playing": true,
"progress_ms": 1,
"track": {
"artists": [
"mock_value"
],
"id": "abc123xyz789",
"name": "Sample Item",
"uri": "spotify:track:abc123xyz"
}
}Get track details
Look up the details of a Spotify track by its ID.
Inputs
- Track
track_idtextRequired - The track to look up. Paste a Spotify track link, a spotify:track: URI, or the track's ID.
Outputs
trackobject- Track details
Example output
{
"track": {
"album": "Greatest Hits",
"artists": [
"mock_value"
],
"duration_ms": 1,
"id": "abc123xyz789",
"name": "Sample Item",
"preview_url": "https://example.com/path/123",
"uri": "spotify:track:abc123xyz"
}
}Remove tracks from playlist
Remove one or more tracks from a Spotify playlist.
Inputs
- Playlist
playlist_idtextRequired - The playlist to remove tracks from. Paste a Spotify playlist link, a spotify:playlist: URI, or the playlist's ID.
- Tracks to remove
track_urislistRequired - A list of tracks to remove (up to 100). Each item can be a Spotify track link, a spotify:track: URI, or a track ID. Build the list with a Create a list step.
Outputs
snapshot_idtext- Playlist snapshot ID representing the current version after tracks were removed.
Example output
{
"snapshot_id": "abc123xyz789"
}Save albums to library
Save one or more albums to your Spotify library.
Inputs
- Albums to save
album_urislistRequired - A list of albums to save (up to 50). Each item can be a Spotify album link, a spotify:album: URI, or an album ID. Build the list with a Create a list step.
Outputs
countnumber- How many albums were saved.
savedtrue/false- True when the albums were saved.
Example output
{
"count": 1,
"saved": true
}Save tracks to library
Save one or more tracks to your Spotify library (Liked Songs).
Inputs
- Tracks to save
track_urislistRequired - A list of tracks to save (up to 50). Each item can be a Spotify track link, a spotify:track: URI, or a track ID. Build the list with a Create a list step.
Outputs
countnumber- How many tracks were saved.
savedtrue/false- True when the tracks were saved.
Example output
{
"count": 1,
"saved": true
}Search Spotify
Search Spotify for tracks, albums, artists, or playlists by keyword and return the top matches.
Inputs
- Search terms
querytextRequired - What to look for: a song, album, artist, or playlist.
- What to search for
search_typetext - Choose the kind of item to search for.One of:
track,album,artist,playlist. Default:track. - Number of results
limitnumber - How many results to return (1-50). Defaults to 5.From 1 to 50. Default:
5.
Outputs
resultslist- List of matching items.
Example output
{
"results": [
{
"artists": [
"mock_value"
],
"id": "abc123xyz789",
"name": "Sample Item",
"type": "track",
"uri": "spotify:track:abc123xyz"
}
]
}