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!
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.