Dave Mcpherson
Dave Mcpherson

Reputation: 85

spotify API query not producing Album metadata

I'm trying to build a app that gets info from the Spotify API but since I don't have the Spotify ids I want to grab the ids using search queries.

I wanted to just try it so I tested it with an album called yellow and a band called SCANDAL. However when I query, say, https://api.spotify.com/v1/search?q=album:yellow+artist:scandal&type=album it comes up with nothing. However when I Google the band, I got an artist id: 7hTZwqQILVH4bAbN67CeEz from the URL.

using the get albums query(https://api.spotify.com/v1/artists/7hTZwqQILVH4bAbN67CeEz/albums?album_type=album&limit=5) it shows that the album exists but the original query didn't find it. Am I doing something wrong or does it only work with more popular artists (I tried other albums and it was fine)?

Upvotes: 1

Views: 325

Answers (1)

jooon
jooon

Reputation: 2031

There doesn't seem to be anything wrong with your query. I think you are hitting a bug.

Bug reports for Spotify Web API can be found in Github issues

According to this bug:

https://github.com/spotify/web-api/issues/194

setting no market parameter will make it default to US. Your query seems to confirm this bug. Since SCANDAL Yellow is not available in the US, you will not see it in the results. If you add market=SG for instance, it will show up.

Upvotes: 2

Related Questions