Boundaries at a point
Every administrative boundary containing a point, country first down to the smallest district. Use it to tag an address, a store or a delivery with its country, state, county and city in one call. Costs 1 unit. Returns ids you can pass to get_boundary. Answered from our own polygons in well under a second for any point on land or in territorial waters; postcode areas are not included in such an answer, except US ZIP code areas (Census ZCTAs, ids zcta-…), which are listed after the chain for a point in the US, followed there by its US Census areas (source us_census): combined statistical area, metro or micro area, congressional district (kind congressional_district), school districts (kind school_district, up to one per level) and census-designated place. In the UK the Westminster constituency, electoral ward and census areas (MSOA, LSOA; ids ons-…, from the ONS) follow the chain. Last come the Exclusive Economic Zone (kind eez, id eez-…) for a point at sea within one, then the time zone (kind timezone, id tz-…, its IANA name as name): the time zone of any point on Earth, the open sea included. Choose levels by kind: admin_level is OpenStreetMap's number and is null where we do not hold it. Only a point no division contains (open sea, Antarctica) is looked up in OpenStreetMap; when that is slow or down, the call answers the boundaries already cached with polygons, marked partial: true with retry_after and a hint (city, district or postcode may be missing), or 503 upstream_unavailable with retry_after when none is cached. A slow lookup keeps running, so the same call after retry_after is served complete from the cache.
MCP tool reverse_boundaries · CLI geocode reverse-boundaries · RPC POST /v1/ops/reverse_boundaries
Input
| Field | Type | Description |
|---|---|---|
latquery, required | number | Latitude, -90 to 90. |
lonquery, required | number | Longitude, -180 to 180. |
Example request
curl "https://geocodeai.dev/v1/boundaries/reverse?lat=52.52&lon=13.405" \
-H "Authorization: Bearer $GEOCODE_API_KEY"Example response
Errors
Failures are RFC 9457 problems. Common ones here: 400 invalid_input, 401 unauthorized, 402 quota_exceeded, 429 rate_limited.