Address Autocomplete API

The Address Autocomplete API provides address suggestions for the entered text. The API allows creating address inputs and address validation HTML forms. It returns verified and standardized addresses for free-form addresses entered by users.

The Address Autocomplete API can find country, city, state, and more based on only the first few letters of an address. You can also set preferred locations and filters for your search to provide even more accuracy.

Try Address Autocomplete

Type an address to the input field to try the Address Autocomplete API:

We use the @geoapify/geocoder-autocomplete library for this demo. Try more API options with the Address Autocomplete Playground >>

Features and capabilities

The complete address and coordinates by an address part

The API returns the full addresses, including separate address components like house number, street, postcode (or zipcode), city, state, country, and Latitude/longitude coordinates.

The API URL for the "Berlin central" request:

https://api.geoapify.com/v1/geocode/autocomplete?text=Berlin%20central&apiKey=YOUR_API_KEY

Here is a result object example for the "Berlin central" request:

    • "FeatureCollection"
    • [] 1 item
      • {} 4 keys
        • "Feature"
        • {} 20 keys
          • {} 4 keys
            • "openstreetmap"
            • "© OpenStreetMap contributors"
            • "Open Database Licence"
            • "https://www.openstreetmap.org/copyright"
          • "Berlin Central Station"
          • "Lehrter Bahnhof"
          • "Eingangsebene"
          • "Moabit"
          • "Mitte"
          • "Berlin"
          • "Berlin"
          • "10557"
          • "Germany"
          • "de"
          • 13.3696614
          • 52.5249451
          • "Berlin Central Station, Eingangsebene, 10557 Berlin, Germany"
          • "Berlin Central Station"
          • "Eingangsebene, 10557 Berlin, Germany"
          • "BE"
          • "amenity"
          • {} 3 keys
            • 0.4888462520106494
            • 1
            • "full_match"
          • "51e92f4f4244bd2a40590459aa6631434a40f00103f901076bd7e500000000c002019203164265726c696e2043656e7472616c2053746174696f6e"
        • {} 2 keys
          • "Point"
          • [] 2 items
            • 13.3696614
            • 52.5249451
        • [] 4 items
          • 13.3646614
          • 52.5199451
          • 13.3746614
          • 52.5299451

Easy to use and integrate

The Address Autocomplete API works via HTTP GET requests, so it's cross-platform, and you can integrate it into any website or app. Moreover, the API returns a GeoJSON object, which any map library can easily visualize: MapLibre GL, Leaflet, OpenLayers, and others.

Each address suggestion contains a formatted address for the complete address and address parts that can be used to set a visual focus for the primary and secondary address parts:

Highlight the primary and secondary parts for addresses

Highlight the primary and secondary parts for addresses

Multilanguage support

The Address Autocomplete API supports multiple languages. So you can show address suggestions in their language to your customers.

Here is a URL example of Address Autocomplete API with language parameter:

https://api.geoapify.com/v1/geocode/autocomplete?text=Berlin%20central&limit=5&lang=de&apiKey=YOUR_API_KEY

You can get the user language settings, for example, from the browser language preferences:

const language = window.navigator.userLanguage || window.navigator.language;

Set bias and filters to search nearby

The Autocomplete API allows setting preferred locations - bias and filters - by view box, by radius, within a country. This could be useful when you implement "Search nearby", "Search within the visible area", or when you need to limit the search to the specific area. You can try the filters and biases in the Address Autocomplete Playground.

Place details with Place Details API

The Autocomplete API returns a Place ID that can be used to get detailed information about the place and the building geometry or boundaries with Place Details API. For example, here are the boundaries of the City of London: Get Place Details for the "City Of London" address suggestion

Get Place Details for the "City Of London" address suggestion

Affordable and permissive

The Geoapify Location Platform is based on open data sources to offer you permissive conditions and affordable prices.

Our Free Tier includes up to 3000 address autocomplete requests per day (~ 90000 requests/month). In addition, you can cache and store address results and suggestions.

Getting started

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
2. Add an address input field with Autocomplete function

The API returns a few address suggestions for user input. You need to call the API when the user types into the input. Then you need to show results in the dropdown or other list. We've prepared a step-by-step tutorial on adding an Address Autocomplete field and NPM-packages for you that help you integrate the API into your website or app:

Address Autocomplete NPM-packages

Easy to add and easy to customize. Check our code samples for quickstart >>

VanillaJS

@geoapify/geocoder-autocomplete

Vanilla JS npm-package is used to transform a given element (for example, div) into an Address Autocomplete field. The library offers several CSS styling options, including bright and dark ones.

Angular

@geoapify/angular-geocoder-autocomplete

Angular wrapper for @geoapify/geocoder-autocomplete. Provides an angular component, inputs and outputs for Address Autocomplete parameters.

ReactJS

@geoapify/react-geocoder-autocomplete

React wrapper for @geoapify/geocoder-autocomplete. The library provides a react component with fields corresponding to Address Autocomplete API parameters and events.

FAQ

How is the Address Autocomplete API different than Geocoding API?

The Autocomplete API returns address suggestions for the provided address string, while the Geocoding API searches the corresponding location for the given address. The Address Autocomplete works with partial addresses and tries to guess the address, while the Geocoding API assumes that the full address was provided.

What is the price for Address Autocomplete API?

The API price depends on the usage. We have a Free Tier (up to 3000 requests/day), so you can start for Free and extend according to your needs. One Address Autocomplete API is counted as one credit. Check Geoapify Pricing for more details.

Can I use the Address Autocomplete for Free?

Yes, you can use the Geoapify Autocomplete for Free, even for commercial projects, when you don't go over the Free plan limits.

What happens if my website receives a splash of visits and I accidentally go over limits?

We have "soft" limits, so we do not ban our customers even if they go over the usage limits. However, we do apply rate limits when you exceed the numbers significantly to protect other customers. Please consider upgrading your plan if you exceed the limits constantly.

How often do you release new versions of the npm-packages?

We release a new version for bug fixes and further functionality support. Nevertheless, the libraries are open-source, so you are welcome to create a pull request on GitHub.

Ready to get started?

Get an API key and try Geoapify Address Autocomplete!