Lookup
Every place or location object known by HERE has a location identifier or “ID”. Lookup endpoint of HERE Geocoding & Search API is used to look up a place by its HERE ID.
Example
import os
from here_location_services import LS
LS_API_KEY = os.environ.get("LS_API_KEY") # Get API KEY from environment.
ls = LS(api_key=LS_API_KEY)
lookup = ls.lookup(location_id="here:pds:place:276u0vhj-b0bace6448ae4b0fbc1d5e323998a7d2")
lookup.response
{'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'},
{'supplier': {'id': 'venues'}, 'id': '1560904'}],
'contacts': [{'phone': [{'value': '+496543509200'}],
'www': [{'value': 'http://www.hahn-airport.de'}],
'email': [{'value': 'info@hahn-airport.de'}]}]}
Attributes
Attribute |
Type |
Doc |
---|---|---|
location_id |
string |
A HERE location |
lang |
string |
Language to be used for result rendering from a list of BCP47 compliant Language Codes. Default value is |