Controlling Playback Anywhere
Spotify's Player API — originally launched in 2017 as the Spotify Connect Web API — gives developers a programmatic path to start, stop, and manage audio playback from any internet-connected device. Before that API existed, the only official route was an AppleScript interface to Spotify's Mac desktop app, which let third-party apps observe the current track and toggle playback. The web API opened those capabilities to a much wider range of clients, and subsequent releases have expanded it further: the Web Playback SDK (2018) added a browser-based player for Premium users, and a queue-add endpoint (2020) let apps push tracks into the "Up next" list.
Sending Playback Commands
All command endpoints require an OAuth token with the user-modify-playback-state scope. They operate against any available Spotify Connect device, and most commands require a Premium subscription.
Start and Stop
The core endpoint is /v1/me/player/play, which begins or resumes playback. Unlike the simple play button in Spotify's own apps, the API accepts a number of options:
- A list of track IDs, or a context such as a playlist, album, or a saved collection like Liked Songs.
- A target device identifier, from an active Web Playback SDK instance, a running Spotify app, or a Connect-enabled speaker. The Devices API returns available identifiers, though not all devices are supported.
- A volume level from 0 to 100.
- A playback offset by one or more playlist items — useful for jumping straight to the third track in a playlist, for example.
To stop audio, the pause endpoint halts the current playback. A subsequent request to the play endpoint — with no options — resumes from where the pause occurred.
Queue, Volume, and Seeking
Three additional commands cover common playback interactions:
- Set volume between 0 and 100 via a dedicated endpoint, often used to implement volume sliders in custom interfaces.
- Add to queue: push songs or podcast episodes into the "Up next" list. Note there is currently no API for reading or removing items already in the queue.
- Seek: move the audio cursor to a specified millisecond position within the currently playing track or episode. The Web Playback SDK's scrubbing UIs typically rely on this endpoint.
Observing Playback State
Sending commands is only half the story. Observation endpoints — accessible with a token authorized for the user-read-playback-state scope — let your app understand the current listening environment.
Available Devices
The Devices API endpoint returns a list of active devices that can receive playback commands. This includes open Web Playback SDK apps, online Spotify Connect speakers, and Spotify's own open clients like the web player.
Current Playback
A GET request to the player endpoint reveals what's currently playing, the active device, the surrounding context, and playback settings such as shuffle and repeat state.
Example Applications
Social Listening and Ambience
Developers have combined playback data with Spotify's Audio Features API to create responsive experiences. A common pattern: fetch the currently playing track's estimated danceability or tempo, then drive a programmable lighting system to match the music's mood. Combining the Player API with the Web Playback SDK also enables synchronized "listening parties," where a web app tracks each listener's position and uses the seek endpoint to keep a group aligned on the same songs.
Home Automation Routines
Since many home automation platforms are extensible, the Player API can tie audio into existing routines. A morning scenario might trigger the play endpoint to start a favorite podcast at the same time a connected coffee machine begins brewing.
Getting Started
Any Spotify Premium user with programming experience can build a Player API app for personal or shared use. Spotify's developer forum and the Developer Showcase offer places to connect with other developers and see examples of third-party integrations. To begin, register an app through the Spotify for Developers portal.



