Search code examples
xmlapimusicbrainz

How to get information about the series a release belongs to via Musicbrainz


I plan to extend the music library manager beets, which relies on Musicbrainz as backend.

What I want to do is find out the Series a Compilation belongs to given the MBID of the compilation. When you open a release in the WEB-Interface, the "release group" is written at the bottom of the page.

For example there is Bravo Hits 45. It belongs to the series Bravo Hits and is no 45.

But how do I get this information given the MBID e.g. bfaa7806-0628-4e81-a553-b88e379b6c3b of a release using the XML-API?

(PS: I am not 100% sure if keywords series and release-group have anything in common.)

I tried to request metadata to include series relations and collection information: http://musicbrainz.org/ws/2/release/bfaa7806-0628-4e81-a553-b88e379b6c3b?inc=series-rels+collections No information.

Or maybe via release group? http://musicbrainz.org/ws/2/release-group?release=bfaa7806-0628-4e81-a553-b88e379b6c3b No information.

I thought there should even be a browse request for series, but this query doesn't even exist: https://musicbrainz.org/ws/2/series?release=1350fce9-08ab-40ba-a7bb-ed3cfb869499


Anyway, I could do a query using the name, getting a lot of inexact results including the right one: https://musicbrainz.org/search?query=Bravo+Hits+45&type=series&method=indexed

But I guess there should be a way, to do an exact lookup using the MBID of the release, right?


Solution

  • The relationship in this case is between the release group and the series, so you can't request that information on the release. However, http://musicbrainz.org/ws/2/release-group?release=bfaa7806-0628-4e81-a553-b88e379b6c3b&inc=series-rels (your release group request with a series-rels include) does include the information you're looking for, as does https://musicbrainz.org/ws/2/release-group/a84861c0-72b3-37b2-bbbc-07c03269abab?inc=series-rels.

    Just to clarify: it is also possible for releases to be part of a series, it's just that in this case the relationship is between the release group and the series.