Skip to content

Detail & formats

Pick how detailed a polygon is, and the file format it comes in.

Detail levels

Detail is relative to a boundary's size, so low looks alike for a country and a city. Simplification keeps every polygon valid: no self-intersections, no collapsed rings.

detailUse it for
lowAbout 1,000 points across the longer side. Map previews, thumbnails, dashboards. Free without a key on get_boundary.
mediumAbout 5,000 points across. The default with a key: web maps at city zoom, most point checks.
highAbout 25,000 points across. Street-level maps and close inspection.
fullThe unsimplified OSM polygon. Legal records and anything that must match OSM exactly.

A polygon larger than 4 MB isn't inlined: geometry is null and download_url points to the file. Ask for a lower detail, or use the export.

Formats

formatWhat you get
geojsonGeoJSON Feature
kmlKML document
wktWKT MultiPolygon
svgSVG path (lon/lat, y flipped)
gmlGML 3 MultiSurface

GET /v1/boundaries/<id>.<format> builds the file once per boundary, format and detail, then redirects to a permanent CDN URL. Coordinates are WGS84 (EPSG:4326); GeoJSON is in lon/lat order.

curl "https://geo-coder-service.vercel.app/v1/boundaries/r62422.wkt?detail=low" \  -H "Authorization: Bearer $GEOCODE_API_KEY"