Geocoding API

Geocoding API allows searching locations by addresses programmatically. So you can display them on a map, plan a delivery or estimate the distance between different locations.

Use Reverse Geocoding API to get address by Latitude and Longitude coordinates. For example, to get a building address when a user clicks on a map. Or Address Autocomplete API for address fields to show address suggestions.

Try Geocoding API

Enter an address to query and press the "Geocode" button or click on the map to call Reverse Geocoding API. Then, switch to the "GeoJSON" tab to check the result object or to the "URL" tab to get the request URL:

More Geocoding API options are available with the Geocoding API Playground >>

Features and capabilities

Forward and Reverse geocoding

Get locations for addresses with Geocoding API and addresses for Latitude/Longitude coordinates with Reverse Geocoding API. In addition, we offer the Address Autocomplete API, which returns address suggestions for a text provided. The API can be used, for example, for an address field: when a user enters a part of an address, you can show suggested addresses in a dropdown.

Free-form and structured addresses

The Geocoding API accepts a free-form address as well as a structured address as an input parameter. So you can geocode a string address as well as address components. For example, here are URLs for a free-form string and structured address:

A free-form address URL:

https://api.geoapify.com/v1/geocode/search?text=11%20Rue%20Grenette%2C%2069002%20Lyon%2C%20France&apiKey=YOUR_API_KEY

A structured address URL:

https://api.geoapify.com/v1/geocode/search?housenumber=11&street=Rue%20Grenette&postcode=69002&city=Lyon&country=France&apiKey=YOUR_API_KEY

International addresses and multilanguage support

The Geocoding API works with international addresses and returns results in a specified language. We utilize multiple datasets, including OpenStreetMap, OpenAddresses, Who's on First, Geonames, Wikipedia, and more. The custom datasets can be imported on request.

Address search with confidence

The Geocoding API tries to find the most relevant and meticulous results for each request. The Geoapify Geocoding API can find corresponding addresses for ambiguous formatted address strings, addresses with mistakes, and addresses with insufficient information.

We parse and clean up the request address string, make several rounds of searches with different address components, and choose the ones that fit the best.

The API returns a confidence confidence level, found location type as well as match type to help you make a decision on the quality of results. Moreover, the confidence level contains three confidence values that help to validate and verify the address:

  • confidence - the whole address confidence rate
  • confidence_city_level - confidence rate for the city, it tells if the city is correct
  • confidence_street_level - confidence rate for the street it tells if the street is correct

Learn more about a result object >>

Filters and bias for an accurate and narrow search

The Geoapify Geocoding API accepts bias and filter input parameters that help to set preferred areas for address search or filter places:

  • Set type to search locations of a specific type: country, state, city, postcode, street, amenity
  • Set filters to limit the search to countries, view box or by radius
  • Set biases to add priority to locations

Search a street near a location:

https://api.geoapify.com/v1/geocode/search?text=Avenue%20Francois-Besson&bias=proximity:6.137464,46.197757&apiKey=YOUR_API_KEY

Search a city in the country:

https://api.geoapify.com/v1/geocode/search?text=Paris&filter=countrycode:us&apiKey=YOUR_API_KEY

Search within a bounding box:

https://api.geoapify.com/v1/geocode/search?text=Disneyland&limit=10&filter=rect:1.860012,48.624200,2.847246,49.1148054&apiKey=YOUR_API_KEY

Why the Geoapify Geocoding API?

Afforrdable for every business geocode requests

Affordable and safe

Up to 3000 requests/day (or 90,000 requests/month) as a Free Tier even for commercial projects.

We offer affordable pricing plans and soft limits. So you can choose a pricing plan corresponding to your usage and be sure that the API will continue to provide results even if your use accidentally goes over the plan limits.

International and multilanguage

Extensive and smart

We use multiple data sources as an address base which are extended and updated by thousands of addresses daily.

Geoapify Geocoder parses and analyzes addresses to find the most relevant results, even for malformed or misspelled addresses.

Based on Open-data

Permissive

Geoapify Geocoding is based on open data. Therefore, you can safely store and reuse found addresses and locations.

However, consider keeping the required attribution to a data source together with result objects.

Can be used with any programming language

Cross-platform

Our Geocoding API is accessible via an easy-to-use HTTP REST endpoint. So you can use it on any platform and with any programming language.

Geocoding API returns a GeoJSON FeatureCollection object that is both human and machine-readable and well supported by the client-side libraries (Mapbox GL, Leaflet, OpenLayers), SDKs, GIS systems, and other software.

Quickstart

Step 1. Register and get an API Key

You will require an API Key to use the API:

  • register on MyProject Geoapify page
  • create a new project
  • switch to the "API keys" page and get an API key
Step 2. Generate and call HTTP GET API request

The API works via HTTP GET requests. The typical geocoding request looks like:

https://api.geoapify.com/v1/geocode/search?text=Frohmestra%C3%9Fe%2087c%2C%2022459%20Hamburg%2C%20Germany&apiKey=YOUR_API_KEY

Note that you need to use URI component encoding to generate the correct URL. For example, encodeURIComponent() JavaScript function or similar.

Learn more about the API parameters on our documentation page or generate a URL with Geocoding API Playground.

Step 3. Get the API result object

The API returns result in GeoJSON format, which is a standard for representing geographical structures. The format is widely supported by GIS, online geographical tools, and map libraries. Here is an example of the API result object:

    • "FeatureCollection"
    • [] 1 item
      • {} 4 keys
        • "Feature"
        • {} 18 keys
          • {} 4 keys
            • "openstreetmap"
            • "© OpenStreetMap contributors"
            • "Open Database License"
            • "https://www.openstreetmap.org/copyright"
          • "Disneyland"
          • "Place de la Gare - Esplanade François Truffaut"
          • "Disney Village"
          • "Chessy"
          • "Seine-et-Marne"
          • "Ile-de-France"
          • "France"
          • "77700"
          • "fr"
          • 2.7813607
          • 48.8710365
          • "Disneyland, Place de la Gare - Esplanade François Truffaut, 77700 Chessy, France"
          • "Disneyland"
          • "Place de la Gare - Esplanade François Truffaut, 77700 Chessy, France"
          • "amenity"
          • {} 4 keys
            • 0.11100000000000002
            • 8.608300265330222
            • 1
            • "full_match"
          • "518f09e7093a40064059a88fc01f7e6f4840f00103f901745cd47001000000c0020192030a4469736e65796c616e64"
        • {} 2 keys
          • "Point"
          • [] 2 items
            • 2.7813607
            • 48.8710365
        • [] 4 items
          • 2.7813107
          • 48.8709865
          • 2.7814107
          • 48.8710865
    • {} 1 key
      • "Disneyland"

Integrate the Geocoding API into your website or app

You can call the API with any programming language that allows sending HTTP requests. Here are some examples of how to implement an API call:

Geocoding JavaScript

JavaScript fetch() function provides a convenient and straightforward mechanism for external APIs and resources. The fetch interface allows parsing a JSON object from the response:

const address = 'Baldersgade 3B, 2200 Copenhagen, Denmark';

fetch(`https://api.geoapify.com/v1/geocode/search?text=${encodeURIComponent(address)}&apiKey=YOUR_API_KEY`)
.then(resp => resp.json())
.then((geocodingResult) => {
	console.log(geocodingResult);
});

FAQ

What is the rate limit for Geocoding requests?

The rate limit indicates the maximum amount of requests per second. Depending on the pricing plan, we offer up to 30 requests/sec for Geocoding API requests.

Geocoding works well with ISO-formatted addresses but doesn't always search correctly for locations in my country. Can you improve that?

Definitely! We always try to parse an address before the search and address formats of many countries are parsed correctly. However, some address formats, especially those that contain additional information, may make some difficulties. Please send us address samples that are not found, so we can improve the geocoding service.

Will the geocoding work if an address contains partially incorrect information. For example, incorrect postcode?

We try to search the address using different address components and close to the given postcode or city. Therefore, the geocoder should give correct results if the address is located nearby. Please contact us if you do not get the expected results.

We have high volumes. What can you offer us?

We have pricing plans corresponding to different loads and volumes. Moreover, we can offer unmetered Geocoding API access starting from 700€.

Can I use Free pricing plan for a commercial solution?

Yes, you can. But you have to provide a follow-link to Geoapify on your website. For example, “ Powered by <a href="https://www.geoapify.com/">Geoapify</a>" near information about Geocoding service.

Is the geocoding service GDPR-compliant? Where are your servers located?

We are a German company and provide GDPR-compliant services only. Our default API endpoints always use European data centers only. Dedicated endpoints can utilize other server locations, even located in your intranet.

How are batch geocoding requests different from single requests?

The batch geocoding requests are asynchronous. That means you send a request to create a geocoding job and get the job ID. Then check the job status with separate requests, for example, every second. When job status is 200, the results are returned. Check our code samples of batch geocoding requests.

Why are batch geocoding requests cheaper?

Batch geocoding requests utilize free server capacity so allow us to optimize the server load. That enables us to offer a lower price.

Do your terms & conditions allow storing results?

Our services are based on Open Data. So we do not restrict you from storing results. However, you have to keep all the attributions to the data source with the stored object or make it visible in some other way when you reuse the data.

Ready to get started?

Get an API key and try Geoapify Geocoding API!