Geocoder.ca Premium API (Canada + USA)

Geocoder.ca provides a simple HTTPS API for forward geocoding (address → coordinates), reverse geocoding (coordinates → nearest address), and geoparsing (scantext). Output is typically XML, with optional JSON/JSONP and CSV. Keep your auth token on the server whenever possible.

Official premium API page: https://geocoder.ca/?premium_api=1

🍁 Switching from Google Maps? Cache your results, own the database, and estimate what you'd save. Estimate savings →

Quick start (curl)

Replace YOUR_AUTH_TOKEN. Forward lookups use locate. Reverse uses latt, longt, and reverse=1.

CLI
Forward (address → lat,lon) — XML
Forward — JSON
Reverse (lat,lon → nearest address) — XML
Tip: for USA reverse geocoding, add allna=1. If you’re near the border, allna=1 can return both CA + US results.

Core request shapes

Everything is HTTPS to https://geocoder.ca/ via GET or POST.

Reference
Forward geocoding inputs
Geoparsing inputs
Reverse geocoding inputs

Forward geocoding examples (locate=…)

Use locate for street addresses, intersections, postal/zip codes, and more.

Many languages
Intersection lookup
Biasing (country / region / bounds)
Standardized address fields (standard=1)
Python (requests)
Node.js (fetch)
PHP (cURL)
Common forward options: standard=1 (standardized address), strictmode=1 (avoid guesses), decimal=N (limit decimals), showcountry=1, showpostal=1.

Reverse geocoding examples (latt/longt + reverse=1)

Reverse geocoding returns the closest address, plus optional intersection/major intersection and more.

Reverse
Reverse (Canada) — XML
Nearest corner (corner=1)
Reverse (USA) — include allna=1
Places near a point (reverse + POIs)
Reverse options you’ll use most: range=…, exact=1, moreinfo=1, allna=1, corner=1, decimal=N.

Geoparsing examples (scantext=…)

Extract one or more locations from free-form text. Use bounds/country/region to bias results.

scantext
GET (scantext) — JSON
Bias with bounds (SW|NE)
POST (recommended for long text)
Use country=canada|usa and/or region=ON|QC|NY|CA to reduce ambiguity.

Output formats

Most API examples show XML. JSON/JSONP/CSV are optional.

Formats
JSON
JSONP (jsonp=1 + callback=…)
CSV (geoit=CSV)

Practical flags you’ll actually use

Great for production robustness + predictable billing.

Ops
  • strictmode=1 to avoid “best guess” and force suggestions when ambiguous.
  • topmatches=N to request a fixed number of suggestions for partial inputs.
  • limit=N to cap results (important for functions that bill per item, like showaddrs).
  • decimal=N to reduce decimals (smaller response size, lower precision).
  • standard=1 to request standardized address components in the response.

Premium-only functions (examples)

Autocomplete, show addresses by postal code, polygons, batch tools, and census enrichment.

Premium
Autocomplete (XML + JSON)
showaddrs (postal/zip → many addresses)
Batch postal lookup (batchpostal=… | …)
Postal-in-polygon (postalinpolygon=…)
Get polygon for a postal code (getpolygon=1)
Census enrichment (censusdatafromdauid=…)
For premium functions that return many items (e.g., showaddrs, postalinpolygon), use limit=… where available to control costs.

Server-side patterns (proxy, worker, batch)

Hide your auth token; cache + rate-limit requests.

Architecture
Cloudflare Worker-style proxy (keeps auth private)
Batch file (bash) — one address per line
Production tips: cache results (Redis), normalize into your own schema, add retries + backoff, and keep tokens server-side only.