# Getting all compilations with artist's appearance?

**URL:** <https://community.metabrainz.org/t/getting-all-compilations-with-artists-appearance/584557>\
**Category:** Development\
**Created:** [May 10, 2022, 11:09am UTC](https://community.metabrainz.org/t/getting-all-compilations-with-artists-appearance/584557 "2022-05-10T11:09:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anakunda](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/a/85e7bf/32.png) [@Anakunda](https://community.metabrainz.org/u/Anakunda)\
**Post date:** [May 10, 2022, 11:09am UTC](https://community.metabrainz.org/t/getting-all-compilations-with-artists-appearance/584557/1 "2022-05-10T11:09:29Z")

</div>

Hi, it’s obscure to me how the API browsing entity types are mapped to artist page subviews. I can’t manage to find the proper query syntax to get releases including VA compilations with just the artist’s appearance.

Though I can find all compilations with artist participating on `https://musicbrainz.org/artist/<MBID>/releases` and `https://musicbrainz.org/artist/<MBID>`, providing it’s guessable counterpart for the API channel `https://musicbrainz.org/ws/2/release?artist=<MBID>`, I get an empty response \> releases array.. I tried get lists for other entity types

- /ws/2/recording
- /ws/2/release-group
- /ws/2/work

but no one contained the expected compilation. Maybe it’s included only by providing specific \<INC\> keyword, but can’t figure out. Thanks for advices in advance.

---

<div class="post-metadata">

**Author:** ![elomatreb](https://community.metabrainz.org/user_avatar/community.metabrainz.org/elomatreb/32/44009_2.png) [@elomatreb](https://community.metabrainz.org/u/elomatreb)\
**Post date:** [May 10, 2022, 6:16pm UTC](https://community.metabrainz.org/t/getting-all-compilations-with-artists-appearance/584557/2 "2022-05-10T18:16:34Z")

</div>

You can list all releases on which a given artist appears but is not credited as a release artist using the `/ws/2/artist/<Artist MBID>?inc=releases+various-artists` endpoint, or via `/ws/2/release?track_artist=<Artist MBID>`.

---

<div class="post-metadata">

**Author:** ![Anakunda](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/a/85e7bf/32.png) [@Anakunda](https://community.metabrainz.org/u/Anakunda)\
**Post date:** [May 10, 2022, 8:07pm UTC](https://community.metabrainz.org/t/getting-all-compilations-with-artists-appearance/584557/3 "2022-05-10T20:07:08Z")

</div>

Ah thanks, got it finally. `/artist/<Artist MBID>?inc=releases+various-artists` doesn’t seem to get them all, but the `track_artist` keyword with /release endpoint does the trick.

Yet I have problem with the /release endpoint listing as it only lists releases without bindings to their release groups. Is it either possible to use track\_artist param and get release groups instead releases, or get the releases but including the related release group MBIDs?

I’ve tried several INC switches combos for the /release endpoint, but no one brought any relations

`https://musicbrainz.org/ws/2/release?artist=<MBID>&inc=release-group-level-rels+release-group-rels&fmt=json` just adds relations entry to each release, but empty. Not quite clear from the docs how the additional \*-level-rels switches work and what order they should follow, as the examples page shows several \*-level-rels switches can be combined in one query.
