How to request on foreign fields in webservice

Tags: #<Tag:0x00007f75709dc258>

Hi MetaBrainz

I’m requesting data from the ‘Place’ entity in the webservice call e.g

Now, I would like to request on a particular eg. “type=studio”

Also I need to request on certain country codes eg. “US” OR “DK” OR “ETC.”

Can anyone please give me a hint how this can be done :slight_smile:

Best regards Christian

Hi Christian,

I’m afraid retrieving country codes cannot be done in one search request yet, see MBS-6741.

The only solution so far is to make additional lookup requests with inc=area-rels until retrieving area’s country.

For example, in your example request, your first result is the place Bikini Test the area of which is La Chaux-de-Fonds. Use its area MBID to make lookup request for parent area:

Then, make a lookup request for the parent area Neuchâtel (with iso-3166-2 code CH-NE):

It returns every part of Neuchâtel and its parent area (type-id is "de7cc874-8b1b-3a05-8272-f3834c968fb7"and direction is "backward") Switzerland (with iso-3166-1 code CH).


@yvanzo thanks a lot :grinning:
one final question - what if I want to search for multiple type on the ‘place’ entity i cannot work it out
type=studio OR type=venue

on the following expression :

please advice :sunny:

This is based on:

1 Like