Find OSM features inside a bounding box or an OSM boundary
openstreetmap_query_bboxRead-onlyIdempotent
Find OSM features inside an area via the Overpass API, for surveys of everything in a region (openstreetmap_query_nearby covers proximity to a point). Scope with the four corner fields south, west, north, east, or with within and a single OSM boundary ref such as a city relation or a park way, which searches the boundary polygon itself instead of an overcovering box; never both. Filter with amenity, or with tag_key plus an optional tag_value, ANDing up to five more filters; every feature returns with its full OSM tag set (no extratags flag here).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| east | No | Eastern boundary longitude (maximum longitude). A value below west describes an antimeridian crossing rather than an inverted box. | |
| west | No | Western boundary longitude (minimum longitude). A west greater than east is valid, not an error: Overpass reads it as an antimeridian-crossing box and returns the union of west..180 and -180..east. | |
| limit | No | Maximum results to return, up to 500 per call; a larger value is served as 500 and limitNotice says so. Applied after the Overpass query — if the area has more features, they are truncated. | |
| north | No | Northern boundary latitude (maximum latitude). | |
| south | No | Southern boundary latitude (minimum latitude). One of four corner fields: supply all four, or use within instead. | |
| offset | No | Number of matching features to skip before applying limit, for paging through a large result set. The full match set is fetched and cached ~10 minutes keyed by the query, so re-paging at a new offset is deterministic and costs no extra upstream request. Pass the nextOffset value from a prior truncated response. | |
| within | No | OSM boundary to search inside, as one ref: R plus a relation id ("R237385", Seattle) or W plus a closed-way id ("W13800188", a park), case-insensitive. Take it from osm_type plus osm_id on openstreetmap_search_places, openstreetmap_reverse_geocode, or openstreetmap_lookup_objects. The alternative to the four corner fields, never both. A node ref is rejected: a node is never an area. A ref that maps to no Overpass area returns an empty page whose notice names the cause. | |
| amenity | No | OSM amenity tag value shortcut (e.g. "cafe", "bench", "hospital"). Exactly one primary mode is required: this or tag_key, never both. Many categories live under other keys — tourism (museums, hotels, viewpoints), leisure (parks, pitches, playgrounds), shop (supermarkets), historic (castles, memorials), natural (beaches, peaks); query those with tag_key and tag_value. | |
| filters | No | Up to five additional filters, ANDed with the required primary amenity or tag_key filter in input order. Omitted or [] adds no conditions. Exact values miss semicolon-list values; set match "list_item" on the entry. Keys must be unique after trimming; keys and values must not contain Overpass QL metacharacters (" \ [ ] ; ( )). | |
| tag_key | No | Primary OSM tag key (e.g. "leisure", "shop", "natural"); omit tag_value to match any feature carrying the key, or supply it for exact equality. The alternative to amenity, never both. Additional filters are ANDed with this tag. | |
| tag_value | No | Literal value paired with tag_key for exact equality (e.g., "park", "supermarket"); omit for key existence. Exact equality misses semicolon-list values (cuisine=pizza;italian); tag_value_match "list_item" catches them. Explicit empty or whitespace-only values are invalid. Keys and values are trimmed; blank unused fields are ignored in amenity mode. | |
| element_types | No | OSM element types to search, at least one. Ways cover most buildings and areas; nodes cover most standalone POIs. Add "relation" for complex structures. Omit the field to search nodes and ways; an empty array is rejected because it can only match nothing. | |
| tag_value_match | No | How tag_value matches: "exact" (default) compares the whole value; "list_item" matches one item of a semicolon list, so "pizza" finds cuisine=pizza;italian. Needs tag_value; not available with amenity. | |
| timeout_seconds | No | Overpass query timeout in seconds. Increase for large bounding boxes or dense areas. |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Why this page is empty and what to try: the within ref resolved to no Overpass area, nothing matched (change the scope or tag), or offset ran past the end (retry lower). On any page, also names the key to retry with when amenity names a value OpenStreetMap tags under another key (tourism=museum, not amenity=museum). Absent otherwise. | |
| elements | No | Matching OSM features inside the requested scope — the bounding box, or the within boundary — up to the limit. | |
| truncated | No | True if results were cut at the limit. Reduce bbox area, add more specific tags, or page with offset to retrieve the rest. | |
| nextOffset | No | Offset to pass on the next call to retrieve the following page of features. Present only when more features remain beyond this page. | |
| totalFound | No | Total features returned by Overpass before limit truncation. | |
| attribution | No | Required data attribution: Data © OpenStreetMap contributors, ODbL 1.0. | |
| limitNotice | No | Present when limit exceeded this tool's maximum: the value requested and the one applied. | |
| effectiveTag | No | The full ordered AND filter chain: key=value for equality, key∋value for a list-item match, key alone for existence (e.g. "amenity=restaurant, cuisine∋pizza, name"). | |
| effectiveArea | No | The boundary scope as resolved: the within ref and the Overpass area it mapped to. Absent when the call used the four corner fields. | |
| areasTimestamp | No | Freshness of the Overpass area database, rebuilt on its own schedule and so lagging data_timestamp — a boundary edited since is scoped against its older polygon. Present only on a within call whose endpoint reported it. | |
| data_timestamp | No | OSM data freshness timestamp from the Overpass response. Absent when the endpoint reported no freshness metadata. | |
| servingEndpoint | No | Overpass endpoint that answered, named by origin alone (scheme, host, port), with "(entry N)" added when two configured endpoints share an origin. May name a failover mirror, or the endpoint that originally served a cached response. Read with data_timestamp when a result looks slow, sparse, or stale. |