I am really new to the OSM query language and I want to know how to find the relation id from the area id.

Here is the query that I made:

is_in(45.5697, 3.1572);
foreach(area._["boundary"~"(administrative|national_park)"];out ;>;out;);

1 Answer 1


I found the solution:

[out:json ];
out ;
  • 1
    Using rel(pivot) is probably the most convenient approach. According to the Wiki, area ids can also to be derived from an existing OSM way by adding 2400000000 to its OSM id or in case of a relation by adding 3600000000 respectively. That in turn means that an area id doesn't always have to reference a relation id. Also, note that some special extraction rules apply, i.e. there's not always an area available for each single way or relation.
    – mmd
    Dec 25, 2015 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.