Geocoding API / Address to lat long api

Geocoding API

Geocoding API or Forward geocoding lets to convert addresses to lat/long programmatically. So the API gives you well-formed addresses and their geographical coordinates. You can display them on a map, plan a delivery or estimate the distance between different locations.

For example, when you search "14 Grange Rd., London", you will get "4 Grange Road, London N6 4DG, United Kingdom", lon: -0.1537649, lat: 51.576525, and more useful information.

Try Geocoding API

Enter an address to query and press the "Geocode" button to convert the address to lat long with API. Then, switch to the "Result JSON" 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 Geocoding and other geocode APIs

It can be challenging to differentiate between geocode APIs - forward geocoding, reverse geocoding, or address autocomplete.

  • Forward geocoding is used to convert an address string to its geographical coordinates;
  • Reverse geocoding finds the corresponding address for a given latitude/longitude coordinates;
  • Address Autocomplete returns address suggestions for an address part to show them in an address autocomplete form.

On this page, we cover Forward Geocoding or Geocoding API. Please visit the Reverse Geocoding API page to learn more about reverse geocoding and the Address Autocomplete API page to learn more about address fields.

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:

A structured address URL:

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 Address to lat/long 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:,46.197757&apiKey=YOUR_API_KEY
Search a city in the country:
Search within a bounding box:,48.624200,2.847246,49.1148054&apiKey=YOUR_API_KEY

Why the Geoapify Geocoding API?

Afforrdable for every business requests api to get gps coordinates from address

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 Geocode API

Extensive and smart

We use multiple data sources for address search which are extended and updated by thousands of addresses daily.

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

Based on Open-data


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


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.

Results can also be returned in JSON or XML formats, with the "format=" parameter.


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:

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:

    • [] 1 item
      • {} 17 keys
        • {} 4 keys
          • "openstreetmap"
          • "© OpenStreetMap contributors"
          • "Open Database License"
          • ""
        • "87c"
        • "Frohmestraße"
        • "Schnelsen"
        • "Hamburg"
        • "22459"
        • "Germany"
        • "de"
        • 9.92705845
        • 53.63113345
        • "Frohmestraße 87c, 22459 Hamburg, Germany"
        • "Frohmestraße 87c"
        • "22459 Hamburg, Germany"
        • "building"
        • "building"
        • {} 6 keys
          • 0.42100000000000004
          • 6.554749906709501
          • 1
          • 1
          • 1
          • "full_match"
        • "51fe75b867a7da234059b1941bfbc8d04a40f00102f901c4afc51300000000c00203"
    • {} 2 keys
      • "Frohmestraße 87c, 22459 Hamburg, Germany"
      • {} 6 keys
        • "87c"
        • "frohmestraße"
        • "22459"
        • "hamburg"
        • "germany"
        • "building"

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';

.then(resp => resp.json())
.then((geocodingResult) => {


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="">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.

Do you provide endpoints to stock search engine APIs, like, for example, Nominatim API?

Yes, we do. Our Geocoding API uses several search engines - Nominatime, Pelias, Photon - combined with our developments. Contact us when you need access to pure engine API.

World map

Ready to get started?

Get an API key and try Geoapify Geocoding API!