Search notes:

Overpass API settings - bbox

[bbox:
    49.8727,  // min lattitude: south border
    -6.4458,  // min longitude: west border
    49.8730,  // max lattitude: north border
    -6.4452   // max longitude: east border
];

//
// Select all nodes, ways and relations in
// the area selected by the bounding box
// setting:
//
nwr;

out;
Use the {{bbox}} extension to select all restaurants in the currently displayed map:
[bbox: {{bbox}} ];

nw[ amenity=restaurant ];
out;

Misc

Getting the bounding box of the current view

The following query gets the bounding box of the «current view» (for example <bounds minlat="48.3617240" minlon="-3.7847900" maxlat="49.8999421" maxlon="-0.0494385"/>). This is handy when scrolling and zooming to a view and then use the values for a later query.
[bbox:{{bbox}}];
out;
Such a query produces a result like:
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="Overpass API 0.7.61.5 4133829e">
<note>The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.</note>
<meta osm_base="2023-11-12T16:38:30Z"/>

  <bounds minlat="45.7854820" minlon="7.4607422" maxlat="46.0794229" maxlon="7.9413940"/>

</osm>
See also the out bb statement.

Applying bbox in a query

A query can be restricted to the current view:
nwr [highway=via_ferrata]({{bbox}});
out geom;

See also

The area query statement.
settings

Index