Announcements

Help Wizard

Step 1

NEXT STEP

Search API returning many more results than before. Are field filters being ignored?

Search API returning many more results than before. Are field filters being ignored?

In the last week or so it seems like the search API is now returning many more results than previously.

Is this intended behaviour? Is it documented anywhere, and is it possible to obtain the previous behaviour?

 

For example:

curl -X "GET" "https://api.spotify.com/v1/search?q=album%3ANevermind%20artist%3ANirvana&type=album&market=GB" -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer xxx"

Returns a large number of results, include "Nirvana" by "A7S" and "Never Mind The Breeze Blocks" by "Bob The Builder"!

These results are useless. It is as though the field filters are being ignored completely.

Reply
7 Replies

murraypaul, I'm seeing this also as of yesterday and currently, so at least I can confirm your report.  My use of the Web API search endpoint hasn't changed in well over a year, so I do suspect something has changed in the endpoint's recognition of the `q` parameter where I also use track, album and artist to filter results.

 

I don't have a fix, but I did discover a work around.  I created a new free Spotify account which I then authorized my app against.  For whatever reason, that Spotify account gets the behavior documented in the Spotify Web API reference I expect and works fine.

 

My previous account still doesn't work if I switch back to it.  Also, removing my app's Spotify authorization and re-authorizing doesn't help my old account either.  Only my new account works (which is fine for me since search is a free API).

 

I hope that's helpful and let post if we learn more.

Sadly that doesn't reproduce for me.

I created a free account and tested with the Developer Console, and still get junk results.

Bummer! Thanks for trying. I also saw this once before and Spotify fixed it
in a few days, so fingers crossed. I'll look today and see if there's an
official issue tracker of theirs we can post to.

Sorry for the delay, but I did post https://community.spotify.com/t5/Spotify-for-Developers/Web-API-Search-Endpoint-Misinterprets-q-Para... today to start tracking this issue.

BQBl_uz4Ia_XvGo_51GFvldTtDL9bRYq0C_NE7rq2UXrpOVNNNJKcr7ajHkue-c_SwAmAOgxwSYAc5cNEmTuwaFQ-VU-N2dUY5aj-w7BVjycgoO-A2cH0gQkHCn27J238pOBWk0xe5CAiuo-20MKwgw8ZslRC4TSD5UaNEBGmB2kSFc16_BmXvA

For anyone else tracking this issue, I was able to confirm today that three previously affected accounts no longer exhibit this bug.  While I never heard anything from Spotify, this is certainly a welcome improvement.  If anyone else can also confirm their affected accounts improved that is helpful.  Thanks!

This issue had resurfaced about three weeks ago and been consistently a problem since.  Fortunately it seems to be working again today.  I'd been in touch with @SpotifyPlatform and @SpotifyCares via Twitter.  They acknowledged the issue, but I hadn't heard directly from them to confirm it was fixed before noticing today it's working as desired for me.  I hope everyone else sees their expected behavior as well.  If not, keep your status posted here on the community and with Spotify via Twitter.

Suggested posts