Create area from a description
POST /v1/areas50 unitsWrites
Turns a plain-language description of an area ("Alameda and Contra Costa counties excluding San Jose, plus SFO") or wording from a contract or policy into one validated land-only polygon. An AI agent plans includes/excludes from real administrative boundaries; you get GeoJSON plus each part's source, or a 422 explaining what could not be mapped. Takes 30 s to a few minutes. For a single named place use search_boundaries + get_boundary instead: it is instant and costs 1 unit.
MCP tool create_area · CLI geocode create-area · RPC POST /v1/ops/create_area
Input
| Field | Type | Description |
|---|---|---|
textbody, required | string | The description of the area. |
countrybody | string | ISO 3166-1 alpha-2 country code, if known. |
sourcebody | string | Who wrote the description (agency, company). Optional context. |
seedbody | object | A point that must be inside the area. |
Example request
curl -X POST "https://geo-coder-service.vercel.app/v1/areas" \ -H "Authorization: Bearer $GEOCODE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"text":"Alameda and Contra Costa counties, excluding the City of Oakland","country":"US"}'Example response
Errors
Failures are RFC 9457 problems. Common ones here: 400 invalid_input, 401 unauthorized, 402 quota_exceeded, 429 rate_limited.