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
, like other HERE Geocoding and Search 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 resultposition
- a representative geo-position (WGS 84) of the result. this is to be used to display the result on a mapaccess
- 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.categories
- a list of category ids forplace
results.The primary category has its flag
primary
set totrue
.foodTypes
- a list of food-type ids forplace
results preparing/serving foodThe primary food type has its flag
primary
set totrue
.chains
- a list of chain ids forplace
results belonging to a chaincontacts
- a list of contact details (phone, web, ...) forplace
resultsopeningHours
- a list of opening hours forplace
results
{
"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": "info@hahn-airport.de" }]
}
]
}