Run an Overpass query
overpass_queryRuns an Overpass QL query on the full OpenStreetMap planet at overpass.ch (minutely updates) and returns the matching nodes, ways and relations with their tags. Start the query with a settings line such as [out:json][timeout:25]; JSON is used when the query does not set [out:]. [timeout:N] stops the query after N s: at most 120 s through this tool, and the plan may allow less. Patterns:
Box (south,west,north,east): nwr"amenity"="cafe"; out center;
Radius in metres around lat,lon: nwr"amenity"="pharmacy"; out center;
In a place: overpass_area_id from geocode, then area(id:3600051701)->.a; nwr"tourism"="hotel"; out center;
By name (exact, local language): area["name"="Wien"]["admin_level"="4"]->.a;
Count: out count; Tags only: out tags; At most 50: out center 50; Lines with coordinates: out geom; (large)
Regex, any case: ["name"~"^Bahnhof",i]
By id: node(3470507586); out; way(id:1,2,3); out tags;
The map at a past date (Medium and Large plans): [date:"2015-01-01T00:00:00Z"] in the settings line. The answer starts with counts and the date of the data, then one JSON object per element and line, up to max_chars characters. When it is cut, call again with offset, or narrow the query. Each call counts as one request of the plan, a cut one too. Data © OpenStreetMap contributors, ODbL.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | the Overpass QL (or XML) query | |
| offset | No | the element (or CSV row) to start at, for the next part of a cut answer | |
| max_chars | No | most characters of the answer to show; larger answers are cut, and offset shows the next part | |
| add_elevation | No | add the height in metres to every point of a JSON answer; one elevation lookup per point |