> ## Documentation Index
> Fetch the complete documentation index at: /llms.txt
> Use this file to discover all available pages before exploring further.

# Spotify

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

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

`spotify` · **88 tools** · **3 triggers**

## Connect it

```bash
run auth spotify
run auth spotify --scope team    # shared with the organization
```

Or from the [Integrations page](https://app.boxd.sh/integrations) in the console. See [Connections](/guides/integrations/connections.md) for personal versus shared, and who may remove one.

## Use it

```bash
run spotify          # common commands
run spotify --all    # every command
```

```ts
import { spotify } from "@boxd/run";
```

## Common tools

| Tool | What it does |
| - | - |
| `add-items-to-playlist` | Add one or more items to a user's playlist. |
| `create-playlist` | Create a playlist for a Spotify user. (The playlist will be empty until you [add tracks](/documentation/web-api/reference/add-tracks-to-playlist).)... |
| `get-artist-s-top-tracks` | Get Spotify catalog information about an artist's top tracks by country/market. |
| `get-playlist` | Get a playlist owned by a Spotify user. This endpoint retrieves detailed information about a specific Spotify playlist, including its metadata (name... |
| `get-show` | Get Spotify catalog information for a single show (podcast) identified by its unique Spotify ID. |
| `get-show-episodes` | Get Spotify catalog information about a show's episodes. Optional parameters can be used to limit the number of episodes returned. |
| `save-albums-for-current-user` | Save one or more albums to the current user's 'Your Music' library. |
| `save-tracks-for-current-user` | Save one or more tracks to the current user's 'Your Music' library. |

> [accordion] All 88 tools
>
> | Tool | What it does |
> | - | - |
> | `add-items-to-playlist` | Add one or more items to a user's playlist. |
> | `add-item-to-playback-queue` | Add an item to the end of the user's current playback queue. |
> | `change-playlist-details` | Change a playlist's name and public/private state. The user must own the playlist. |
> | `check-if-user-follows-artists-or-users` | Check to see if the current user is following one or more artists or other Spotify users. |
> | `check-if-users-follow-playlist` | Check if the current authenticated user is following a specified playlist. |
> | `check-user-s-saved-albums` | Check if one or more albums is already saved in the current Spotify user's 'Your Music' library. |
> | `check-user-s-saved-audiobooks` | Check if one or more audiobooks are already saved in the current Spotify user's library. |
> | `check-user-s-saved-episodes` | Check if one or more podcast episodes are saved in the current Spotify user's 'Your Episodes' library. |
> | `check-user-s-saved-shows` | Check if one or more shows is already saved in the current Spotify user's library. |
> | `check-user-s-saved-tracks` | Check if one or more tracks is already saved in the current Spotify user's 'Your Music' library. |
> | `create-playlist` | Create a playlist for a Spotify user. (The playlist will be empty until you [add tracks](/documentation/web-api/reference/add-tracks-to-playlist).)... |
> | `follow-artists-or-users` | Follow one or more artists or Spotify users on behalf of the current authenticated user. |
> | `follow-playlist` | Add the current user as a follower of a playlist. This action adds the current user as a follower of a specified playlist. |
> | `get-chapter` | Get Spotify catalog information for a single audiobook chapter including name, description, duration, release date, narrators, and playback information. |
> | `get-album` | Get Spotify catalog information for a single album. Returns comprehensive album data including metadata, track listing, artist information, cover... |
> | `get-album-tracks` | Get Spotify catalog information about an album's tracks. Optional parameters can be used to limit the number of tracks returned. |
> | `get-audiobook` | Get Spotify catalog information for a single audiobook. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets. |
> | `get-artist` | Get detailed Spotify catalog information for a single artist. |
> | `get-artist-s-albums` | Get Spotify catalog information about an artist's albums. |
> | `get-artist-s-related-artists` | Get Spotify catalog information about artists similar to a given artist. |
> | `get-artist-s-top-tracks` | Get Spotify catalog information about an artist's top tracks by country/market. |
> | `get-audiobook-chapters` | Get Spotify catalog information about an audiobook's chapters. |
> | `get-available-devices` | Get information about the user's available Spotify Connect devices. |
> | `get-available-genre-seeds` | Get available genre seeds for Spotify recommendations. Returns a list of genre strings that can be used as seed\_genres parameter when requesting music recommendations. |
> | `get-available-markets` | Get the list of markets where Spotify is available. Returns an array of ISO 3166-1 alpha-2 country codes. |
> | `get-category-s-playlists` | Get Spotify playlists tagged with a specific category (e.g., 'workout', 'party', 'dinner'). |
> | `get-currently-playing-track` | Get the object currently being played on the user's Spotify account. |
> | `get-current-user-s-playlists` | Get a list of the playlists owned or followed by the current Spotify user. |
> | `get-current-user-s-profile` | Get detailed profile information about the current authenticated user. |
> | `get-episode` | Get Spotify catalog information for a single podcast episode identified by its unique Spotify ID. |
> | `get-featured-playlists` | Get a list of Spotify's editorially curated featured playlists. |
> | `get-followed-artists` | Get all artists followed by the current user. Returns a cursor-paginated list of artist objects with full details including name, genres, popularity... |
> | `get-new-releases` | Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player's "Browse" tab). |
> | `get-playback-state` | Get information about the user's current playback state, including track or episode, progress, and active device. |
> | `get-playlist` | Get a playlist owned by a Spotify user. This endpoint retrieves detailed information about a specific Spotify playlist, including its metadata (name... |
> | `get-playlist-cover-image` | Get the current image(s) associated with a specific playlist. |
> | `get-playlist-items` | Get full details of the items of a playlist owned by a Spotify user. |
> | `get-recently-played-tracks` | Get tracks from the current user's recently played tracks. ***Note**: Currently doesn't support podcast episodes.* |
> | `get-recommendations` | Get track recommendations based on seed artists, genres, and/or tracks. |
> | `get-several-albums` | Get Spotify catalog information for multiple albums identified by their Spotify IDs. |
> | `get-several-artists` | Get Spotify catalog information for several artists based on their Spotify IDs. |
> | `get-several-audiobooks` | Retrieve Spotify catalog information for multiple audiobooks in a single request. |
> | `get-several-browse-categories` | Get a list of categories used to tag items in Spotify (on, for example, the Spotify player's "Browse" tab). |
> | `get-several-chapters` | Get Spotify catalog information for several audiobook chapters identified by their Spotify IDs. |
> | `get-several-episodes` | Get Spotify catalog information for several episodes based on their Spotify IDs. |
> | `get-several-shows` | Get Spotify catalog information for several shows (podcasts) based on their Spotify IDs. |
> | `get-several-tracks` | Get Spotify catalog information for multiple tracks based on their Spotify IDs. |
> | `get-several-tracks-audio-features` | Get audio features for multiple tracks based on their Spotify IDs. |
> | `get-show` | Get Spotify catalog information for a single show (podcast) identified by its unique Spotify ID. |
> | `get-show-episodes` | Get Spotify catalog information about a show's episodes. Optional parameters can be used to limit the number of episodes returned. |
> | `get-single-browse-category` | Get a single category used to tag items in Spotify (on, for example, the Spotify player's "Browse" tab). |
> | `get-user-s-queue` | Get the list of tracks and episodes in the user's playback queue. |
> | `get-track` | Get Spotify catalog information for a single track identified by its unique Spotify ID. |
> | `get-track-s-audio-analysis` | Get a comprehensive audio analysis for a Spotify track. Returns detailed structural and musical characteristics including: - Meta information... |
> | `get-track-s-audio-features` | Get audio feature information for a single track identified by its unique Spotify ID. |
> | `get-user-s-playlists` | Get a paginated list of playlists owned or followed by a Spotify user. |
> | `get-user-s-profile` | Get public profile information about a Spotify user. This endpoint retrieves publicly available information for any Spotify user, including their... |
> | `get-user-s-saved-albums` | Get a list of albums saved in the current Spotify user's library ('Your Music'). |
> | `get-user-s-saved-audiobooks` | Get a list of the audiobooks saved in the current Spotify user's 'Your Music' library. |
> | `get-user-s-saved-episodes` | Get a list of episodes saved in the current Spotify user's library. |
> | `get-user-s-saved-shows` | Get a list of shows saved in the current Spotify user's library. |
> | `get-user-s-saved-tracks` | Get a list of the songs saved in the current Spotify user's 'Your Music' library. |
> | `get-user-s-top-artists` | Get the current user's top artists based on calculated affinity. |
> | `get-user-s-top-tracks` | Get the current user's top tracks based on calculated affinity. |
> | `pause-playback` | Pause playback on the user's account. Pauses playback on the currently active device or on a specified device. |
> | `remove-playlist-items` | Remove one or more items from a user's playlist. This endpoint removes tracks or episodes from a playlist. |
> | `remove-users-saved-albums` | Remove one or more albums from the current user's 'Your Music' library. |
> | `remove-user-s-saved-audiobooks` | Remove one or more audiobooks from the current user's Spotify library. |
> | `remove-user-s-saved-episodes` | Remove one or more episodes from the current user's library. |
> | `remove-user-s-saved-shows` | Delete one or more shows from current Spotify user's library. |
> | `remove-user-s-saved-tracks` | Remove one or more tracks from the current user's 'Your Music' library. |
> | `save-albums-for-current-user` | Save one or more albums to the current user's 'Your Music' library. |
> | `save-audiobooks-for-current-user` | Save one or more audiobooks to the current user's library. This action adds audiobooks to the user's saved audiobooks collection, which can be... |
> | `save-episodes-for-current-user` | Save one or more podcast episodes to the current user's library. |
> | `save-shows-for-current-user` | Save one or more shows to current Spotify user's library. Requires the user-library-modify scope. |
> | `save-tracks-for-current-user` | Save one or more tracks to the current user's 'Your Music' library. |
> | `search-for-item` | Get Spotify catalog information about albums, artists, playlists, tracks, shows, episodes or audiobooks that match a keyword string. |
> | `seek-to-position` | Seek to a specific position in the user's currently playing track. |
> | `set-playback-volume` | Set the volume for the user's current playback device. This API only works for users who have Spotify Premium. |
> | `set-repeat-mode` | Set the repeat mode for the user's playback. Controls whether playback should repeat the current track, the current context (playlist, album, etc.), or not repeat at all. |
> | `skip-to-next` | Skips to next track in the user's queue. This API only works for users who have Spotify Premium. |
> | `skip-to-previous` | Skips to the previous track in the user's queue. Requirements: - Spotify Premium subscription - Active playback (user must be currently playing... |
> | `start-resume-playback` | Start a new context or resume current playback on the user's active device. |
> | `toggle-playback-shuffle` | Toggle shuffle on or off for user's playback. This API only works for users who have Spotify Premium. |
> | `transfer-playback` | Transfer playback to a new device and optionally begin playback. |
> | `unfollow-artists-or-users` | Remove the current user as a follower of one or more artists or other Spotify users. |
> | `unfollow-playlist` | Remove the current user as a follower of a playlist. This action removes the current user from following a playlist. |
> | `update-playlist-items` | Either replace all tracks in a playlist OR reorder existing tracks within it. **REPLACE mode**: Use `uris` parameter to completely overwrite all tracks in the playlist. |

## Triggers (3)

Subscribe with `.on(...)` in a script. A trigger with required configuration takes it as the second argument.

| Trigger | Needs | What fires it |
| - | - | - |
| New Device Added | nothing | Triggers when a new device is added. |
| Spotify Playlist Item Change | `playlist_id` | Triggers when songs are added to or removed from a Spotify playlist. |
| New Playlist Created or Deleted | nothing | Triggers when a new playlist is created or deleted. |

[Open Spotify in the console →](https://app.boxd.sh/integrations/detail/spotify)
