get_bounds
Convert bounding boxes, coordinates, WKT/GeoJSON, map tiles, or place names into formatted bounds with optional metric buffering for mapping, queries, and spatial APIs.
Instructions
Get converted coordinates for a bounding box or natural-language location search (powered by Nominatim with configurable Photon & optional Mapbox fallbacks). Supports parsing WKT, GeoJSON, ogrinfo extent, Web Mercator tiles ('z/x/y'), single points ('lat,lng'), and raw coordinate strings, plus optional metric buffering.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bbox | No | The geometry to parse. Can be a raw bounding box string ('lat1,lng1,lat2,lng2'), a single point ('lat,lng'), a Web Mercator tile ('z/x/y'), a WKT polygon/linestring/point, a GeoJSON payload, or an `ogrinfo` extent block. Either 'location' or 'bbox' MUST be provided. | |
| epsg | No | The projected EPSG code (e.g. '3857'). Defaults to '4326' (WGS84). Over 3,900 bundled projections; unknown codes are auto-fetched from epsg.io. | |
| zoom | No | The map zoom level (0-22) used to calculate the map tile coordinates for the centroid. Defaults to 15. | |
| format | No | Format of the output. Options: wkt, geojson-bbox, leaflet, overpass, ogc-bbox, kml, geojson-polygon, csv, stac-bbox. Default: csv. | |
| location | No | A text location to search for (e.g. 'New York City', 'Central Park'). Uses OpenStreetMap Nominatim (or configurable NOMINATIM_API_URL / PHOTON_API_URL / optional MAPBOX_ACCESS_TOKEN). Either 'location' or 'bbox' MUST be provided. | |
| precision | No | The number of decimal places to output coordinate strings as (defaults to 6). | |
| coord_order | No | Toggle between 'lng,lat' (default) and 'lat,lng' coordinate ordering in the formatted output. Useful for APIs that expect swapped coordinate orders. | |
| buffer_meters | No | Optional distance in meters to expand (positive) or shrink (negative) the bounding box in all directions. Ideal for creating a bounding box around a single point. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| epsg | Yes | ||
| center | Yes | ||
| format | Yes | ||
| area_km2 | Yes | ||
| complete | Yes | ||
| warnings | Yes | ||
| precision | Yes | ||
| projected | Yes | ||
| share_url | Yes | ||
| dimensions | Yes | ||
| provenance | Yes | ||
| coord_order | Yes | ||
| alternatives | No | ||
| tile_indices | Yes | ||
| matched_place | No | ||
| original_wgs84 | Yes |