Address Autocomplete API
The Address Autocomplete API provides address suggestions for the entered text. So, if you write "Munic", it will return "Munich, Bavaria, Germany" and the other four cities as addresses to autofill.
The API is intended to be used in address autocomplete inputs, for example, for address validation HTML forms. It returns verified and standardized addresses for free-form addresses entered by users.
You can use the Address Autocomplete API to autofill addresses, cities, postcodes, and other address levels. You can also set biases and filters for your search to provide even more accuracy.
Try Address Autocomplete
Type an address to try the location autocomplete:
Features and capabilities
Well-formatted address and coordinates by an address part
The API returns the well-formatted addresses, including separate address components like house number, street, postcode (or zipcode), city, state, country, and latitude/longitude coordinates.
The Autocomplete API URL for the "Gabelsbergerstr 14, Regensburg" address string:
The API returns all the locations corresponding to the address, the original query including parsed address, formatted addresses, and components:
In addition, the result object contains place ids. You can pass the ids to Place Details API to get building geometries, contact details, website, and other information.
Autofill postcodes (or zip codes) and other address levels
The Autocomplete API accepts location type as a parameter so that you can create postcode, city, country, and other autocomplete inputs. Here is an example of API URL of searching postcodes starting with "863" in Germany:
The default number of returning results is 5. But you can increase the limit to get more results.
The API request found 7 postcodes starting with "863":
The type parameter accepts values like "country", "state", "city", "postcode", "street", "amenity" . Visit the docs page to learn more.
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 JSON 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:
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:
You can get the user language settings, for example, from the browser language preferences:
const language = window.navigator.userLanguage || window.navigator.language;
Biases 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:
Affordable and permissive
The Geoapify Address Autocomplete API is based on open-data sources. So we can 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.
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. First, you 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 Field Step-by-Step Tutorial >>
Vanilla JS npm-package transforms a given element (for example, div) into an Address Autocomplete field. In addition, the library offers several CSS styling options, including bright and dark ones.
Angular wrapper for @geoapify/geocoder-autocomplete. Provides an angular component, inputs and outputs for Address Autocomplete parameters.
You can use these packages with or without a map library (Maplibre GL, Leaflet, OpenLayers). Furthermore, you can customize the look-and-feel of the components with provided styles or with custom CSS. Check our code samples for quickstart >>
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.
How to use Address Autocomplete API?
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.