Reverse Geocoding API Worldwide with Time Zones: OpenCage
Pricing
from $5.00 / 1,000 geocoded address or coordinates
Reverse Geocoding API Worldwide with Time Zones: OpenCage
Forward and reverse geocoding for any country through the OpenCage API on OpenStreetMap and open data: coordinates to address, address to latitude and longitude, plus time zone, currency, calling code, what3words, geohash, MGRS, FIPS and NUTS annotations. Results may be stored. Bring your own key.
Pricing
from $5.00 / 1,000 geocoded address or coordinates
Rating
0.0
(0)
Developer
Nabeel Hassan
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a month ago
Last modified
Categories
Features
Share
Turn coordinates into addresses, or addresses and placenames into coordinates, for any country through the OpenCage geocoding API with your own API key, and get the time zone, currency, calling code, what3words and more for every match.
OpenCage is a worldwide geocoding API built on OpenStreetMap and other open data sources. Its results may be cached or stored permanently, on a free trial or a paid plan, and even after you stop being a customer. This actor wraps its one documented geocoding route, GET /geocode/v1/json on api.opencagedata.com, in forward and reverse mode, with every documented optional parameter that changes the result. Use it to reverse geocode GPS points from fleets, apps or IoT devices, geocode customer, store or event lists in any country, add local time zones and currencies to locations, or feed Google Sheets, BI dashboards, a data warehouse or AI agents. Bring your own API key.
BYOK, not live tested: every parameter comes from OpenCage's documentation at opencagedata.com/api, the route was probed on 2026-10-26 with an invalid key, and the response shape was checked against the testing key OpenCage publishes in its docs. The actor has not been run against a live customer key.
What it does
- Reverse geocoding worldwide: one latitude,longitude pair per request, returning the nearest address with its formatted string, road, house number, postcode, city, state, country, ISO 3166 codes, confidence and the distance in meters from your point.
- Forward geocoding: addresses, placenames, postcodes or UN/LOCODEs (with the LOCODE: prefix) to latitude and longitude, with up to 100 ranked candidates per lookup.
- Filters that cut wrong matches: country codes (countrycode), a bounding box (bounds) and a proximity hint (proximity) for forward lookups, and a preferred language (or native) for both modes.
- Annotations as flat columns: IANA time zone, abbreviation, UTC offset and DST flag; currency code, name and symbol; international calling code; what3words address; geohash, MGRS, Maidenhead and DMS; US FIPS state and county codes; EU NUTS 3 code; UN M49 regions; Wikidata ID; OpenStreetMap link; drive side and speed unit; sunrise and sunset; and the full annotations object.
- Road matching: roadinfo snaps to the nearest road and adds road type, speed limit, lanes, surface and toll where OpenStreetMap has them.
- Formatting and privacy switches: address only (no point of interest name), abbreviated addresses, no deduplication, and no_record so OpenCage keeps no record of your queries.
- Pay only for matches: lookups with no match, and lookups OpenCage refuses, are recorded as a free row that says why, never charged.
How to use it
- Get an OpenCage API key at opencagedata.com/users/sign_up. The free trial allows 2,500 requests a day at one request per second and is meant for testing; subscriptions and one-time plans allow more.
- Paste the key into the API key field, or set the DATA_API_KEY environment secret. OpenCage only accepts the key as the key query parameter, so the actor adds it to the request at the last moment and removes it from everything it logs.
- Pick a mode, paste your addresses or coordinates, set any filters, and run.
- Download the dataset as JSON, CSV or Excel, or connect it to your workflow through the Apify API, webhooks or integrations.
A missing or unknown key, a disabled key, a rejected IP address or a used up quota ends the run cleanly with a status message that explains what to change, and nothing is charged.
Input
| Field | Modes | Description |
|---|---|---|
mode | all | geocode (default) or reverse |
addresses | forward | One address, placename or postcode per line, such as Frauenplan 1, 99423 Weimar, Germany |
coordinates | reverse | One latitude,longitude pair per line, such as 52.5432379,13.4142133 |
countryCodes | forward | Two letter ISO 3166-1 codes such as de, gb, us (countrycode) |
bounds | forward | min_lng,min_lat,max_lng,max_lat bounding box |
proximity | forward | latitude,longitude point that ranks closer results higher |
limit | forward | Matches per lookup, 1 to 100, default 1. Extra matches go in otherResults |
language | all | IETF language code such as de or pt-BR, or native |
annotations | all | Include annotations (default on); off sends no_annotations=1 |
roadinfo | all | Match the nearest road and add road details |
addressOnly | all | Leave point of interest names out of the formatted address (address_only=1) |
abbreviate | all | Shorten the formatted address (abbrv=1) |
noDedupe | all | Keep duplicate results (no_dedupe=1) |
noRecord | all | Ask OpenCage not to log the query (no_record=1) |
maxResults | all | The most rows this run returns and charges for (default 100, up to 10,000) |
requestsPerMinute | all | Pacing for calls to OpenCage (default 60, the free trial rate) |
apiKey | all | Your OpenCage API key |
Output
One row per address or coordinate. Example reverse geocoding row (the components, annotations and bounds objects shortened):
{"mode": "reverse","modeLabel": "Reverse geocoding","query": "-22.6792,14.5272","found": true,"formattedAddress": "Woermann Street, Swakopmund 13001, Namibia","latitude": -22.6792396,"longitude": 14.5272048,"confidence": 9,"resultType": "road","category": "road","distanceMeters": 4,"houseNumber": null,"road": "Woermann Street","suburb": "Central","city": "Swakopmund","state": "Erongo Region","postcode": "13001","country": "Namibia","countryCode": "NA","iso3166Alpha3": "NAM","iso3166_2": ["NA-ER"],"continent": "Africa","timezone": "Africa/Windhoek","timezoneAbbreviation": "CAT","utcOffsetSeconds": 7200,"utcOffset": "+0200","nowInDst": false,"currencyCode": "NAD","currencyName": "Namibian Dollar","callingCode": 264,"what3words": "outsmarted.cheering.chemical","mgrs": "33KVQ5143391910","maidenhead": "JG77gh36gx","osmUrl": "https://www.openstreetmap.org/?mlat=-22.67924&mlon=14.52720#map=16/-22.67924/14.52720","driveOn": "left","speedIn": "km/h","roadType": "residential","resultCount": 1,"totalResults": 1,"components": { "_type": "road", "road": "Woermann Street", "city": "Swakopmund" },"annotations": { "timezone": {}, "currency": {}, "what3words": {} },"otherResults": null,"dataLicense": "OpenStreetMap contributors (ODbL) and other open data; see opencagedata.com/credits","note": null}
confidence runs from 1 (low precision) to 10 (high precision) and is based on the size of the matched place's bounding box; 0 means OpenCage could not determine it. It is not a ranking: results are not ordered by confidence. resultType is OpenCage's _type, such as building, road, city or postcode, so a forward match that only reached the city level is easy to spot.
Pricing
| Event | Price | Charged for |
|---|---|---|
geocode-result | 0.005 USD | Each matched address or coordinate returned without annotations |
geocode-result-with-annotations | 0.008 USD | Each matched address or coordinate that comes back with annotations |
Lookups with no match and refused or invalid lookups are never charged.
OpenCage bills your own account separately. OpenCage plans are counted in requests, and this actor sends one request per address or coordinate. See opencagedata.com/pricing for current plans.
FAQ
What is the OpenCage geocoding API?
OpenCage is a geocoding API run by OpenCage GmbH in Germany. It converts addresses and placenames to coordinates (forward geocoding) and coordinates to addresses (reverse geocoding) for the whole world, using OpenStreetMap and other open data, and adds annotations such as time zone, currency and what3words to each result.
Do I need my own OpenCage API key?
Yes. This actor is bring your own key: it calls OpenCage with your key, and your OpenCage plan and limits apply. Create a key at opencagedata.com; the free trial is for testing, at 2,500 requests a day and one request per second.
How do I reverse geocode GPS coordinates to an address?
Choose Reverse geocoding and paste one latitude,longitude pair per line, latitude first. Each row carries the nearest address, its components and distanceMeters, the distance from your point to the result.
How do I get the time zone or local currency of a location?
Leave Include annotations on. Every match carries timezone (IANA name such as Europe/Berlin), timezoneAbbreviation, utcOffset, utcOffsetSeconds and nowInDst, plus currencyCode, currencyName, currencySymbol and callingCode. The whole annotations object stays in annotations.
How do I stop forward geocoding from matching the wrong country?
Set Country codes, a Bounding box or both. OpenCage recommends them, and it does not do fuzzy matching, so write addresses the way the country writes them. Check resultType and confidence to catch matches that only reached a city or region.
Can I store the results?
Yes. OpenCage's documentation says all data returned by the API can be stored permanently, whether you are on the free trial or a paid plan, and even after you stop being a customer. Refreshing now and then is still wise, since OpenStreetMap keeps changing.
What attribution do I need?
Much of the data comes from OpenStreetMap, which is licensed under the Open Database License (ODbL). When you publish or display the results, credit "OpenStreetMap contributors" and follow OpenCage's attribution guide at opencagedata.com/credits. The OpenStreetMap Foundation's guidance is that geocoding does not trigger the share-alike obligations of the ODbL. Every row carries a dataLicense column as a reminder.
What do I pay?
0.005 USD per matched lookup without annotations and 0.008 USD per matched lookup with annotations, plus your own OpenCage plan, billed by OpenCage. Lookups with no match are free on this side.
Keyword map
reverse geocoding API, reverse geocode coordinates, coordinates to address, latitude longitude to address, GPS to address, geocoding API worldwide, address to latitude longitude, international geocoding, OpenStreetMap geocoding API, Nominatim alternative, time zone by coordinates, time zone lookup API, currency by location, what3words from coordinates, geohash and MGRS conversion, FIPS code by coordinates, NUTS region lookup, nearest road lookup, OpenCage API, OpenCage geocoder.
Routes and verification
| Mode | Route | Source | Probe with an invalid 32 character key (twice) |
|---|---|---|---|
| Forward geocoding | GET /geocode/v1/json?q=Berlin | opencagedata.com/api | 401 unknown API key |
| Reverse geocoding | GET /geocode/v1/json?q=52.5,13.4 | opencagedata.com/api | 401 unknown API key |
Controls on the same host: /geocode/v1/jsonx answered 400 not a valid format, /geocode/v9/json answered 400 not a valid version, an invented /reverse/v1/json answered a 404 HTML page, and a request with no key answered 401 missing API key, so the route above is confirmed. The publicly documented testing keys confirmed the 200 response shape, 402 quota exceeded, 403 disabled and 429. The GeoJSON, XML and google-v3-json formats and the separate geosearch product are not wrapped.
Licensing and data use
This actor works only with your own OpenCage account and API key, and OpenCage's terms of use apply. Results may be stored permanently. Data from OpenStreetMap is licensed under the ODbL and needs attribution to OpenStreetMap contributors; see opencagedata.com/credits for the other sources. This actor is not affiliated with or endorsed by OpenCage GmbH.