Overpass query example

Features without a name

Find features that miss a tag, here restaurants without a name, to improve the map. Example: Prague.

[!"key"] keeps elements that do not have a key. It is the basis for most data quality checks.

The query

[out:json][timeout:60];
area["name"="Praha"]["admin_level"="4"]->.a;
nwr["amenity"="restaurant"][!"name"](area.a);
out center;

Run it

Running the query…

Live result from overpass.ch, cached for up to 12 hours. Map data © OpenStreetMap contributors (ODbL).

How it works

  1. Prague is a region of its own, so its boundary has admin_level 4.
  2. [!"name"] means “has no name tag”.

Variations

  • Fix the results in an editor: JOSM can load Overpass results directly.

Run it from your code

curl https://api.overpass.ch/v1/YOUR_API_KEY/interpreter \
  --data-urlencode 'data@query.overpassql'

Save the query as query.overpassql. It works the same in Overpass Turbo, QGIS and JOSM.

More examples

All examples →