Search notes:

Overpass API: Querying an area

The area query seems to find closed ways:
area[name = Engstlensee];
out geom;
Assign the area to a named set and then search within this set:
area[ name ='Calusa Island' ] -> .calusa;

nw[amenity = school] (area.calusa);

out geom;

Use ISO 3166 to find Mc Donald's restaurants in Croatia

Using ISO 3166 to find Mc Donald's restaurants in Croatia:
area[ 'ISO3166-1' = 'HR' ];

nwr[name="McDonald's"](area);

out geom;

area vs {{geocodeArea}}

[out:csv( ::id, type, admin_level, boundary, is_in, name )];

area['ISO3166-2' = 'CH-ZH']           -> .x; .x out;
{{geocodeArea: CH-ZH               }} -> .x; .x out;
{{geocodeArea: Zurich, Switzerland }} -> .x; .x out;

Find all areas in which an object is located

The is_in operator(?)/function(?) can be used to find all areas in which an object is located:
way[name ='Calusa Elementary School'] -> .calusa_school;

node(w.calusa_school)      -> .nodes_calusa_school;
.nodes_calusa_school is_in -> .areas;

.areas out tags;
With the pivot operator(?)/function(?), these areas can also be shown visually:
way[name ='Calusa Elementary School'] -> .calusa_school;

node(w.calusa_school)      -> .nodes_calusa_school;
.nodes_calusa_school is_in -> .areas;

wr(pivot.areas) -> .x;

.x out geom;

Querying an area whose relation id is known

1690227 is the relation id of Kt. Zürich. By adding this number to 3600000000 (=3601690227), it's possible to query an area if the corresponding relation's id is known.
[out:csv(
   ::id,
     name,
    'swisstopo:BFS_NUMMER'
   ;
     false;
    '|'
)];

area(3601690227);         // Select the area of Kt. Zürich

rel[admin_level=8](area); // Find municipalities (CH: admin_level=8) within the selected area

out;
See also the map_to_area function which seems to do more or less the same.

See also

The bbox setting.
The query statement

Index