Skip to main content
Use Geocodio through Corsair: one client, typed API calls. Copy the API key from your Geocodio dashboard. The key travels as the api_key query parameter, which is where the API expects it. Things to know before you call:
  • v2.1 is the current version. A live probe of v1.9 answered with a _warnings entry saying a newer version exists, so the plugin targets v2.1 and does not produce that warning.
  • A bad key answers 403, not 401. A live probe returned {"error":"Invalid API key","reference":"https://www.geocod.io/geocodio-403-forbidden-error/"} with HTTP 403. HTTP errors arrive as core’s ApiError, with that envelope (minus the address sent) on error.body.
  • A result always carries its confidence. accuracy is 0 to 1, accuracy_type says how the match was made (rooftop, range_interpolation, nearest_street, place) and match_type says whether it was exact. A caller that ignores those treats a street centroid like a rooftop.
  • The components are parsed for you. address_components splits the result into street, city, state_province, postal_code, country and nation, so nothing has to re-parse formatted_address.
  • Batches are one request, not a loop. geocode.batch and geocode.batchReverse take up to 10,000 entries in a single POST and answer a results array in the order they were sent. Each entry holds the query and its own response.results. A failed batch is not retried, since its lookups may already be billed.
  • parse costs no lookup. It splits an address without geocoding it, which is the cheap way to clean data before spending lookups on it.
  • Distances come in two flavours. driving follows roads and returns a duration; straightline and haversine are the as-the-crow-flies distance with no duration. Distances come from distance.fromOrigin and distance.matrix, which both accept all three modes; the geocode calls take no distance option.
  • An enterprise host exists. Pass enterprise: true on geocode.forward, geocode.reverse, geocode.batch, geocode.batchReverse and distance.fromOrigin to use api.enterprise.geocod.io instead of the self-serve host. geocode.parse, distance.matrix and the jobs and lists calls always use the self-serve host.
  • Uploading a spreadsheet is not included. That route needs a multipart file upload; lists.all, lists.get and lists.delete are here so an existing list can be tracked, but a new one has to be uploaded from the dashboard.
What you get:
  • 13 typed API operations

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

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

Geocode an address
Delete a distance job
See the full list on the API page.

What’s next

API reference

Every geocodio.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.