search_overpass
Query OpenStreetMap for points of interest, roads, or features within a specified area using Overpass QL. Returns structured JSON with a map link.
Instructions
Execute an Overpass QL query to find POIs, roads, or other OSM features within a bounding box or radius. The server wraps your query in the appropriate spatial filter and returns structured JSON with a map link.
SEARCH MODES:
Bounding box (default): searches a rectangular area. Use for region/area queries ('hospitals in Manhattan', 'parks in downtown Seattle').
Circle: searches within an exact radius. Use ONLY when the user specifies an explicit distance ('within 2km of JFK', '500 metres from the Eiffel Tower', '1 mile from Times Square'). Omit radius_meters for vague terms like 'near' or 'close to'.
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"]Schools:
nwr["amenity"="school"]Parking:
nwr["amenity"="parking"]Highways/Roads:
way["highway"]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| location | No | A text location to search for (e.g. 'San Francisco', 'JFK Airport'). Requires MAPBOX_ACCESS_TOKEN env var. Either 'location' or 'bbox' MUST be provided. | |
| 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. | |
| query | Yes | The Overpass QL core query. Example: `node["amenity"="cafe"]` or `nwr["leisure"="park"]`. DO NOT include spatial filters, bounding box, or output directives — the server handles those automatically. | |
| radius_meters | No | Search radius in metres. Enables circle mode — use ONLY when the user specifies an explicit distance (e.g. '2km' → 2000, '500 metres' → 500, '1 mile' → 1609). Omit entirely for area/region queries or vague terms like 'near'. | |
| limit | No | Maximum number of elements to return. Default is 100. Increase if you need more results. |