OpenCage

Forward and reverse geocoding using open data

OpenCage is a commercial geocoding API that aggregates data from multiple open sources including OpenStreetMap, Who's on First, and government datasets. It provides forward and reverse geocoding with consistent, well-structured JSON responses including timezone, currency, and what3words data alongside coordinates. For OpenClaw agents, OpenCage is a reliable step up from Nominatim when you need consistent formatting, timezone lookups bundled with geocoding, and higher rate limits. The free tier is generous for personal automation and the response format is cleaner than raw OSM data.

Tags: maps, geolocation

Category: Geocoding

Use Cases

  • Geocode addresses with timezone data included — useful for scheduling across timezones
  • Reverse geocode coordinates with consistent, well-formatted address output
  • Get currency and calling code information for a location alongside coordinates

Tips

  • Use the 'no_annotations' parameter to slim down responses if you only need coordinates
  • The timezone annotation is a killer feature — eliminates a separate timezone API call
  • Add 'countrycode' parameter to restrict results to a specific country for better accuracy

Known Issues & Gotchas

  • Free tier requires attribution to OpenCage and data sources
  • 1 request/second on free — same as Nominatim, but with a daily cap
  • Response includes many annotation fields — large payloads if you don't filter

Frequently Asked Questions

Why use OpenCage over free Nominatim?

OpenCage offers cleaner response formatting, bundled timezone/currency data, higher rate limits (2,500/day vs Nominatim's ~86K/day but 1/sec), and better handling of ambiguous queries. It's worth it for production-quality geocoding.

Does the free tier require attribution?

Yes. The free tier requires attribution to OpenCage and OpenStreetMap. Paid plans remove the attribution requirement.

Does it support batch geocoding?

Not via a single batch endpoint, but with 2,500 requests/day at 1/second, you can process a decent batch. For heavy bulk work, use their enterprise plans or self-host Nominatim.