Geocoding — entry 059 of 80
OpenCage
OpenCage aggregates dozens of open geocoding datasets (OpenStreetMap among them) behind a single forward/reverse geocoding API, returning results as JSON, GeoJSON, or XML. Every request needs an API key, and the free tier — 2,500 requests/day at up to 1 per second — is explicitly marked for testing only, not production traffic. Paid plans start at €45/month for 10,000 requests/day and scale to enterprise-custom volumes.
AuthenticationAPI KeySign up with the provider to obtain credentials.
HTTPSSupportedTraffic is encrypted in transit.
CORSEnabledCallable directly from browser JavaScript.
PricingFreemiumA usable free tier exists, with paid plans for more volume.
FormatsJSON, GeoJSON, XMLResponses can be requested as JSON or GeoJSON or XML.
GreatAPIs Score
Score87
Authentication15/25API key required
Pricing17/20Freemium tier available
Docs20/20Machine-readable spec file bundled
Formats15/15Supports 3 response formats
Freshness20/20Verified within 6 months
Auth quickstart
- Get a key at the provider
- Send it on every request as a header
Authorization: <key> - The exact header isn't documented — Authorization is a common default; confirm in the provider's docs.
Stored keyNo key stored
Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.
Endpoints
Geocoding3
Convert address into coordinates (latitude, longitude) and relevant location information
GET/geojsonrequest a GeoJSON geocoding response
Parameters
| Name | In | Required | Type |
|---|---|---|---|
q | query | yes | string |
address_only | query | no | boolean |
add_request | query | no | boolean |
bounds | query | no | string |
countrycode | query | no | string |
language | query | no | string |
limit | query | no | integer |
no_annotations | query | no | boolean |
no_dedupe | query | no | boolean |
no_record | query | no | boolean |
pretty | query | no | boolean |
proximity | query | no | string |
roadinfo | query | no | boolean |
Responses
| Status | Description | Schema |
|---|---|---|
200 | OK | GetGeojson200ResponseBody |
400 | Invalid request | Response |
401 | Unable to authenticate | Response |
402 | Valid request but quota exceeded | Response |
403 | Forbidden | Response |
404 | Invalid API endpoint | Response |
405 | Method not allowed | Response |
408 | Timeout; you can try again | Response |
410 | Request too long | Response |
426 | Upgrade required | Response |
429 | Too many requests | Response |
500 | Internal server error | Response |
503 | Internal server error | Response |
GET/jsonrequest a JSON geocoding response
Parameters
| Name | In | Required | Type |
|---|---|---|---|
q | query | yes | string |
abbrv | query | no | boolean |
address_only | query | no | boolean |
add_request | query | no | boolean |
bounds | query | no | string |
countrycode | query | no | string |
language | query | no | string |
limit | query | no | integer |
no_annotations | query | no | boolean |
no_dedupe | query | no | boolean |
no_record | query | no | boolean |
pretty | query | no | boolean |
proximity | query | no | string |
roadinfo | query | no | boolean |
Responses
| Status | Description | Schema |
|---|---|---|
200 | OK | Response |
400 | Invalid request | Response |
401 | Unable to authenticate | Response |
402 | Valid request but quota exceeded | Response |
403 | Forbidden | Response |
404 | Invalid API endpoint | Response |
405 | Method not allowed | Response |
408 | Timeout; you can try again | Response |
410 | Request too long | Response |
426 | Upgrade required | Response |
429 | Too many requests | Response |
500 | Internal server error | Response |
503 | Internal server error | Response |
GET/xmlrequest an XML geocoding response
Parameters
| Name | In | Required | Type |
|---|---|---|---|
q | query | yes | string |
abbrv | query | no | boolean |
address_only | query | no | boolean |
add_request | query | no | boolean |
bounds | query | no | string |
countrycode | query | no | string |
language | query | no | string |
limit | query | no | integer |
no_annotations | query | no | boolean |
no_dedupe | query | no | boolean |
no_record | query | no | boolean |
pretty | query | no | boolean |
proximity | query | no | string |
roadinfo | query | no | boolean |
Responses
| Status | Description | Schema |
|---|---|---|
200 | OK | Response |
400 | Invalid request | Response |
401 | Unable to authenticate | Response |
402 | Valid request but quota exceeded | Response |
403 | Forbidden | Response |
404 | Invalid API endpoint | Response |
405 | Method not allowed | Response |
408 | Timeout; you can try again | Response |
410 | Request too long | Response |
426 | Upgrade required | Response |
429 | Too many requests | Response |
500 | Internal server error | Response |
503 | Internal server error | Response |
Health1
API connectivity test
GET/pingcheck API health and connectivity
Responses
| Status | Description | Schema |
|---|---|---|
200 | API is reachable | — |
Try it
Developer reference
Changelog
Spec version1.1.0
Tracked paths4
- gained an OpenAPI spec and a status page