OpenCage Launches Free Global Geocoding API

OpenCage's Geocoder API is an easy and cost-effective way to extend an application's mapping capabilities outside of the U.S. Worldwide mapping data is hard to access and expensive, making it difficult to develop maps and location services for global users. Open mapping data sources like OpenStreetMaps are emerging, but they have a steep learning curve. OpenCage helps solve this challenge by aggregating and optimizing many sources of open map data. Its API is in beta and is free for developers.

"With the rise of mobile, geocoding and geocoding-based services are increasingly important," says Ed Freyfogle, co-founder of Lokku, the parent company of OpenCage and Nestoria. "Our goal is to make it as easy as possible for developers to work with open map data. Our API simplifies working with complex global mapping data. OpenCage's Geocoder API gives developers access to our production systems that support millions of monthly Nestoria users. Our Geocoding API is currently free, and there will always be a free tier for developers."

Maps and Apps

Working with location data is of growing importance for developers. Everyone carries a phone. People supply their addresses directly via form input or indirectly as part of social media profile data accessed via an API. Mobile phones and new browsers make location coordinates available via API calls.

Sample OpenStreetMap image from

Geocoding services translate street addresses into mapping coordinates. Developers can take user addresses and show them on a map. Reverse geocoding is the opposite, taking mapping coordinates and translating them into human-readable location information. Developers can get location coordinates such as “-118.4869739, 34.0195598” and then display “Welcome to Santa Monica!” in their app.

Global Map Data

App developers have an easy time servicing American users. The U.S. government provides free map data, U.S. address formats are standardized, and many vendors provide high-quality map data and geocoding services.

Worldwide mapping data is expensive, hard to access and unstructured. Most developing countries don't have good mapping data, government bureaucracies control access to the data and street addresses aren't in standardized formats. Even mapping data from developed countries like Britain can be hard to work with because the U.K. uses a unique, 200-year-old system for its mapping coordinates.

Aggregating Open Map Data

OpenCage's solution to the global mapping data challenge is to aggregate many sources of open map data.

OpenCage's Geocoder API sits in front of business logic that optimizes the use of open map data on a country-by-country basis.

OpenCage's sources of open map data include Nominatim/OpenStreetMap, Nestoria, Yahoo GeoPlanet, Twofishes, Data ScienceToolkit, GeoNames, Flickr Shapefiles, Natural Earth Data and Quattroshapes.

OpenCage Geocoder API - Open Map Data Sources

OpenCage's Geocoder API is a RESTful Web Service that is available via both HTTP and HTTPS. Responses are returned as JSON, GeoJSON, Google-V3-JSON, XML or an HTML map showing the positions of each location that matches the query when viewed in a browser. API client code libraries are available in PHP, Ruby, Python and .NET.


OpenStreetMap is a collaborative project to create a free and editable map of the world.

Inspired by Wikipedia, OpenStreetMap organizes 1.6 million volunteers who contribute free and open source information to a massive repository of global mapping data. Calling it "OpenStreetMap" is a bit confusing, as it is neither a "map" nor focused on "streets." OpenStreetMap is a data store with three main elements: nodes (towns, buildings, park benches); ways (streets, rivers, bike paths); and relations (a data structure that combines nodes and ways to define cities, highways, forest boundaries, etc.). OpenStreetMap provides a RESTful API with these nodes, ways and relations as the main API endpoints for developers to access, create and update elements.

Nominatim is a tool for searching OpenStreetMap data. Nominatim provides advanced geocoding functionality.


Nestoria is a global real estate search engine operated by OpenCage's parent company, Lokku. Its API provides access to global real estate data. Nestoria services millions of users globally; its strongest markets are England, Germany, Spain, Brazil, India and Mexico. (Read ProgrammableWeb's early coverage of the Nestoria API.)

Why Use the OpenCage Geocoder API?

OpenCage is a first mover in the global open map data market. OpenCage's Geocoder API is powered by technology developed for Nestoria. Nestoria launched eight years ago and has been fast growing and profitable the last five years. A team of 20 works to solve global mapping data challenges, then makes these resources available via APIs. The team also leverages learnings gained from OpenCage Data, a global mapping product servicing nontechnical end users like marketing departments. (Read ProgrammableWeb's coverage of OpenCage Data here.)

As with many open source projects, developers face a steep learning curve when starting to work with OpenStreetMap data directly. OpenStreetMap is a large and constantly changing data asset. Imagine trying to maintain a local copy of and provide your apps with access to only the most current data. Using OpenStreetMap is a similar challenge. In addition to the technical challenges, server bills can run $500 per month just hosting the OpenStreetMap data.

Developers using Google Maps can easily switch to the OpenCage Geocoder API. OpenCage supports the exact same request and response formats as apps use with Google Maps' geocoding service, the Google v3 Geocoding API. The URL structure of the API is different, however, so there would be some custom coding there.

Google restricts how developers can use their geocoding data — it can only be used in a Google map. OpenCage lets you use the data any way you like.

OpenCage encourages ProgrammableWeb readers to share their feedback on the API.

Be sure to read the next Mapping article: GraphHopper's API Helps Get You From A to B