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

API - search for tracks is flaky

API - search for tracks is flaky

 

Plan

Free

Country

Romania

Device

Web API

Operating System

Windows

 

My Question or Issue

https://api.spotify.com/v1/search?q=track:Chiquitita%20artist:ABBA&type=track

 

It returns me no data.

 

But it only works with such a search:
https://api.spotify.com/v1/search?q=Chiquitita Abba&type=track

 

According to the documentation: https://developer.spotify.com/documentation/web-api/reference/search

 

They say: The artist and year filters can be used while searching albums, artists and tracks. The isrc and track filters can be used while searching tracks.

It is flaky - I remember I had this issue in the past. It sometimes work, but sometimes it returns no data.

Reply
11 Replies

Yup, can confirm that I have the same problem with my own Spotify API project. The search simply returns an empty list if the query contains advanced search tags like "artist:" and "track:"

 

Selbi_0-1731762618704.png

 

This 100% used to work only a few days ago, because I didn't touch my code at all recently. It's like Spotify's search API decided to stop playing nice overnight.

Thanks for confirming it, too.

Just wanted to drop by and let you know that we are currently looking over the search functionality. Hopefully we will have some good news to share soon.

Thank you!

this api is also not working for me as well. please look into this since i haven't made any change to my code for a while

Try to make sure you URL encode the : character (%3A) in the request, otherwise you will not get any search results. That is why https://api.spotify.com/v1/search?q=track:Chiquitita%20artist:ABBA&type=track does not return any data, while https://api.spotify.com/v1/search?q=Chiquitita Abba&type=track does. 

 

You can also see in the developer console that the href you get back has done this. You can also see in the example for the query parameter in the documentation, that this is being done: Exampleq=remaster%2520track%3ADoxy%2520artist%3AMiles%2520Davis

Either I'm misunderstanding something or that isn't the fix. As soon as I remove the "remaster" stuff from that example query, I get no more results:

 

Selbi_0-1732701065459.png

Selbi_1-1732701104104.png

 

I replied in another thread on the issue. But basically we were able to reproduce, found that there was an ongoing experiment in an upstream system that was causing this issue, and stopped that experiment. I could see that the behavior went back to normal (if you search with colon-syntax you get tracks results). Are you able to confirm this as well?

First tests so far are looking good! I used to get some complete nonsense results for some search requests before, but it looks like it has finally stabilized. I'll report back if I encounter more issues, though I got a good feeling this was the issue.

 

Thank you!

It works again. @LambertSpot, I am using actually a Java API to call and we never had to encode it. Now that you added that fix or whatever, I don't have to encode again and it works.

Sorry for bringing you on a wild encoding goose-chase. 🙈

Suggested posts