Experiments with Spotify Web API: Decoding their recommendation system
2 min readMay 14, 2022
In this article I am extending my experiments with Spotify Web API to discover how their recommendation system works. Let’s see if we can answer these questions:
- Does exploring the patterns in user data provide any cues about their taste of music?
- Can we relate the data they expose through their Web APIs to the recommendations they make?
Step-by-step procedure for the experiment
- Download Liked Songs from Spotify Web API.
- Create a list of all the artists appearing on the liked songs.
- Get the information for each of the artist appearing on your liked songs.
- Create the list of genres of the artists.
- Count the number of times a particular genre appears in the genre list.
- Plot the genre cloud using counts developed in step 5.
Key observations
- In my case, I can clearly see a link between the genre of the artists appearing on my liked songs and the mixes recommended by Spotify. For example, Pop Mix and House Mix are the clear examples of this.
- The genre counts also give us clear insight into the top genres. It is clear that pop should be the top genre.
- Instead of making a playlist, adding songs to the ‘liked songs’ can significantly improve the recommendation. Recommendations will further improve if you decide to enhance the liked songs, and like the songs added by Spotify. Specifically, this will narrow down their understanding of your taste of music.
Thanks for your time. Please feel free to leave your thoughts on the experiment.