How to get the full country name in the API artist-credits?

According to the release notes for the new MB Server update from 2025-04-14 we can now get “artist countries everywhere”.

Is it intentional that you only provide the 2-letter country abbreviation like SE and not the full country name like Sweden in the artist-credits?
(I know that we can get the full country name with a MB Picards $countryname function. But there are other API clients that could use this country name too - if provided with the full name. :wink:)

<artist-credit>
  <name-credit>
    <artist id="d87e52c5-bb8d-4da8-b941-9f4928627dc8" type="Group" type-id="e431f5f6-b5d2-343d-8b36-72607fffb74b">
      <name>ABBA</name>
      <sort-name>ABBA</sort-name>
      <country>SE</country>
      <disambiguation>Swedish pop group</disambiguation>
    </artist>
  </name-credit>
</artist-credit>

Or is there some kind of magic that needs to be added to the /ws/2 API release call to get the full country name in artist-credits too?


For the record:
If you call the ARTIST (ABBA in this example) directly with:
https://musicbrainz.org/ws/2/artist/d87e52c5-bb8d-4da8-b941-9f4928627dc8
you get the full country name like this:

<artist id="d87e52c5-bb8d-4da8-b941-9f4928627dc8" type="Group" type-id="e431f5f6-b5d2-343d-8b36-72607fffb74b">
   <name>ABBA</name>
   <sort-name>ABBA</sort-name>
   <country>SE</country>
   <area id="23d10872-f5ae-3f0c-bf55-332788a16ecb">
      <name>Sweden</name>
      <sort-name>Sweden</sort-name>
      <iso-3166-1-code-list>
         <iso-3166-1-code>SE</iso-3166-1-code>
      </iso-3166-1-code-list>
   </area>
   ....
</artist>

I guess so and I got it status like this.
Sweden is only valid for English language.

Ah now I see your example.
You have more details in artist lookup and it doesn’t remove the important country code, I see… :thinking:

But I wonder why it gives you the English name and not the others.

Because that’s the MusicBrainz area name. Why we use English names for countries by default is a different, more deep discussion I really would not want to start now :face_with_peeking_eye: :sweat_smile:

Yes, it’s an ISO country code, which means it’s a standard that anyone can use it to get the name in their language of choice. And it makes the response a bit smaller, which makes a difference at the large scale of millions of requests :slight_smile:

8 Likes