Hello! I’m trying to use the MusicBrainz API to get information about all the recordings in a recording series (for example, by querying https://musicbrainz.org/ws/2/series/b3484a66-a4de-444d-93d3-c99a73656905?inc=recording-rels
). I noticed that when querying the series through the website, the artist information is directly visible (https://musicbrainz.org/series/b3484a66-a4de-444d-93d3-c99a73656905). Is there a way to get this information as part of a single query by using includes statements/other references so that I don’t have to loop through and make a request for every recording? It seems like all the other information is present:
<relation type="part of" type-id="ea6f0698-6782-30d6-b16d-293081b66774">
<target>722190f8-f718-482f-a8bc-a8d479426a30</target>
<ordering-key>47</ordering-key>
<direction>backward</direction>
<attribute-list>
<attribute type-id="a59c5830-5ec7-38fe-9a21-c7ea54f6650a" value="46">number</attribute>
</attribute-list>
<recording id="722190f8-f718-482f-a8bc-a8d479426a30">
<title>“Heroes”</title>
<length>370373</length>
</recording>
</relation>
Thanks for any help that anyone is able to provide!
What exactly are you missing in the JSON result?
I’m not sure what kind of inc=
are possible for /series
:
Documentation:
recording-rels
seems to work even if it is not listed for
/ws/2/series
Update:
Through trial and error, I found a call that might work:
https://musicbrainz.org/ws/2/series/b3484a66-a4de-444d-93d3-c99a73656905?inc=recording-rels+artist-credits
I’m not sure if this offers the data you really need. For the ISRCs I could not find a working API call for series.
1 Like
The documentation is really outdated. So that doesn’t surprise me
The relationship parameters recording-rels
, artist-rels
etc. are available for all the lookup queries except for genres (there is an open ticket for adding relationship support for genres).
There are a couple of more universal parameters that affect subqueries (such as fetching the recordings in a series lookup). One of those is artist-credits
.
This is all documented in the API docs under “Lookups”.
I don’t think this is true, it should be fairly up-to-date. API changes are rare, so it seldomly needs updating. Not long ago I did implement the full API in go, and I found a single missing parameter which I added (inc=release-groups
for recording lookup).
If there is really something missing the wiki page for the documentation can be updated.
2 Likes
Thanks for the explanation @outsidecontext
So how should the API call be builded to get the same information as on the series webpage, especially the ISRC’s and the Rating?
1 Like
My bad, I thought it was on the browse requests. I did fix it personally on the rust api, but got mixed up.
I did see multiple missing parameters. Although forgot which ones
One thing that is also lacking is full model documentation. It’s fine for most languages but rust aint one of them. Here if you forgot that a field is optional, you go into panic jail.
I don’t think including ratings and ISRCs is currently possible for series requests unfortunately.
1 Like