-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Normal
-
None
-
Component/s: API
-
None
First off, the documentation says the name to be searched for is passed via name, but in reality the code takes the value of a query parameter.
Next, the documentation says "Search for a playlist by name for a user." with the user name specified in the URL described as "the MusicBrainz ID of the user whose playlists are being searched.".
To me that means this endpoint is supposed to only look at playlists associated with that user (whether it should also include ones they collaborated on, or that were create for rather than by them, is less obvious).
However, that is very much not the case. I have no playlists of my own, just the Year in Music ones, and whatever recommendation-based ones are generated. Yet [https://api.listenbrainz.org/1/user/Zastai/playlists/search?query=Weekly|this query] returns 25 playlists claiming there are 119000+ matches (which also explains why the response is not super swift).
It would also be good if the query syntax was more clearly documented. By default it seems to be a fuzzy match, probably only on the playlist title (e.g. [https://api.listenbrainz.org/1/user/wilwheaton/playlists/search?query=Shut+Up+Wesley&count=3|this query] returns playlists named "Shirley Q" and "Lesley Gore", but it's unclear to me whether exact search and/or queries referencing specific fields are possible.