GuidesAPI Reference
Guides

Lookup

Every place or location object known by HERE has a location identifier or "ID".

To look up a place by its HERE ID, the API includes the /lookup endpoint.

All HERE Geocoding and Search results can be individually retrieved through their ID using the /lookup endpoint. There are two exceptions though: Results of types chainQuery and categoryQuery returned by the autosuggest endpoint.

For example, the HERE ID for "Flughafen Frankfurt-Hahn" is:

here:pds:place:276u0vhj-b0bace6448ae4b0fbc1d5e323998a7d2.

To retrieve details for such a place, send the request:

GET https://lookup.search.hereapi.com/v1/
    lookup
    ?id=here:pds:place:276u0vhj-b0bace6448ae4b0fbc1d5e323998a7d2
    &apiKey={YOUR_API_KEY}

If the response elements need to be returned in a different language than the default one, the lang parameter must be set to the expected BCP 47 language code.

The response to the above request includes multiple items from the top choice to least-likely match.

It delivers the following high-level elements for each result:

  • resultType - the /discover endpoint, like other HERE Geocoding and Search endpoints, is able to return results of several types: place, address, etc.

  • title – a representative string for the result, for instance the name of a place.

  • address - the detailed address of the result

  • position - a representative geo-position (WGS 84) of the result. this is to be used to display the result on a map

  • access - the geo-position of the access to the result (for instance the entrance)

  • id - the identifier of the result object. Its value can be used to retrieve the very same object through the /lookup endpoint. If the address object ID has changed, especially for ID formats like 'here:af:streetsection:xxx', users can still utilize the previously returned ID with the /lookup endpoint to retrieve the same object. However, it's important to note that the response will include the updated ID for that object.

  • categories - a list of category ids for place results.

    The primary category has its flag primary set to true.

  • foodTypes - a list of food-type ids for place results preparing/serving food

    The primary food type has its flag primary set to true.

  • chains - a list of chain ids for place results belonging to a chain

  • contacts - a list of contact details (phone, web, ...) for place results

  • openingHours - a list of opening hours for place results

  • closedPermanently - Indicate the closed status of a place,

    • yes: If the POI is permanently closed or shut down in reality, it will not appear in search results by name/category. However, it can still be retrieved via the /lookup endpoint at least 90 days.
    • maybe: If there is reduced confidence in the data regarding a POI, it will not be searchable by name/category. Nevertheless, it can still be obtained through the /lookup endpoint at least 90 days.
    • Note: The lookup period (90 days) may change in the future.

    • Note: This feature is first released as ALPHA. See maturity. We plan to promote the feature to next maturity levels when it has received enough feedback.

{
  "title": "Flughafen Frankfurt-Hahn",
  "id": "here:pds:place:276u0vhj-b0bace6448ae4b0fbc1d5e323998a7d2",
  "resultType": "place",
  "address": {
    "label": "Flughafen Frankfurt-Hahn, 55483 Lautzenhausen, Deutschland",
    "countryCode": "DEU",
    "countryName": "Deutschland",
    "stateCode": "RP",
    "state": "Rheinland-Pfalz",
    "countyCode": "SIM",
    "county": "Rhein-Hunsrück-Kreis",
    "city": "Lautzenhausen",
    "postalCode": "55483"
  },
  "position": { "lat": 49.94802, "lng": 7.27153 },
  "access": [{ "lat": 49.94571, "lng": 7.26985 }],
  "categories": [{ "id": "400-4000-4581", "name": "Flughafen", "primary": true }],
  "references": [{ "supplier": { "id": "core" }, "id": "50481441" }],
  "contacts": [
    {
      "phone": [{ "value": "+496543509200" }],
      "www": [{ "value": "http://www.hahn-airport.de" }],
      "email": [{ "value": "[email protected]" }]
    }
  ]
}