FreeAPIHub
HomeAPIsAI ModelsAI ToolsBlog
Favorites
FreeAPIHub

The central hub for discovering, testing, and integrating the world's best AI models and APIs.

Platform

  • Categories
  • AI Models
  • APIs

Company

  • About Us
  • Contact
  • FAQ

Help

  • Terms of Service
  • Privacy Policy
  • Cookies

© 2026 FreeAPIHub. All rights reserved.

GitHubTwitterLinkedIn
  1. Home
  2. Categories
  3. Geolocation & Mapping
  4. OpenCage Geocoding API
published

OpenCage Geocoding API

The OpenCage Geocoding API offers developers a flexible service for forward and reverse geocoding, supporting multiple response formats and a generous free tier.

Developed by OpenCage Data

Live API
99.90%Uptime
200msLatency
450Stars
API KeyAuth
NoCredit Card
RESTStyle
v1Version

Reference

API Endpoints

Endpoints

Available routes, request structures, and code examples.

Convert addresses to geographic coordinates

Endpoint URL
https://api.opencagedata.com/geocode/v1/json
Code Example
curl -X GET 'https://api.opencagedata.com/geocode/v1/json' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Request Payload
{
  "q": "1600 Pennsylvania Ave",
  "key": "API_KEY"
}
Expected Response
{
  "results": [
    {
      "geometry": {
        "lat": 38.8977,
        "lng": -77.0365
      }
    }
  ]
}
Version:v1
Limit:2500 requests/day

Integration

Quick Start

cURL ExampleREST
curl -X GET "https://api.opencagedata.com/geocode/v1/geocode/v1/json?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA"

Docs

Technical Documentation

What this API does

The OpenCage Geocoding API offers developers a powerful and flexible geocoding service that supports both forward and reverse geocoding with a simple RESTful interface. Leveraging open data sources such as OpenStreetMap, it provides accurate geographic coordinates from address queries and detailed address information from latitude and longitude inputs. The API supports multiple response formats including JSON, XML, and GeoJSON, making it easy to integrate across various programming environments.

How it works

Developers can send HTTP GET requests to the API endpoints to retrieve geocoding results. For forward geocoding, requests can be made to endpoints like `/geocode/v1/json?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA`, retrieving coordinates from an address. For reverse geocoding, requests can be sent to `/geocode/v1/json?lat=37.4219999&lon=-122.0840575`, obtaining address details from geographic coordinates. This makes it ideal for integrating location data into applications.

Authentication

Authentication is straightforward with an API key that is passed via query parameters. This ensures security without adding complexity to the implementation.

Example usage

  • /geocode/v1/json?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA - For converting an address into geographic coordinates.
  • /geocode/v1/json?lat=37.4219999&lon=-122.0840575 - For retrieving address information from geographic coordinates.

Limits

The OpenCage API offers a generous free tier of 2,500 requests per day. There may also be additional scalable rate limits for higher usage plans, though specific limit details are not documented in this summary.

Ideal use cases

  • Integrating geocoding functionality into travel applications.
  • Enhancing logistics and delivery tracking systems with accurate location data.
  • Incorporating geolocation features in mobile and web applications.
  • Utilizing geolocation in demographic analytics for market research.

Examples

Real-World Applications

  • Developing location-based services for travel and logistics
  • Integrating geolocation into mapping applications
  • Building mobile apps that require address search functionalities
  • Creating analytics tools for demographic location insights
  • Automatically enhancing user profiles with location data

Evaluation

Advantages & Limitations

Advantages
  • ✓ Generous free tier with 2,500 requests per day
  • ✓ Supports both forward and reverse geocoding
  • ✓ Multiple response formats including GeoJSON
  • ✓ Broad SDK support in over 8 languages
  • ✓ Accurate, enriched geolocation data including time zones and currency
Limitations
  • ✗ API key required for all requests
  • ✗ Rate limits can be restrictive for very high volume apps
  • ✗ No built-in batch geocoding support
  • ✗ Free tier does not include SLA or priority support

Support

Frequently Asked Questions

Important Notice

Verify Before You Decide

Last verified · Apr 30, 2026

The details on this page — including pricing, features, and availability — are based on our last review and may not reflect the provider's current offering. Providers update their products frequently, sometimes without prior notice.

What may have changed

Pricing Plans
Features & Limits
Availability
Terms & Policies

Always visit the official provider website to confirm the latest pricing, terms, and feature availability before subscribing or integrating.

Check official site

External Resources

Documentation Official Website Pricing Details Postman Collection

API Specifications

v1
Pricing Model
Tiered pricing based on request volume
Credit Card
Not Required
Response Formats
JSON, XML, GeoJSON
Supported Languages
8 Languages
SDK Support
JavaScript, Python, Java, Ruby, PHP, C#, Go, Swift
Rate Limit

2,500 requests per day on free tier; higher limits on paid plans

Time to Hello World

Minutes (API key signup and straightforward REST integration)

Free Tier

2,500 free requests per day with standard rate limits and community support

Best For

Developers needing reliable, accurate geocoding with a generous free tier for location-based applications

Not Ideal For

Applications with very high volume geocoding needs requiring batch processing or enterprise SLAs

Tags

#address#openstreetmap#opencage#coordinates#reverse-geocoding#geolocation#geocoding

You Might Also Like

More APIs Similar to OpenCage Geocoding API

Zippopotam.us API

The Zippopotam.us API offers developers free access to geographic data based on postal codes, ideal for address validation and auto-fill applications.

publicREST

REST Countries API

The REST Countries API offers free access to comprehensive data for over 250 countries, making it ideal for applications that require reliable country information.

publicREST

Countries Now API

The Countries Now API offers developers straightforward access to comprehensive country data, enhancing applications that require location-specific information.

publicREST