search_overpass
Run Overpass QL queries to find OpenStreetMap POIs, roads, and amenities inside an admin boundary, bounding box, or radius, returning filtered, structured results with map links.
Instructions
Execute an Overpass QL query to find POIs, roads, or other OSM features within an admin boundary area, bounding box, or radius. The server wraps your query in spatial filters, detects Overpass runtime errors, and returns structured JSON with provenance, completeness metadata, distance calculations, and a map link.
SEARCH MODES:
Location / Admin Area: when 'location' resolves to an OSM boundary polygon (e.g. 'Manhattan', 'Seattle'), searches inside exact boundary polygon.
Bounding box (default): searches a rectangular area.
Circle: searches within an exact radius when 'radius_meters' is provided.
Fast Count: set 'count_only: true' to get instant element counts without downloading full element payloads.
COMMON TAG EXAMPLES:
Restaurants:
nwr["amenity"="restaurant"]Pizza:
nwr["amenity"="fast_food"]["cuisine"="pizza"]Supermarkets:
nwr["shop"="supermarket"]Parks:
nwr["leisure"="park"]Hospitals:
nwr["amenity"="hospital"]EV Charging:
nwr["amenity"="charging_station"]Gyms:
nwr["leisure"="fitness_centre"]Banks:
nwr["amenity"="bank"]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bbox | No | The geometry to parse. Can be a raw bounding box string ('lat1,lng1,lat2,lng2'), WKT, GeoJSON, or ogrinfo extent. Either 'location' or 'bbox' MUST be provided. | |
| limit | No | Maximum number of elements to return per page. Default is 100. | |
| query | Yes | The Overpass QL core query. Example: `node["amenity"="cafe"]` or `nwr["leisure"="park"]`. Multi-statement queries supported (e.g. `nwr["office"="coworking"]; nwr["amenity"="coworking_space"]`). DO NOT include spatial filters or output directives. | |
| offset | No | Pagination offset for retrieving subsequent pages of results. Default is 0. | |
| location | No | A text location to search for (e.g. 'Manhattan', 'San Francisco'). Either 'location' or 'bbox' MUST be provided. | |
| count_only | No | If true, executes an ultra-fast Overpass 'out count;' query and returns total counts (nodes, ways, relations, total) without downloading individual features. Defaults to false. | |
| radius_meters | No | Search radius in metres. Enables circle mode — use ONLY when explicit distance is specified ('2km' → 2000). | |
| return_geometry | No | If true, returns full geometry (polygon/polyline) for ways and relations instead of center point. Defaults to false. | |
| timeout_seconds | No | Overpass server query timeout in seconds. Default is 25. | |
| sort_by_distance | No | If true, sorts returned elements by distance from origin/center. Enabled by default for circle mode and point locations. | |
| use_area_boundary | No | If true (default), uses exact OSM administrative boundary polygon for named locations when available, avoiding bounding box collapse. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| osm3s | No | ||
| counts | No | ||
| offset | No | ||
| complete | Yes | ||
| elements | No | ||
| has_more | No | ||
| warnings | Yes | ||
| generator | No | ||
| share_url | Yes | ||
| truncated | No | ||
| count_only | Yes | ||
| provenance | Yes | ||
| next_offset | No | ||
| osm_area_id | No | ||
| search_mode | Yes | ||
| total_count | No | ||
| alternatives | No | ||
| distance_from | No | ||
| matched_place | No | ||
| returned_count | No | ||
| pagination_hint | No |