Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spotify API get track info based on track name?

Is there a way to query the spotify API in order to get information about a track/artist/album/playlist based on its name.

E.g. query for track=I need a hero&artistName=... and get a URI/ID and some information about the track.

I couldn't find anything like this in the documentation. Am I overlooking something ?

like image 937
George Avatar asked Oct 15 '25 15:10

George


1 Answers

You can use the search API endpoint, by specifying an artist and a track parameters, then extract the track ID from the response if there is only one match:

curl -X GET "https://api.spotify.com/v1/search?q=track:I%20need%20a hero%20artist:the%20artist&type=track"
like image 176
Veve Avatar answered Oct 19 '25 05:10

Veve



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!