Why is OpenStreetMap geocoding the way to go when working with addresses?

Openstreetmap geocoding pros and cons
Openstreetmap geocoding pros and cons

There are many ways to geocode addresses with various technologies now, and Google Maps is probably the most popular. It benefits users and developers (API, JavaScript library, easy set-up, etc.), but we shouldn’t forget the cons.

As far as it is a company with certain interests, they have terms and conditions and service prices destined to increase their profitabilities and income. So it happens that businesses unexpectedly get huge bills or banned because some service conditions were violated. For developers, users, and commercials, it can lead to problems.

However, there are alternative geocoding services based on OpenStreetMap data. So how is OSM geocoding different than, for example, Google Maps Geocoding? As it is based on community-driven open data, it is more affordable and permissive.

Is OpenStreetMap geocoding good enough?

People choose OpenStreetMap geocoding for two main reasons:

  • OSM is significantly cheaper than, for example, Google Maps geocoding;
  • Open data makes usage transparent, as far as not companies but contributors own the data. Businesses can collect and store the geocoded addresses according to the OpenStreetMaps license.

What about coverage and quality? Is the OSM geocoding as accurate as Google Maps and other commercial projects? The answer is YES! And there are particular reasons why. Let's go through them!

First, it's evaluated, updated, and maintained by a constantly growing community that adds new buildings and addresses, amenities and points of interest, defines postcode, political and administrative boundaries. The OSM community of over 7,800,000 registered users, over 1,600,000 contributors with more than 500,000 active ones makes about 140,000,000 changes per month.

Number of nodes added each day

OpenStreetMap statistics: Number of OSM nodes added daily

Even if some regions are not complete, they soon will be. Users add essential and rare information about places they know, which helps to know cities better. If there are shops worth attention to, contributors comment on them.

Second, big corporates stand behind the OpenStreetMap project now as well - Microsoft, Apple, Facebook, DigitalGlobe, Telenav, and other companies integrate OpenStreetMap data into their solutions and contribute back. The companies have internal volunteer projects, share data and results.

For example, Microsoft recently supplemented OpenStreetMap data by US building footprints based on satellite imaginaries, and Facebook helps improve data quality by applying Artificial Intelligence.

OpenStreetMap geocoding APIs — free vs. commercial

OpenStreetMap is an open-data source and free to use. But is the OpenStreetMap geocoding free as well? Well, the answer is "yes and no!"

There is a free OSM Nominatim service, which provides a free public Nominatim API to search addresses. However, it runs on donated servers, and it leads to restrictions in usage:

  • its absolute maximum of requests is one per second
  • auto-complete search is not yet supported
  • bulk queries are forbidden
  • you cannot scrape off details because this page is here only for debugging

If you do something from this list, you can be banned. And If you use the Free OSM geocoding on your website or app one day, it can just stop working.

When you develop an app that needs OSM geocoding, choose commercial APIs instead. Many third-party services offer geocoding based on OpenStreetMap. They provide more robust and faster servers. In addition, you can select conditions and price plans that suit your purposes.

For example, Geoapify uses based on open-data Geocoding API which is more potent and faster than the free OSM geocoding service.

Moreover, you can implement address autocomplete and choose rate limits according to your needs.

Why Geoapify Geocoding API?

Geoapify Geocoding API provides apps and companies with Geocoding API, Reverse Geocoding API, and Autocomplete API. Users choose our services for the following benefits:

  • Our technology is open-data-based. Data comes from OpenStreetMap, OpenAddresses, GeoNames, and others similar to them. That makes information trustworthy and detailed. Moreover, the data is open! That means that you can store found addresses without breaking the license.
  • We offer changeable price plans and a free tier even for commercial users.
  • We update regularly and review the data, so you get up-to-date and faultless information with our API.

Geoapify runs on any programming language or platform and works via HTTP requests to make the application convenient for both users and developers.

Geocoding URL and results

You can search addresses and locations worldwide and get results in different languages, set preferred locations, and location filters. Let's have a look at a few examples.

Search the "Via Conca d'Oro, 86A, 00141 Roma, Italia" address and get results in Italian

Set the lang parameter in the URL to specify the language:

https://api.geoapify.com/v1/geocode/search?text=Via%20Conca%20d'Oro%2C%2086A%2C%2000141%20Roma%2C%20Italia&lang=it&apiKey=YOUR_API_KEY

Here is a result object:

    • "FeatureCollection"
    • [] 1 item
      • {} 4 keys
        • "Feature"
        • {} 19 keys
          • {} 4 keys
            • "openstreetmap"
            • "© OpenStreetMap contributors"
            • "Open Database Licence"
            • "https://www.openstreetmap.org/copyright"
          • "86A"
          • "Via Conca d'Oro"
          • "Quartiere XVI Monte Sacro"
          • "Roma"
          • "Roma Capitale"
          • "Lazio"
          • "00141"
          • "Italia"
          • "it"
          • 12.5287797
          • 41.9380636
          • "Via Conca d'Oro, 86A, 00141 Roma Roma Capitale, Italia"
          • "Via Conca d'Oro, 86A"
          • "00141 Roma Roma Capitale, Italia"
          • "LAZ"
          • "building"
          • {} 6 keys
            • 0.811
            • 7.828350377783076
            • 1
            • 1
            • 1
            • "full_match"
          • "51cf937c36bc0e294059b5c8d17712f84440f00103f901459d804f01000000c00203"
        • {} 2 keys
          • "Point"
          • [] 2 items
            • 12.5287797
            • 41.9380636
        • [] 4 items
          • 12.5287297
          • 41.9380136
          • 12.5288297
          • 41.9381136
    • {} 2 keys
      • "Via Conca d'Oro, 86A, 00141 Roma, Italia"
      • {} 6 keys
        • "86a"
        • "via conca d'oro"
        • "00141"
        • "roma"
        • "italia"
        • "building"
Search the Calle de columela street closest to the location 40.4247575 -3.6910857 (Madrid, Spain)

Set proximity parameter to specify user or other location:

https://api.geoapify.com/v1/geocode/search?text=Calle%20de%20columela&bias=proximity:-3.6910857,40.4247575|countrycode:none&apiKey=YOUR_API_KEY

Here is a result object:

    • "FeatureCollection"
    • [] 1 item
      • {} 4 keys
        • "Feature"
        • {} 21 keys
          • {} 4 keys
            • "openstreetmap"
            • "© OpenStreetMap contributors"
            • "Open Database Licence"
            • "https://www.openstreetmap.org/copyright"
          • "Calle de Columela"
          • "Calle de Columela"
          • "Recoletos"
          • "Madrid"
          • "Comunidad de Madrid"
          • "Comunidad de Madrid"
          • "28001"
          • "Spagna"
          • "es"
          • -3.6871766
          • 40.4211459
          • "Calle de Columela, 28001 Madrid, Spagna"
          • "Calle de Columela"
          • "28001 Madrid, Spagna"
          • 520.3641987128042
          • "M"
          • "MD"
          • "street"
          • {} 4 keys
            • 0.4354202226614239
            • 8.978554650617907
            • 1
            • "full_match"
          • "519e9cfc71567f0dc05918acdd1be8354440f00102f901fb6b420000000000c0020492031143616c6c6520646520436f6c756d656c61"
        • {} 2 keys
          • "Point"
          • [] 2 items
            • -3.6871766
            • 40.4211459
        • [] 4 items
          • -3.6885487
          • 40.4210518
          • -3.6858532
          • 40.4211903
    • {} 2 keys
      • "Calle de columela"
      • {} 2 keys
        • "calle de columela"
        • "unknown"
Search the Ikea shop within a bounding box (Geneva, Switzerland)

Set type=amenity and filter parameters:

https://api.geoapify.com/v1/geocode/search?text=Ikea&lang=en&filter=rect:5.963897397911751,46.15857775610354,6.237859079122131,46.28452621419265&apiKey=YOUR_API_KEY
    • "FeatureCollection"
    • [] 1 item
      • {} 4 keys
        • "Feature"
        • {} 18 keys
          • {} 4 keys
            • "openstreetmap"
            • "© OpenStreetMap contributors"
            • "Open Database Licence"
            • "https://www.openstreetmap.org/copyright"
          • "IKEA"
          • "1"
          • "Route de Pré-Bois"
          • "Le Lignon"
          • "Vernier"
          • "Geneva"
          • "6643"
          • "Switzerland"
          • "ch"
          • 6.0943233
          • 46.2194013
          • "IKEA, Route de Pré-Bois 1, 6643 Vernier, Switzerland"
          • "IKEA"
          • "Route de Pré-Bois 1, 6643 Vernier, Switzerland"
          • "amenity"
          • {} 4 keys
            • 0.101
            • 6.556790763695718
            • 1
            • "full_match"
          • "51d1008349966018405996198057151c4740f00103f9018f4f0ce500000000c00201920304494b4541"
        • {} 2 keys
          • "Point"
          • [] 2 items
            • 6.0943233
            • 46.2194013
        • [] 4 items
          • 6.0942733
          • 46.2193513
          • 6.0943733
          • 46.2194513
    • {} 1 key
      • "Ikea"

What's next