Query (release) - MusicBrainzID via a DiscogsID/URL?

Tags: #<Tag:0x00007f8207f39888> #<Tag:0x00007f8207f39798> #<Tag:0x00007f8207f396a8>

Hello hai,
I was wondering, since many MusicBrainz Release pages have the link to a/the corresponding release on discogs (and with it the Discogs release ID), like:


pointing to

Since I have a discogs based tag system and most files already have a discogs ID - is it possible to use the discogs ID (or the URL) script-/program-atically to find the correct releaseID for MusicBrainz ? Either via the API or Picard ?

Discogs Importer userscript (https://github.com/murdos/musicbrainz-userscripts#discogs_importer) is actually looking for MB releases/release groups/artists by discogs URLs. Give it a try.

1 Like

As @Zas eludes to: yes, this is possible.

You have to lookup an URL, in your case a Discogs URL. In the case of https://www.discogs.com/release/13383835 it would look something like https://musicbrainz.org/ws/2/url?resource=https://www.discogs.com/release/13383835. You will want to read over https://musicbrainz.org/doc/Development/XML_Web_Service/Version_2 for details of how the API/web service works and what parameters you need to give it to provide something more useful. (It can also return data in JSON if you prefer that to XML.)

There are also wrapper libraries for several languages. The Discogs script @Zas linked is open source, so you can review its code for how it does these lookups. I also have a Python script that uses this same technique for Spotify IDs using the musicbrainzngs library; here’s how it looks up artist IDs:

2 Likes

Thanks for the input & suggestions (i.e. breadcrumbs down the rabbit hole…) !

1 Like