You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 4, 2020. It is now read-only.
It seems that in the search API, one can search within tracks of a specific artist name by adding artist:"The Band" in the query, but this has the drawback of additionally matching artists whose name includes the searched artist, like "The Band Perry". In my app, I'd like to create a search system where users can first search for an artist, and then search within the tracks of this specific artist, and this could give them a bad user experience, since the resulting tracks may include stuff from unrelated artists as well.
To address this, it would be nice to be able use the artist's id in the search like artist:4vpDg7Y7fU982Ds30zawDA (or then a separate API altogether, or adding an optional query parameter to the artists/{id}/top-tracks endpoint). I can't see that this would be very hard to implement or break any existing systems. And at least someone on Stackoverflow has been looking for this functionality. So could it be implemented? Or am I just missing some existing way of accomplishing this?
The text was updated successfully, but these errors were encountered:
This is honestly something I was surprised to see missing from the web API also. However if you already have the ID of the artist your users are interested in when you perform the track search, you can just filter the data you get back so that it only includes tracks with the matching artist ID. Not the most efficient way of doing things but it will work well enough that your users won't notice that you're employing a bit of a hack, which is the most important thing.
I'm surprised too, this seems like a rather basic functionality. I'm going to do the filtering programmatically as you suggested, but this has the drawback of potentially having to fetch more results if there are not enough in the first batch.
It seems that in the search API, one can search within tracks of a specific artist name by adding
artist:"The Band"
in the query, but this has the drawback of additionally matching artists whose name includes the searched artist, like "The Band Perry". In my app, I'd like to create a search system where users can first search for an artist, and then search within the tracks of this specific artist, and this could give them a bad user experience, since the resulting tracks may include stuff from unrelated artists as well.To address this, it would be nice to be able use the artist's id in the search like
artist:4vpDg7Y7fU982Ds30zawDA
(or then a separate API altogether, or adding an optional query parameter to theartists/{id}/top-tracks
endpoint). I can't see that this would be very hard to implement or break any existing systems. And at least someone on Stackoverflow has been looking for this functionality. So could it be implemented? Or am I just missing some existing way of accomplishing this?The text was updated successfully, but these errors were encountered: