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.
| detail | Use it for |
|---|---|
| low | About 1,000 points across the longer side. Map previews, thumbnails, dashboards. Free without a key on get_boundary. |
| medium | About 5,000 points across. The default with a key: web maps at city zoom, most point checks. |
| high | About 25,000 points across. Street-level maps and close inspection. |
| full | The 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
| format | What you get |
|---|---|
| geojson | GeoJSON Feature |
| kml | KML document |
| wkt | WKT MultiPolygon |
| svg | SVG path (lon/lat, y flipped) |
| gml | GML 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"