-
Improvement
-
Resolution: Unresolved
-
Normal
-
None
-
None
Currently, when you do GET /1/user/(user_name)/listens there is no release_group_mbid in the response. The only way to get it is via GET /1/metadata/recording. But this requires a separate call.
My use case: I want to know what albums from a certain artist the user did not listen to yet. Since GET listens can only return release MBIDs I tried to get the list of releases via GET /1/metadata/artist, but it returns an empty list:
curl -SsL 'https://api.listenbrainz.org/1/metadata/artist/?artist_mbids=16f69072-9a22-4e71-9abb-a52bbb193613&inc=release' | jq
[ { "area": "Philadelphia", "artist_mbid": "16f69072-9a22-4e71-9abb-a52bbb193613", "begin_year": 2001, "end_year": 2007, "mbid": "16f69072-9a22-4e71-9abb-a52bbb193613", "name": "Chromelodeon", "rels": { "official homepage": "http://www.chromelodeonarchive.com/", "wikidata": "https://www.wikidata.org/wiki/Q5113792" } , "type": "Group" } ]
I set inc=release, but there are no releases listed in the response.
This endpoint can return release groups though:
curl -SsL 'https://api.listenbrainz.org/1/metadata/artist/?artist_mbids=16f69072-9a22-4e71-9abb-a52bbb193613&inc=release_group' | jq
[ { "area": "Philadelphia", "artist_mbid": "16f69072-9a22-4e71-9abb-a52bbb193613", "begin_year": 2001, "end_year": 2007, "mbid": "16f69072-9a22-4e71-9abb-a52bbb193613", "name": "Chromelodeon", "release_group": [ ... { "artist_credit_name": "Chromelodeon", "artists": [ { "artist_credit_name": "Chromelodeon", "artist_mbid": "16f69072-9a22-4e71-9abb-a52bbb193613", "join_phrase": "" } ], "mbid": "145784b4-2795-4460-bec1-77fcb7280644", "name": "Sprite Slowdown v2", "type": "Album" }, ... ], "rels": { "official homepage": "http://www.chromelodeonarchive.com/", "wikidata": "https://www.wikidata.org/wiki/Q5113792" } , "type": "Group" } ]
As you can see it also doesn't have any release MBIDs. We can get a list of release groups for an artist, but GET listens only returns releases, so for each release we need to call GET /1/metadata/recording to get the release group MBID. But that's obviously ineffective.