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

ActionWhat it does
Add tracks to playlistAdd one or more tracks to a Spotify playlist.
Create playlistCreate a new playlist in your connected Spotify account.
Get album detailsLook up a Spotify album by its ID, including its track list.
Get artist detailsLook up a Spotify artist by their ID.
Get current playbackGet details about what's currently playing on Spotify.
Get track detailsLook up the details of a Spotify track by its ID.
Remove tracks from playlistRemove one or more tracks from a Spotify playlist.
Save albums to librarySave one or more albums to your Spotify library.
Save tracks to librarySave one or more tracks to your Spotify library (Liked Songs).
Search SpotifySearch 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

Playlistplaylist_idtextRequired
The playlist to add tracks to. Paste a Spotify playlist link, a spotify:playlist: URI, or the playlist's ID.
Tracks to addtrack_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 positionpositionnumber
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 namenametextRequired
The name of the new playlist.
Descriptiondescriptiontext
An optional description shown on the playlist in Spotify.
Publicpublictrue/false
Make the playlist visible on your public profile.Default: false.
Collaborativecollaborativetrue/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

Albumalbum_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

Artistartist_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

Tracktrack_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

Playlistplaylist_idtextRequired
The playlist to remove tracks from. Paste a Spotify playlist link, a spotify:playlist: URI, or the playlist's ID.
Tracks to removetrack_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 savealbum_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 savetrack_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 termsquerytextRequired
What to look for: a song, album, artist, or playlist.
What to search forsearch_typetext
Choose the kind of item to search for.One of: track, album, artist, playlist. Default: track.
Number of resultslimitnumber
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"
    }
  ]
}

On this page