API does not return full information

I am trying to fetch some artist data for a project of mine, but I am hitting some road blocks.

For example the API doesn’t return the country for Dream Theater: https://musicbrainz.org/ws/2/artist/?query=mbid:28503ab7-8bf2-4666-a7bd-2644bfc7cb1d

On the artist page the country is there, so it’s not a matter of missing data.

Am I doing something wrong with my query, or it’s another issue?

Thanks!

You should use lookup instead of query.
So instead call the entry lookup api for the artist and say that you want to include the release information including the country and release dates etc.
https://musicbrainz.org/ws/2/artist/28503ab7-8bf2-4666-a7bd-2644bfc7cb1d?inc=releases&fmt=json

See the wiki docs for browsing.
https://musicbrainz.org/doc/Development/XML_Web_Service/Version_2#Browse

4 Likes

Thanks, but this still doesn’t give me the country of the artist. If I include the releases I can get the country in which each release was published, but not the artist itself.

For Dream Theater I get “begin-area” and “area”, which are cities, thus I have to go up the “area” API to find where those cities belong, but that means traversing a few more layers of API to get to what I need.

I’m confused, because for some artists, the “country” tag is included in the response. For example The Police: https://musicbrainz.org/ws/2/artist/9e0e2b01-41db-4008-bd8b-988977d6019a

Yes you are correct, an area is a city, state, country and you would need to look up those to find what country they are in.
Looking at the api I cannot see how you would make those api calls to find that information.
When you look up the area it contains the entry but does not include what parents or child areas it contains so I cannot see how you find the country.

3 Likes