Can I use the Spotify API to discover similar artists?

I’m interested in whether the Spotify API allows me to find artists that are similar to a particular musician. When you visit an artist’s profile on Spotify, there’s often a section that highlights similar artists. I’m curious if I can access that information through the API. While I know there are other APIs like Last.fm or EchoNest that offer similar functionalities, my main question is whether Spotify’s API provides this feature. Has anyone tried this before? What would the best method be to fetch this kind of data using Spotify’s API?

Yeah, I hit this same problem building a recommendation engine earlier this year. The related-artists endpoint exists and works, but here’s the thing - it pulls from different data than what you see in the actual Spotify app. Their internal similarity algorithms are way more sophisticated than what they expose through the API. I got better results by analyzing shared playlist appearances and using audio features to calculate cosine similarity between artists. Just fetch multiple tracks per artist, extract their audio characteristics, then find artists with similar feature profiles. It’s more API calls but you get way more control over what “similar” actually means for your use case.

Unfortunately, Spotify removed their direct endpoint for fetching similar artists a while back, which used to be /artists/{id}/related-artists. I learned this through my own experience while working on a music recommendation project. Although the endpoint still exists, it doesn’t return the same quality of data that the app offers. A practical workaround is to utilize their audio features endpoint along with a search for tracks that share certain characteristics, such as danceability or energy. This way, you can gather artists from those results based on your defined similarity metrics. Another option is to leverage Last.fm’s similar artists API, which still provides reliable artist relationship data.

Been using the related-artists endpoint for six months - it works but results are hit or miss based on how popular the artist is. Mainstream acts give you solid suggestions, but niche/indie stuff? Pretty bare. You’re supposed to get up to 20 related artists but usually see way fewer. What I do now is combine it with playlist analysis - search for playlists with your target artist and pull other artists from those. Works way better and catches subtle connections the main endpoint totally misses, especially when you’re hunting for stuff in specific subgenres.

the /artists/{id}/related-artists endpoint works fine for me - just used it last week. double-check your api calls maybe? data quality varies, but it’s definitely returning related artists for most popular musicians i’ve tested.

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.