API search equivalent of website's "Show all various artist release groups"

On an artist’s page on MB, you can filter to show release-groups that the artist appeared on with the “?va=1” query (such as https://musicbrainz.org/artist/4920655c-330b-4fc9-8a27-b91f2a92772d?va=1). Is this possible to complete via the API, and if so what syntax would be needed. I only want to return release-groups that the artist isn’t the main artist on (so Various Artist releases and other releases where the artist is featured). Thanks in advance for any help.

2 Likes

My solution for this came to “https://musicbrainz.org/ws/2/artist/?inc=releases+various-artists” and then sorting through each returned release using a dictionary to ensure release groups were only added once to the returned list.

1 Like