Seb Van Deursen
Seb Van Deursen

Reputation: 11

Can I use the Spotify recommendation intelligence in an app?

On the Spotify dashboard an user has a great experience through the recommended artist and songs. I would like to use this intelligence in an app we plan to develop for a big Dutch based podium. So the app can give a list of concerts playing at the poppodium which the user might be interested in.

Can I get this recommended artist data, based on the user's history, through the Spotify API?

Upvotes: 1

Views: 6447

Answers (2)

dgilperez
dgilperez

Reputation: 10796

The Spotify API now provides recommendations:

https://developer.spotify.com/web-api/get-recommendations/

Recommendations are generated based on the available information for a given seed entity and matched against similar artists and tracks. If there is sufficient information about the provided seeds, a list of tracks will be returned together with pool size details.

For artists and tracks that are very new or obscure there might not be enough data to generate a list of tracks.

There are a bunch of parameters that can be configured for fine-tuning the recommendation: key, genre, loudness, energy, instrumentalness, popularity, speechiness, danceability, key ...

Upvotes: 2

José M. Pérez
José M. Pérez

Reputation: 3279

You can use Spotify's Web API endpoints to fetch these data:

  1. The Get a User’s Top Artists and Tracks endpoint will give you artists and tracks based on user's listening history. You can also use the Get Current User’s Recently Played Tracks, which will give you up to 50 recently played tracks.
  2. Use the artists and tracks you just get and use them as seeds for the Get Recommendations Based on Seeds endpoint. This endpoint will only return tracks. If you want to get artists based on other artists there is the Get an Artist’s Related Artists endpoint that you can use.

As you see, combining multiple endpoints will get you covered. Just make sure you read the Web API Authorization Guide before. You are going to need the user to authenticate in order to get user's data.

Note: When the question was first posted (July 2013), Spotify's Web API didn't exist. The question referred to a now defunct Spotify Apps API which didn't provide a way to generate recommendations based on listening history.

Upvotes: 0

Related Questions