Monday, December 3, 2018

search - Searching in an artist's tracks - Spotify API

Using the Spotify API, I am trying to search through tracks of an artist. The query I used is working, and looks like:



https://api.spotify.com/v1/search?q=track:' + song + '%20artist:' + artist + '&type=track&limit=10



It's working however it's returning tracks for artists containing the artist name provided in any part of their artist name string. For example, if I want to be explicit about artist name, and want to search in ZHU's tracks, I couldn't find a way how I should make the query, so it becomes explicit about artist's name.




As I said, if I want to search in ZHU's tracks, it also returns me Natalie Zhu's tracks as well.



What is the proper way of being explicit about artist name?



Is there a way to explicitly define that I am going to search in ZHU's tracks?






Edit: I also tried using quotation marks:




https://api.spotify.com/v1/search?q=track:"' + song + '"%20artist:"' + artist + '"&type=track&limit=10



Maybe I used it wrong, I am not sure, but if I didn't this doesn't seem to solve :/

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...