api query parameter, which is where the API expects it — not api_key.
Things to know before you call:
- Every answer is HTTP 200, including a refusal. A live probe with a bad key answered 200 with
{"status":"ACCESS_DENIED"}, and a request with no key answered{"status":"INVALID_REQUEST"}. The status line says nothing, so the plugin readsstatusand throws unless it isokorZERO_RESULTS. ZERO_RESULTSis not an error. It means the query was valid but matched nothing, and the docs say that request is not charged. Geokeo sends only{"status":"ZERO_RESULTS"}; the plugin returns it with an emptyresultslist so a caller can tell it apart from a refusal.- A coordinate of exactly 0 is refused. Live, a reverse lookup with
latorlngequal to0answeredINVALID_REQUEST, and0.0beside a non-zero coordinate answered an empty HTTP 500. Points on the equator or the prime meridian need a tiny offset, such as0.000001. ACCESS_DENIEDcovers more than a bad key. The docs say it also covers an IP or HTTP referrer restriction set on the account, so a key that works elsewhere can still be refused here.- The coordinates are strings. Geokeo sends
"lat": "40.74843124430164", not a number. The raw fields are kept as documented, andlat,lnganddistance_kmare added beside them already parsed, so nothing has to convert them again. - The distance has its unit glued on. A reverse result carries
"distance": "0.0010302984507433km"as one string. That is kept as-is, anddistance_kmholds the number. - The query is capped at 50 characters. The plugin rejects a longer
qbefore the request rather than letting Geokeo answerINVALID_REQUEST. - There is a class and a type, not a category tree. Each result carries an OpenStreetMap
class(such astourism) and atypewithin it (such asattraction), which is a coarser signal than a full category path. - There are two endpoints, and that is the whole API. Geokeo offers forward and reverse geocoding only; there is no batch route, no autocomplete and no place details.
- 2 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the Geokeo API key before the first call: More: API Key
pnpm corsair setup --plugin=geokeo --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
Turn a place name into coordinatesWhat’s next
API reference
Every
geokeo.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.