Merge boundaries
POST /v1/boundaries/union1 unit per boundary (up to 50)Read-only
Merges boundaries into one polygon: the union of include minus the union of exclude (e.g. three counties minus one city). Use it for sales territories, delivery zones and service areas. Up to 50 boundaries; costs 1 unit per boundary. Returns a GeoJSON Feature with area_km2. To describe an area in words instead, use create_area.
MCP tool union_boundaries · CLI geocode union-boundaries · RPC POST /v1/ops/union_boundaries
Input
| Field | Type | Description |
|---|---|---|
includebody, required | string[] | Boundary ids to merge. |
excludebody | string[] | Boundary ids to cut out. Default []. |
detailbody | "low" | "medium" | "high" | "full" | Simplification relative to the boundary's size: low (~1,000 points across, maps and previews), medium (default, ~5,000), high (~25,000), full (unsimplified OSM). Default "medium". |
Example request
curl -X POST "https://geo-coder-service.vercel.app/v1/boundaries/union" \ -H "Authorization: Bearer $GEOCODE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"include":["r396499","r396479"],"exclude":["r2833530"],"detail":"low"}'Example response
Errors
Failures are RFC 9457 problems. Common ones here: 400 invalid_input, 401 unauthorized, 402 quota_exceeded, 429 rate_limited.