Search for an address using a location
This tutorial demonstrates how to search for an address using a known location.
Procedure
To search for "Brandenburgische Straße 125, Schöneiche" from the geo-position (52.62621,13.51700)
, send the following request:
GET https://discover.search.hereapi.com/v1/
discover
?at=52.62621,13.51700
&q=Brandenburgische+Stra%C3%9Fe+125%2C+Sch%C3%B6neiche
&apiKey={YOUR_API_KEY}
The following parameters are used:
- at - Specify the center of the search context expressed as coordinates.
- q - Enter a free-text query.
- apiKey - Your API key.
Note
This request uses API key authentication. For more information about authentication options on the HERE platform, see the Identity & Access Management Guide.
The result lists detailed information about the related location object:
{
"items": [
{
"title": "Brandenburgische Straße 125, 15566 Schöneiche bei Berlin, Deutschland",
"id": "here:af:streetsection:IXpGmsnsmtABEAIboP-wiC:CgcIBCCBuI1XEAEaAzEyNShk",
"resultType": "houseNumber",
"houseNumberType": "PA",
"address": {
"label": "Brandenburgische Straße 125, 15566 Schöneiche bei Berlin, Deutschland",
"countryCode": "DEU",
"countryName": "Deutschland",
"stateCode": "BB",
"state": "Brandenburg",
"countyCode": "LOS",
"county": "Oder-Spree",
"city": "Schöneiche bei Berlin",
"district": "Schöneiche bei Berlin",
"street": "Brandenburgische Straße",
"postalCode": "15566",
"houseNumber": "125"
},
"position": { "lat": 52.47427, "lng": 13.69919 },
"access": [{ "lat": 52.47429, "lng": 13.69893 }],
"distance": 20909,
"mapView": { "west": 13.69767, "south": 52.4563, "east": 13.70003, "north": 52.47889 }
}
]
}
Additional information
For more information about /discover
parameters, see: API Reference.