Overpass query example

Car parks with their capacity

Find car parks and read the number of spaces. Example: Munich.

A filter with only a key, like ["capacity"], keeps elements that have the key with any value. Here: car parks whose number of spaces is known.

The query

[out:json][timeout:60];
area["name"="München"]["admin_level"="6"]->.a;
nwr["amenity"="parking"]["capacity"](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. Munich is a district-free city, admin_level 6.
  2. ["capacity"] (no value) means “has a capacity tag”.

Variations

  • Only large car parks: (if: number(t["capacity"]) >= 200), see peaks higher than 4000 m for the technique.
  • Multi-storey or underground: ["parking"~"^(multi-storey|underground)$"].

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 →