Geocoder Autocomplete API Developer's Guide

Retrieve Location Details for a Suggestion

After the user types a few characters, request a list of suggestions from the Geocoder Autocomplete API. Show the suggestions to the user. After the user selects a suggestion, retrieve the detailed location information corresponding to the suggestion using the Geocoder API.


Request a list of address suggestions for the search text Pariser 1 Berl:


The response from the Geocoder Autocomplete API contains a number of suggestions. Each of them represents a location defined through a set of attributes, but these do not provide detailed location information such as geographic coordinates.

   "suggestions": [
    "label": "Deutschland, Berlin, Berlin, 10117, Berlin, Pariser Platz 1",
    "language": "de",
    "countryCode": "DEU",
    "locationId": "NT_5mGkj3z90Fbj4abzMbUE4C_xA",
    "address": { ... },
    "matchLevel": "houseNumber"},
    ... ]

Geocoder Request to retrieve the Location Details

After the user has selected a suggestion, you can retrieve the location details such as the geographic coordinates via the HERE Geocoder API, using look-up by locationId.

Here is the request to the Geocoder API. For more information about the HERE Geocoder API, see the Geocoder API Developer's Guide.

Geocoder Response

    "view": [{
     "result": [{
      "matchLevel": "houseNumber",
      "matchType": "pointAddress",
      "location": {
         "locationId": "NT_5mGkj3z90Fbj4abzMbUE4C_xA",
         "locationType": "point",
         "displayPosition": {
          "latitude": 52.51588,
          "longitude": 13.37804 },
         "navigationPosition": [{
          "latitude": 52.51591,
          "longitude": 13.37833 }],
      "mapView": {
         "topLeft": {
          "latitude": 52.5248732,
          "longitude": 13.3632617 },
         "bottomRight": {
          "latitude": 52.5068868,
          "longitude": 13.3928183 }},
      "address": {
         "label": "Pariser Platz 1, 10117 Berlin, Deutschland",
         "country": "DEU",
         "state": "Berlin",
         "county": "Berlin",
         "city": "Berlin",
         "district": "Mitte",
         "street": "Pariser Platz",
         "houseNumber": "1",
         "postalCode": "10117",
         "additionalData": [{
          "value": "Deutschland",
          "key": "CountryName" },
          "value": "Berlin",
          "key": "StateName" },
          "value": "Berlin",
          "key": "CountyName" }]}}}],
     "viewId": 0 }]