Spotify Partnership

The Echo Nest has linked our IDs to Spotify, making it easy for Echo Nest developers to work with Spotify, and vice-versa.

Spotify is a new way to listen to music. Millions of tracks, any time you like. Just search for it in Spotify, then play it.

Available Assets

The Spotify catalog contains millions and millions of tracks and albums, with 10,000 tracks being added every day.

Rights & Responsibilities

Spotify has a developer program that allows third party application development on top of the Spotify platform. The Spotify Apps API, libspotify and the Metadata API all offer ways for developers to build software on the Spotify platform. You can find more at Spotify's GitHub page.

Different Spotify APIs have different terms of use, which you should carefully review before starting development. The libspotify Terms of Use, Metadata Terms of Use, and the Spotify Apps Developer Terms of Use should be reviewed if you plan on using the associated API.

Getting Started

When making calls to the Echo Nest API, use the spotify-WW bucket to get access to Spotify IDs.

As an example, Radiohead has a Spotify ID of 'spotify:artist:4Z8W4fKeB5YxbusRsdQVPb'. To find biographies for Radiohead using our API, starting from the Spotify ID, you would issue a query like this:

Note that the id parameter is of the form catalog:entity:id, in this case, spotify-WW is the catalog; artist is the entity, and 'spotify:artist:4Z8W4fKeB5YxbusRsdQVPb' is the artist ID in the Spotify catalog.

You can also retrieve artist information and receive their IDs in the Spotify name space. To do this, you use the bucket=id:spotify-WW parameter on any call that returns artists, songs or tracks. As an example, to find artists similar to Radiohead, with Spotify foreign IDs returned, issue a call like this:

Note that the id parameter is of the form catalog:entity:id; in this case, spotify-WW is the catalog; artist is the entity, and 'spotify:artist:4Z8W4fKeB5YxbusRsdQVPb' is the artist ID in the Spotify catalog. Example results:

{
	name: "Manic Street Preachers",
	foreign_ids: [
		{
			catalog: "spotify-WW",
			foreign_id: "spotify-WW:artist:2uH0RyPcX7fnCcT90HFDQX"
		}
	],
	id: "ARGEJ8B1187B9AE2E7"
}

Note that for each artist returned, there is a new foreign_ids block that includes a foreign_id of the form catalog:entity:id, in this case, 'spotify-WW:artist:2uH0RyPcX7fnCcT90HFDQX'. To use this id with the Spotify API directly, change the 'spotify-WW' to 'spotify'. In this example, you would change 'spotify-WW:artist:2uH0RyPcX7fnCcT90HFDQX' to 'spotify:artist:2uH0RyPcX7fnCcT90HFDQX'.

Finally, note that to get the actual track data from Spotify, you can add the bucket=id:spotify-WW to a call that contains track information. Example:

Returns the following result:

songs: [
{
    title: "Karma Police"
    artist_name: "Radiohead"
    id: "SOHJOLH12A6310DFE5"
    tracks: [
              {
              "catalog": "spotify-WW",
              "foreign_id": "spotify-WW:track:3L7BcXHCG8uT92viO6Tikl",
              "id": "TRAVAWH13386461C1A"
              }    
           ]
  }
]			

To use that id, 'spotify-WW:track:3L7BcXHCG8uT92viO6Tikl', in a call to a Spotify API, replace the 'spotify-WW' with 'spotify'. In this example, the Spotify track identifier would be 'spotify:track:3L7BcXHCG8uT92viO6Tikl'.

Similarly, you can create a playlist that returns Spotify IDs with a call such as: