| name | geocodio |
| description | Use the Geocodio CLI to geocode addresses, reverse geocode coordinates, calculate distances, and process spreadsheets. Invoke when the user asks to geocode, reverse geocode, look up an address or coordinates, calculate distances or travel times, process a CSV/spreadsheet of addresses, or anything related to Geocodio's API. Requires the `geocodio` binary installed and `GEOCODIO_API_KEY` set. |
Geocodio CLI
Use the geocodio command-line tool to interact with the Geocodio API.
Prerequisites
geocodio binary installed and on PATH
GEOCODIO_API_KEY environment variable set
If either is missing, tell the user what they need before proceeding.
Output Format
Always use --json when you need to parse or process results programmatically. Use --agent when presenting results directly to the user in conversation (produces clean markdown tables). Omit both for default human-readable terminal output.
Commands
Geocode (address to coordinates)
geocodio geocode "1600 Pennsylvania Ave NW, Washington DC"
geocodio geocode "1600 Pennsylvania Ave NW, Washington DC" --fields timezone,cd
geocodio geocode "1600 Pennsylvania Ave NW, Washington DC" --limit 1
geocodio geocode "Ottawa, Ontario" --country Canada
geocodio geocode "10 Downing St, London" --country "United Kingdom" --fields uk-westminster,uk-local
geocodio geocode --batch addresses.txt
geocodio geocode "Washington DC" -d "New York" -d "Boston" --distance-mode driving
geocodio geocode "1600 Pennsylvania Ave NW, Washington DC" --show-address-key
UK data append fields: uk-westminster, uk-westminster-next, uk-devolved, uk-devolved-next, uk-local, uk-local-next (the -next variants return upcoming boundary changes). Pass them via --fields like any other append.
Reverse Geocode (coordinates to address)
geocodio reverse "38.8976,-77.0365"
geocodio reverse --batch coordinates.txt
geocodio reverse "38.8976,-77.0365" --skip-geocoding --fields timezone
geocodio reverse "38.8976,-77.0365" -d "New York" --distance-mode driving
Distance (origin to destinations)
geocodio distance "Washington DC" "New York"
geocodio distance "Washington DC" "New York" "Boston" "Philadelphia"
geocodio distance "Washington DC" "New York" --mode driving --units km
Distance Matrix (many-to-many)
geocodio distance-matrix --origins origins.txt --destinations destinations.txt --mode driving --units miles
Async Distance Jobs (large calculations)
geocodio distance-jobs create --name "My Job" --origins origins.txt --destinations destinations.txt --watch
geocodio distance-jobs list
geocodio distance-jobs status JOB_ID --watch
geocodio distance-jobs download JOB_ID --output results.csv
geocodio distance-jobs delete JOB_ID
Spreadsheet Processing (async batch geocoding)
geocodio lists upload data.csv --direction forward --format "{{A}}, {{B}}, {{C}}" --watch
geocodio lists upload data.csv --direction forward --format "{{A}}" --fields timezone,cd
geocodio lists upload coords.csv --direction reverse --format "{{A}}" --watch
geocodio lists list
geocodio lists status LIST_ID --watch
geocodio lists download LIST_ID --output geocoded.csv
geocodio lists delete LIST_ID
Global Flags
These work with all commands:
| Flag | Description |
|---|
--json | Raw JSON output (for parsing) |
--agent | Markdown output (for conversation) |
--api-key | Override API key |
--no-color | Disable colors |
--debug | Show HTTP request/response details |
Common Workflows
Geocode a list of addresses and get JSON results:
geocodio geocode --batch addresses.txt --json
Find distances from one address to several others:
geocodio geocode "123 Main St, Springfield IL" -d "Chicago IL" -d "St Louis MO" --distance-mode driving --agent
Process a CSV with address columns:
geocodio lists upload customers.csv --direction forward --format "{{B}}, {{C}}, {{D}}" --watch
Get timezone and congressional district for coordinates:
geocodio reverse "38.8976,-77.0365" --fields timezone,cd --agent
Batch File Limits
- Batch geocode/reverse: max 10,000 items per request
- For larger files, use
lists upload which handles up to 10,000,000+ rows asynchronously