Geocoding

Geocoding API works via GET request and allows to obtain place suggestions for query parameters specified.

The typical request URL of Geocoding API looks like:


https://api.geoapify.com/v1/geocode/search?text=Paris&lang=fr&limit=3&type=city&filter=countrycode:us,ca&bias=proximity:-95.53684506822526,42.59813183454665|countrycode:none&apiKey=YOUR_API_KEY


Required parameters:

  • text - search string
  • apiKey - your Geoapify key

Optional parameters:

  • filter - filter places by country, boundary, circle
  • bias - prefer places by country, boundary, circle, location
  • lang - language for results
  • limit - the maximum amount of returned results
  • type - type of the results

The response returned contains a GeoJSON FeatureCollection object, where all features have a "Point" type and represent a place suggestion. Properties of each feature contain address components, location components, and data source information.

Reverse geocoding

Reverse Geocoding API works via GET request and allows to retrieve a place address from coordinates.

The typical request URL of Reverse Geocoding API looks like:


https://api.geoapify.com/v1/geocode/reverse?lat=49.332184526818025&lon=11.27818147303799&lang=de&limit=10&apiKey=YOUR_API_KEY


Required parameters:

  • lat and lon - coordinates of the place

Optional parameters:

  • lang - language for results
  • limit - the maximum amount of returned results

The response returned contains a GeoJSON FeatureCollection object.

Autocomplete

Geoapify Geocoding API allows creating an Autocomplete input field on the top of it. With input parameters, it's possible to set up accurate and fast searches. Geocoding playground contains an example of the Autocomplete field.

The typical HTTP request for the Autocomplete API looks like:


https://api.geoapify.com/v1/geocode/autocomplete?text=Berlin&limit=5&apiKey=YOUR_API_KEY


It has similar to Geocoding API input and output parameters.