<!-- BusyBot node reference — https://busybot.net/tools/spotify/ -->

> Node: Spotify (`spotify`) · Action · v1
> Category: Utility · Credentials: Spotify OAuth2 (`spotifyOAuth2`)
> Updated: 2026-08-16

# Spotify

> Access and control Spotify music data

## Overview

Spotify is a music streaming platform. This tool provides access to the Spotify Web API for searching and retrieving albums, artists, tracks, and playlists; managing user playlists (create, add/remove tracks); accessing user library (liked tracks, followed artists); and controlling playback (play, pause, skip, volume, queue). All operations use OAuth2 authentication via the Spotify API.

**Category:** Utility  
**Tool Name:** `spotify`  
**Version:** 1

**Appearance:** Icon: `si-spotify` | Color: `#1DB954`

## Node Type

**Action** — processes input items and produces output

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool requires **Spotify OAuth2** credentials.
See the [Credentials Guide](https://busybot.net/credentials/spotify-oauth2/) for setup instructions.

### Resources

| Resource | Value |
|----------|-------|
| Album | `album` |
| Artist | `artist` |
| Library | `library` |
| My Data | `myData` |
| Player | `player` |
| Playlist | `playlist` |
| Track | `track` |

### Operations

| Operation | Value | Description |
|-----------|-------|-------------|
| Add Song to Queue | `addSongToQueue` | Add a song to your queue |
| Currently Playing | `currentlyPlaying` | Get your currently playing track |
| Next Song | `nextSong` | Skip to your next track |
| Pause | `pause` | Pause your music |
| Previous Song | `previousSong` | Skip to your previous song |
| Recently Played | `recentlyPlayed` | Get your recently played tracks |
| Resume | `resume` | Resume playback on the current active device |
| Set Volume | `volume` | Set volume on the current active device |
| Start Music | `startMusic` | Start playing a playlist, artist, or album |
| Get | `get` | Get an album, artist, playlist or track by URI or ID |
| Get New Releases | `getNewReleases` | Get a list of new album releases |
| Get Tracks | `getTracks` | Get an album's or a playlist's tracks by URI or ID |
| Search | `search` | Search albums, artists, playlists or tracks by keyword |
| Get Albums | `getAlbums` | Get an artist's albums by URI or ID |
| Get Related Artists | `getRelatedArtists` | Get an artist's related artists by URI or ID |
| Get Top Tracks | `getTopTracks` | Get an artist's top tracks by URI or ID |
| Add an Item | `add` | Add tracks to a playlist by track and playlist URI or ID |
| Create a Playlist | `create` | Create a new playlist |
| Get the User's Playlists | `getUserPlaylists` | Get a user's playlists |
| Remove an Item | `delete` | Remove tracks from a playlist by track and playlist URI or ID |
| Get Audio Features | `getAudioFeatures` | Get audio features for a track by URI or ID |
| Get Liked Tracks | `getLikedTracks` | Get the user's liked tracks |
| Get Following Artists | `getFollowingArtists` | Get your followed artists |

Which operations you see depends on the resource: `player` → `addSongToQueue`, `currentlyPlaying`, `nextSong`, `pause`, `previousSong`, `recentlyPlayed`, `resume`, `volume`, `startMusic`; `album` → `get`, `getNewReleases`, `getTracks`, `search`; `artist` → `get`, `getAlbums`, `getRelatedArtists`, `getTopTracks`, `search`; `playlist` → `add`, `create`, `get`, `getUserPlaylists`, `getTracks`, `delete`, `search`; `track` → `get`, `getAudioFeatures`, `search`; `library` → `getLikedTracks`; `myData` → `getFollowingArtists`.

### Parameters

`Currently Playing`, `Next Song`, `Pause`, `Previous Song` and `Resume` take no parameters of their own — see All Operations.

Wherever an ID is asked for you can paste either a Spotify URI (`spotify:track:0xE4LEFzSNGsz1F6kvXsHU`) or the bare ID.

#### Player: Start Music

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Resource ID (`id`) | `string` | Yes | — | Enter a playlist, artist, or album URI or ID. |

#### Player: Add Song to Queue

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Track ID (`id`) | `string` | Yes | — | Enter a track URI or ID. |

#### Player: Set Volume

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Volume | `number` | Yes | `50` | The volume percentage to set. Between 0 and 100. |

#### Player: Recently Played

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Return All | `boolean` | No | `false` | Whether to return all results or only up to a given limit. |
| Limit | `number` | No | `50` | Max number of results to return. Between 1 and 50. _(shown when Return All is `false`)_ |

#### Album: Get

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Album ID (`id`) | `string` | Yes | — | The album's Spotify URI or ID. |

#### Album: Get Tracks

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Album ID (`id`) | `string` | Yes | — | The album's Spotify URI or ID. |
| Return All | `boolean` | No | `false` | Whether to return all results or only up to a given limit. |
| Limit | `number` | No | `50` | Max number of results to return. Between 1 and 100. _(shown when Return All is `false`)_ |

#### Album: Get New Releases

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Return All | `boolean` | No | `false` | Whether to return all results or only up to a given limit. |
| Limit | `number` | No | `50` | Max number of results to return. Between 1 and 100. _(shown when Return All is `false`)_ |
| Filters | `collection` | No | `{}` | Narrow which new releases are returned. |
| — Country (`country`) | `string` | No | `US` | ISO 3166-1 alpha-2 country code to filter new releases by (e.g. US, GB, DE). |

#### Album: Search

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Search Keyword (`query`) | `string` | Yes | — | The keyword term to search for. |
| Return All | `boolean` | No | `false` | Whether to return all results or only up to a given limit. |
| Limit | `number` | No | `50` | Max number of results to return. Between 1 and 100. _(shown when Return All is `false`)_ |
| Filters | `collection` | No | `{}` | Narrow the search. |
| — Country (`market`) | `string` | No | — | ISO 3166-1 alpha-2 country code. If specified, only content playable in that market is returned. |

#### Artist: Get

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Artist ID (`id`) | `string` | Yes | — | The artist's Spotify URI or ID. _(hidden when Operation is `search`)_ |

#### Artist: Get Albums

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Artist ID (`id`) | `string` | Yes | — | The artist's Spotify URI or ID. _(hidden when Operation is `search`)_ |
| Return All | `boolean` | No | `false` | Whether to return all results or only up to a given limit. |
| Limit | `number` | No | `50` | Max number of results to return. Between 1 and 100. _(shown when Return All is `false`)_ |

#### Artist: Get Related Artists

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Artist ID (`id`) | `string` | Yes | — | The artist's Spotify URI or ID. _(hidden when Operation is `search`)_ |

#### Artist: Get Top Tracks

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Artist ID (`id`) | `string` | Yes | — | The artist's Spotify URI or ID. _(hidden when Operation is `search`)_ |
| Country | `string` | Yes | `US` | Top tracks in which country? Enter the ISO 3166-1 alpha-2 country code (e.g. US, GB, DE). |

#### Artist: Search

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Search Keyword (`query`) | `string` | Yes | — | The keyword term to search for. |
| Return All | `boolean` | No | `false` | Whether to return all results or only up to a given limit. |
| Limit | `number` | No | `50` | Max number of results to return. Between 1 and 100. _(shown when Return All is `false`)_ |
| Filters | `collection` | No | `{}` | Narrow the search. |
| — Country (`market`) | `string` | No | — | ISO 3166-1 alpha-2 country code. If specified, only content playable in that market is returned. |

#### Playlist: Create a Playlist

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Name | `string` | Yes | — | Name of the playlist to create. |
| Additional Fields | `collection` | No | `{}` | Optional playlist settings. |
| — Description | `string` | No | — | Description for the playlist to create. |
| — Public | `boolean` | No | `true` | Whether the playlist is publicly accessible. |

#### Playlist: Add an Item

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Playlist ID (`id`) | `string` | Yes | — | The playlist's Spotify URI or its ID. |
| Track ID (`trackID`) | `string` | Yes | — | The track's Spotify URI or its ID. The track to add/delete from the playlist. |
| Additional Fields | `collection` | No | `{}` | Optional placement settings. |
| — Position | `number` | No | `0` | The new track's position in the playlist. |

#### Playlist: Remove an Item

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Playlist ID (`id`) | `string` | Yes | — | The playlist's Spotify URI or its ID. |
| Track ID (`trackID`) | `string` | Yes | — | The track's Spotify URI or its ID. The track to add/delete from the playlist. |

#### Playlist: Get

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Playlist ID (`id`) | `string` | Yes | — | The playlist's Spotify URI or its ID. |

#### Playlist: Get Tracks

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Playlist ID (`id`) | `string` | Yes | — | The playlist's Spotify URI or its ID. |
| Return All | `boolean` | No | `false` | Whether to return all results or only up to a given limit. |
| Limit | `number` | No | `50` | Max number of results to return. Between 1 and 100. _(shown when Return All is `false`)_ |

#### Playlist: Get the User's Playlists

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Return All | `boolean` | No | `false` | Whether to return all results or only up to a given limit. |
| Limit | `number` | No | `50` | Max number of results to return. Between 1 and 100. _(shown when Return All is `false`)_ |

#### Playlist: Search

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Search Keyword (`query`) | `string` | Yes | — | The keyword term to search for. |
| Return All | `boolean` | No | `false` | Whether to return all results or only up to a given limit. |
| Limit | `number` | No | `50` | Max number of results to return. Between 1 and 100. _(shown when Return All is `false`)_ |
| Filters | `collection` | No | `{}` | Narrow the search. |
| — Country (`market`) | `string` | No | — | ISO 3166-1 alpha-2 country code. If specified, only content playable in that market is returned. |

#### Track: Get

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Track ID (`id`) | `string` | Yes | — | The track's Spotify URI or ID. _(hidden when Operation is `search`)_ |

#### Track: Get Audio Features

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Track ID (`id`) | `string` | Yes | — | The track's Spotify URI or ID. _(hidden when Operation is `search`)_ |

#### Track: Search

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Search Keyword (`query`) | `string` | Yes | — | The keyword term to search for. |
| Return All | `boolean` | No | `false` | Whether to return all results or only up to a given limit. |
| Limit | `number` | No | `50` | Max number of results to return. Between 1 and 100. _(shown when Return All is `false`)_ |
| Filters | `collection` | No | `{}` | Narrow the search. |
| — Country (`market`) | `string` | No | — | ISO 3166-1 alpha-2 country code. If specified, only content playable in that market is returned. |

#### Library: Get Liked Tracks

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Return All | `boolean` | No | `false` | Whether to return all results or only up to a given limit. |
| Limit | `number` | No | `50` | Max number of results to return. Between 1 and 100. _(shown when Return All is `false`)_ |

#### My Data: Get Following Artists

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Return All | `boolean` | No | `false` | Whether to return all results or only up to a given limit. |
| Limit | `number` | No | `50` | Max number of results to return. Between 1 and 50. _(shown when Return All is `false`)_ |

#### All Operations

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Spotify Account | `credential` | No | — | Connect your Spotify account via OAuth2. Pick the connected account this node should use. |
| Max Concurrency | `number` | No | `10` | Maximum number of items to process concurrently. |

## Output Data

Whatever Spotify returns is **merged onto the input item JSON** — the incoming fields pass through unchanged, and binary data is forwarded.

**Operations that return a list fan out** — one output item per record, each merged onto the input item:

| Resource / Operation | One item per |
|----------------------|--------------|
| `player` / `recentlyPlayed` | Recently played entry |
| `album` / `getNewReleases` | New-release album |
| `album` / `getTracks` | Track on the album |
| `album` / `search` | Matching album |
| `artist` / `getAlbums` | Album by the artist |
| `artist` / `getRelatedArtists` | Related artist |
| `artist` / `getTopTracks` | Top track |
| `artist` / `search` | Matching artist |
| `playlist` / `getTracks` | Track in the playlist |
| `playlist` / `getUserPlaylists` | Playlist |
| `playlist` / `search` | Matching playlist |
| `track` / `search` | Matching track |
| `library` / `getLikedTracks` | Liked track |
| `myData` / `getFollowingArtists` | Followed artist |

With **Return All** off, only up to **Limit** records are requested. If the list is empty, the input item produces no output item at all.

**Operations that produce exactly one output item:**

| Resource / Operation | Fields merged onto the item |
|----------------------|-----------------------------|
| `player` / `currentlyPlaying` | The current playback state. |
| `album` / `get`, `artist` / `get`, `playlist` / `get`, `track` / `get` | The full object for that album, artist, playlist or track. |
| `track` / `getAudioFeatures` | The track's audio-feature values. |
| `playlist` / `create` | The created playlist. |
| `playlist` / `add` | Spotify's add response. |
| `player` / `addSongToQueue`, `nextSong`, `pause`, `previousSong`, `resume`, `volume`, `startMusic`, and `playlist` / `delete` | `success: true` — these commands return no content of their own. |

Reference the result downstream by expression, e.g. `{{ $json.name }}` or `{{ $json.id }}`.

## Usage Examples

- Search for tracks by keyword
- Get album details by Spotify URI
- Create a new playlist
- Add a track to a playlist
- Get currently playing track
- Skip to next song
- Set player volume
- Get user liked tracks
- Get artist top tracks by country
- Search for playlists

## Example Configuration

Search tracks by a keyword from the incoming item, limited to a market:

```json
{
  "type": "spotify",
  "parameters": {
    "resource": "track",
    "operation": "search",
    "query": "{{ $json.searchTerm }}",
    "returnAll": false,
    "limit": 20,
    "filters": {
      "market": "US"
    }
  }
}
```

Fetch an album by URI:

```json
{
  "type": "spotify",
  "parameters": {
    "resource": "album",
    "operation": "get",
    "id": "spotify:album:1YZ3k65Mqw3G8FzYlW1mmp"
  }
}
```

Get an artist's top tracks in Germany:

```json
{
  "type": "spotify",
  "parameters": {
    "resource": "artist",
    "operation": "getTopTracks",
    "id": "spotify:artist:4LLpKhyESsyAXpc4laK94U",
    "country": "DE"
  }
}
```

Create a private playlist:

```json
{
  "type": "spotify",
  "parameters": {
    "resource": "playlist",
    "operation": "create",
    "name": "Favorite Songs",
    "additionalFields": {
      "description": "These are all my favorite songs.",
      "public": false
    }
  }
}
```

Add a track from the incoming item to the top of a playlist:

```json
{
  "type": "spotify",
  "parameters": {
    "resource": "playlist",
    "operation": "add",
    "id": "spotify:playlist:37i9dQZF1DWUhI3iC1khPH",
    "trackID": "{{ $json.trackUri }}",
    "additionalFields": {
      "position": 0
    }
  }
}
```

Remove a track from a playlist:

```json
{
  "type": "spotify",
  "parameters": {
    "resource": "playlist",
    "operation": "delete",
    "id": "spotify:playlist:37i9dQZF1DWUhI3iC1khPH",
    "trackID": "spotify:track:0xE4LEFzSNGsz1F6kvXsHU"
  }
}
```

List every liked track in the library — one item each:

```json
{
  "type": "spotify",
  "parameters": {
    "resource": "library",
    "operation": "getLikedTracks",
    "returnAll": true
  }
}
```

Queue a track and then start playback of an album:

```json
{
  "type": "spotify",
  "parameters": {
    "resource": "player",
    "operation": "addSongToQueue",
    "id": "spotify:track:0xE4LEFzSNGsz1F6kvXsHU"
  }
}
```

```json
{
  "type": "spotify",
  "parameters": {
    "resource": "player",
    "operation": "startMusic",
    "id": "spotify:album:1YZ3k65Mqw3G8FzYlW1mmp"
  }
}
```

Set the volume on the active device:

```json
{
  "type": "spotify",
  "parameters": {
    "resource": "player",
    "operation": "volume",
    "volumePercent": 30
  }
}
```

Browse new releases for a country:

```json
{
  "type": "spotify",
  "parameters": {
    "resource": "album",
    "operation": "getNewReleases",
    "returnAll": false,
    "limit": 20,
    "filters": {
      "country": "GB"
    }
  }
}
```

### Error Handling

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes failed items to Error output port |

## Tips

Access and control Spotify music data — search and retrieve albums, artists, tracks and playlists, manage your playlists and library, and control playback.

### Behavior notes

- **Player operations need an active device.** Spotify only accepts play, pause, skip, volume and queue commands when something is already playing or a device is active on the account; otherwise the API rejects the call.
- **URIs and bare IDs both work.** `spotify:track:0xE4LEFzSNGsz1F6kvXsHU` and `0xE4LEFzSNGsz1F6kvXsHU` are interchangeable in every ID field.
- **Two different Track ID fields exist.** On the player it is written as `id`; on a playlist add or remove it is `trackID`. Getting them the wrong way round in hand-written configuration is the most common mistake with this node.
- **Return All pages through everything.** On a large library or a long playlist that means many API calls; leave it off and set a Limit when you only need a sample.
- **Country filters differ by operation.** New releases take a plain `country` code, while the search filters take a `market` code — both are ISO 3166-1 alpha-2.
- **Scopes matter.** Library, My Data, playlist modification and every player command require the matching Spotify scopes on the connected account; a `403` from Spotify almost always means a missing scope rather than a bad ID.