Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Web API `Search` Endpoint Misinterprets `q` Parameters For `track`, `album` And `artist`

Web API `Search` Endpoint Misinterprets `q` Parameters For `track`, `album` And `artist`

Here's an interesting possible bug and sorry if I didn't find where it was already reported.  It makes the Web API search endpoint unusable except with some "magic" accounts that receive the expected behavior, which had been present for almost two years at least.

 

🐞 The Web API's `Search` endpoint is behaving differently for some of my user accounts, of which I have a few from over the years.  I use the `q` parameter with the embedded `track`, `album` and `artist` values to search for tracks.

 

URL Example: https://api.spotify.com/v1/search?q=track%3AUprising%20album%3AThe%20Resistance%20artist%3AMuse%20&t...

 

Expected Result:

- Results should not be returned if the keywords for track, album and artist are not present in the applicable fields of the result track

- Results should be consistent across user accounts, regardless of plan status

 

Actual Result:

- Many more results are returned which do not match the track, album and artist.  For instance, the track named "Hysteria" from album "Absolution" by artist "Muse" is included where the `q` parameter specified "Uprising" for `name` and "The Resistance" for `album`

- Some user accounts receive the expected result while others receive this actual result

 

This has been happening consistently for affected accounts since about 2022-May-13.  I'd be happy to provide more detail.  Also, could something about the URL encoding have changed? I've been using this URL encoding scheme since November-2020 if that helps.

 

Country: USA

Plan: Premium Or Free Plan

Oauth Flow: Authorization Code Flow

HTTP Status: HTTP 200

Device: Google Pixel 6 Pro, Android 12

Reply
5 Replies

Hi!

Yes, I can confirm I got the same issue for a couple of days maybe weeks now. The search method is returning more results and many are not relevant at all. And you are right, it seems that the search endpoint is not returning the same results for all users and some users got so strange results when using this endpoint now...

 

Maybe Spotify Developers got some info about a recent change related to this search endpoint ?

Thanks for confirming, blackarcanis.  I'm also still seeing this bug after a month now.  Let's all keep this thread active until we get a response from the Spotify side.

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!

Updated for 2022-Jul-06: This issue has spontaneously started occurring again.  I'll continue tracking and attempting to contact Spotify 🙏🏻

Updated for 2022-Jul-29:  I've been seeing this issue consistently since my last update.  However, today the original desired behavior of the `q` parameter seems to have been restored.  I've been in touch with @SpotifyPlatform and @SpotifyCares via Twitter.  They did acknowledge the issue, but I haven't yet received an official reply to confirm this issue was fixed.  That said, this endpoint is working again and sooooo much better when `q` works as documented so "Thanks!" and let's all hope it doesn't regress again.

Suggested posts