Spotify Play Button

Spotify Play Buttons can be added to any webpage that supports <iframe> tags. You can create Play Buttons for albums, tracks, artists, or playlists.

When a logged-in Spotify user clicks the button, the music will start playing in the Spotify player. If the user is not logged into their Spotify account, they will be prompted to do so. If the user does not have a Spotify player they will be sent to the Spotify sign-up page or prompted to download a suitable client, in a new window.

Follow the steps below and you’ll have your site singing in seconds.

You can choose different button themes and sizes, and you can link to any song or album in our music catalog, or to any playlist that you have created. (Note that we do have a few Terms of Use that we need you to comply with.)

Get the Code

Right-click any song, album or playlist in the Spotify player and select “Copy Track Link” or “Copy Spotify URI”:

Multiple tracks player

You can create a playable list of tracks without using a Spotify playlist by specifying a title and a comma-separated list of track IDs. The track ID is the 22 character string found after “spotify:track:” of each Spotify URI.

Adding Spotify Play Buttons on other sites

Can I add a play button on my Facebook, Twitter, WordPress, Tumblr… page?

Controlling through Javascript

Is there a JS SDK for the player? Can I send play/pause commands using Javascript?

The Play button doesn’t have any observable events, nor does it listen for any. Playback can only be triggered by the user clicking the button.
We’re certainly looking at creating a JS SDK; it’s a bigger project and right now we’re focusing on quickly releasing APIs to open up the general Spotify ecosystem (catalogue, playlists, etc).
None of these requests are falling on deaf ears, and we’re working hard to bring out as much functionality as we can.

Customizing the design

Is there any way of customizing the design of the Spotify Play Button? E.g. color, typography…

Currently there is no way no change the design of the Spotify Play Button.

Autoplay

Is there an auto-play option on the widget?

No, there is not. The user has to start playback by clicking on the Play Button, which will open the web player or desktop client to start the playback.

Embedding it in a hybrid mobile app

Is there a way to have this play button on the native iOS or Android app? maybe in a web view?

A Play Button is effectively only a “remote control” for the Spotify web client or the desktop client. If you want to embed audio playback in your mobile app, use the iOS or Android SDKs instead.

Playlists

The playlist rendered is not updated

Any changes you make to a playlist will be synced to your Spotify Play Button within minutes (max 10 mins).

The widget doesn’t render all the tracks within a playlist

We only show the first 200 tracks in any playlist.
A user’s playlist of starred tracks is currently not available.

I can’t find out how to sort the tracks within a playlist

The displayed order is the one in which they are arranged in the playlist for regular playlists, and the order in which they were added in the case of a user’s starred playlist. If you want to change the order in your regular playlists, open (for example) the Spotify Desktop Player and drag-and-drop your tracks into the order you require. Alternatively, you can programmatically reorder tracks through our Web API. See the endpoint for reordering tracks in a playlist.

Can I enable shuffle mode?

At the moment, there is no way to shuffle the playlist’s contents. Note that users can select “Shuffle” in their player after pressing the Play button.

I can’t see local tracks in the Play Button

Local files in playlists are not shown in the Play Button widget.

Other

I can’t use the Play Button’s UI to change the position of the currently playing track

Seeking is not supported by the Play Button.

Terms of Use

To protect users, content providers, the Spotify trademarks, our software and the Spotify service we require you to comply with our Spotify Widget Terms of Use.