Announcements

Help Wizard

Step 1

NEXT STEP

Genre search for multiple words via search endpoint only works with dashes

Genre search for multiple words via search endpoint only works with dashes

I am struggling to get multi-word genre search working via the search endpoint.

Using the Web API, I try to set q to genre:hard rock which gets converted to:

 

search?q=genre%3Ahard+rock&type=artist

 

This ends up giving a bunch of results with the word "rock" in the band name -- I think because the "genre" filter is only being applied to the first word. Using quotes like genre:'hard rock' does not seem to help, nor does using %20 or %2520, as in the examples.
The only way I can get it to work is by using dashes so: genre:hard-rock. Which converts to:

 

search?q=genre%3Ahard-rock&type=artist

 

This seems to work as intended but is not documented anywhere. I am curious if I am doing something wrong or if this needs to be documented somewhere as "how to search for multiple words via filter."
Thank you!

Reply
0 Replies

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random