Suggest boundaries (autocomplete)
Autocomplete for a search box: the best-known boundaries and airports whose name starts with what has been typed so far, in any language and without accents or case ("munc" finds München, "new y" New York); an airport also by a word in its name from three letters ("kenn" finds John F. Kennedy International) or by its IATA/ICAO code ("jfk"). Answered from our own index in milliseconds with no upstream call, so call it on every keystroke. Free and public. Returns up to limit candidates, most prominent first (countries and states, then by population), each with id, name, type (the division's level: country, region, county, localadmin, locality, macrohood, neighborhood; or airport), country_code, region (ISO 3166-2), population, area_km2 and centroid, but no polygon: pass the id to get_boundary. From three letters it also finds villages, hamlets and neighbourhoods that have no outline of their own: such a candidate is the nearest boundary containing the place and carries via {name, kind}, the place that matched, so its id and name are the containing boundary's, not the place's. It matches the start of a name only. For a complete name, a postcode, an address, a filter by kind or admin_level, or parents in the result, use search_boundaries.
MCP tool suggest_boundaries · CLI geocode suggest-boundaries · RPC POST /v1/ops/suggest_boundaries
Input
| Field | Type | Description |
|---|---|---|
qquery, required | string | What the user has typed so far, e.g. "berl". One character is enough. |
countryquery | string | Limit to countries: ISO 3166-1 alpha-2, comma-separated (e.g. US or de,at,ch). |
limitquery | integer | At most this many suggestions (1–20, default 8). Default 8. |
Example request
curl "https://geocodeai.dev/v1/boundaries/suggest?q=berl"Example response
See the description above for what this returns.
Errors
Failures are RFC 9457 problems. Common ones here: 400 invalid_input, 429 rate_limited.