
That seems to rule out "left-to-right", "OR-before-AND" AND "AND-before-OR". I'm seeing tracks named "Highway Star" from other bands. That seemed promising, and returned 185 results, but it's not quite right. Ws./search/1/track?q=track:"thriller"+OR+track:"highway+star"+AND+artist:"michael+jackson"+OR+artist:"deep+purple" Maybe they don't just process left-to-right - maybe the ORs are all resolved, and then the ANDs: Then I thought I'd try playing with precedence. Ws./search/1/track?q=(track:"thriller"+AND+artist:"michael+jackson")+OR+(track:"highway+star"+AND+artist:"deep+purple") I tried to jump right in with the parentheses, even though they're not mentioned in the docs. Using similar criteria to pull in just one track at a time works: I would need something effectively the same as (track:Thriller AND artist:"Michael Jackson") OR (track:"highway star" AND artist:"Deep Purple"). They also support the basic boolean operators.īut there's nothing on that page (or anywhere else on the internet, as far as I can tell) describing how the boolean operator precedence works, or how you might go about grouping your search criteria. Cameron Watts 47 Followers British student based in San Francisco. Refresh the page, check Medium ’s site status, or find something interesting to read. They support searching against specific fields, like track, artist, and album. Extracting Song Data From the Spotify API Using Python by Cameron Watts Towards Data Science Write Sign up Sign In 500 Apologies, but something went wrong on our end. And there's a page describing Spotify's advanced search syntax here. Since I don't already have the Spotify uris I need to use the Search method. I'm trying to use the Spotify web API to return multiple specific results in one response.įor example, maybe I want Spotify's detailed information for "Thriller", by Michael Jackson, and "Highway Star", by Deep Purple.
