Replicating the subquery that populates the release-groups data

When looking up an artist, including release-groups lists what it seems to be all official album releases, sorted by ascending date, which is perfect for what I need. Because this is a subquery though, only 25 entities are returned and I don’t think there’s a way to get more. So I tried to search for release groups by an arid:
http://musicbrainz.org/ws/2/release-group?query=arid:79239441-bfd5-4981-a70c-55c3f15c1287&fmt=json
However, this query returns a lot more releases. Is there a way to replicate the subquery that populates the release-groups data for an artist? Thanks in advance.

AFAIK there is currently no good way to do this with the API. Because the “official” status is part of a release only returning official release groups requires checking the status of all the releases inside the group whether there is at least one marked as official.

As the RG browse API does not provide such a filter it is not really doable to get such a filtered list. Unless one queries all the releases of that group and filters manually, but that is I think not really a practical approach.

There should be an open ticket about this I think.

CritiqueBrainz.org has this problem as well due to the API limitations, showing a, for some artists, highly confusing album list.

2 Likes

Thank you, yeah, I will probably end up doing something different altogether.

I have code for this waiting for review for… a long time now. I’ll push our team to check it :slight_smile:

2 Likes

Awesome! Looking forward to it.

I think all search merge requests are waiting for a Python upgrade, or something.

Yeah, my code is for browsing, not search. But the query in the first post could as easily be a browse one, since they have the artist MBID anyway: http://musicbrainz.org/ws/2/release-group?artist=79239441-bfd5-4981-a70c-55c3f15c1287&fmt=json

2 Likes

For reference, this is the relavant ticket: