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

400 bad request on v1/search/

400 bad request on v1/search/

Plan

Premium

Country

France

Device

PC

Operating System

Linux

 

My Question or Issue

Hi, 
i'm trying to use the spotify api, but i have trouble with it 😞
i made some resquest on "https://api.spotify.com/v1/search?q=thriller&type=track"  but i have 400 bad request as a reponse :

 

&{400 Bad Request 400 HTTP/2.0 2 0 map[Alt-Svc:[h3=":443"; ma=2592000,h3-29=":443"; ma=2592000] Content-Length:[273] Content-Type:[text/html; charset=UTF-8] Date:[Fri, 04 Nov 2022 17:46:20 GMT] Referrer-Policy:[no-referrer]] 0xc0001ea300 273 [] false false map[] 0xc0002e0100 0xc0000c2370}

 

sometimes it work, sometimes not... I don't know why exactly. Can you help me?
thanks a lot!

Reply
2 Replies

You have to specify the field filter: q=track:Thriller&type=track. To narrow down your search for a certain track you could use a combination of several filters, e.g. q=track:Thriller artist:Michael Jackson album:Scream&type=track. The length of the query currently seems to be limited on 250 characters
The 'type' parameter specifies the type of the searched item.
I'm wondering how it can work at all with your invalid query.

No, you do not HAVE to specify the field filter.

Suggested posts