Search for a place using a chain
This tutorial demonstrates how to search for places by their chain.
Procedure
To search for Shell places from the position (52.33012,14.41896) in Germany near the polish border but only get results in Germany, send the following request:
GET https://discover.search.hereapi.com/v1/
discover
?at=52.33012,14.41896
&q=Shell
&limit=2
&in=countryCode%3ADEU
&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.
- limit - Maximum number of results to be returned.
- in - Search within a geographic area. Results will be returned if they are located within the specified area.
- apiKey - Your API key.
The result lists detailed information about the related location objects:
{
"items": [
{
"title": "Shell",
"id": "here:pds:place:276u361x-8134bdc570ac4bca89ea8de8f2e6ef2d",
"ontologyId": "here:cm:ontology:shell",
"resultType": "place",
"address": {
"label": "Shell, 15236 Jacobsdorf, Deutschland",
"countryCode": "DEU",
"countryName": "Deutschland",
"stateCode": "BB",
"state": "Brandenburg",
"countyCode": "LOS",
"county": "Oder-Spree",
"city": "Jacobsdorf",
"postalCode": "15236"
},
"position": { "lat": 52.32121, "lng": 14.38886 },
"access": [{ "lat": 52.32121, "lng": 14.38886 }],
"distance": 2273,
"categories": [
{ "id": "700-7600-0116", "name": "Tankstelle", "primary": true },
{ "id": "700-7900-0131", "name": "Lkw-Parkplatz" }
],
"chains": [{ "id": "10" }],
"contacts": [{ "phone": [{ "value": "+493360849300" }], "fax": [{ "value": "+493360849301" }] }],
"openingHours": [
{
"text": ["Mon-Sun: 00:00 - 24:00"],
"isOpen": true,
"structured": [
{ "start": "T000000", "duration": "PT24H00M", "recurrence": "FREQ:DAILY;BYDAY:MO,TU,WE,TH,FR,SA,SU" }
]
}
]
},
{
"title": "Shell",
"id": "here:pds:place:276u361x-9b1a09934b3b43b397e01bae933e2ecf",
"ontologyId": "here:cm:ontology:shell",
"resultType": "place",
"address": {
"label": "Shell, 15236 Jacobsdorf, Deutschland",
"countryCode": "DEU",
"countryName": "Deutschland",
"stateCode": "BB",
"state": "Brandenburg",
"countyCode": "LOS",
"county": "Oder-Spree",
"city": "Jacobsdorf",
"postalCode": "15236"
},
"position": { "lat": 52.32037, "lng": 14.38395 },
"access": [{ "lat": 52.32037, "lng": 14.38395 }],
"distance": 2615,
"categories": [
{ "id": "700-7600-0116", "name": "Tankstelle", "primary": true },
{ "id": "600-6000-0061", "name": "kleiner Lebensmittelladen" },
{ "id": "700-7900-0131", "name": "Lkw-Parkplatz" }
],
"chains": [{ "id": "10" }],
"references": [
{ "supplier": { "id": "core" }, "id": "56108280" },
{ "supplier": { "id": "core" }, "id": "56108284" }
],
"contacts": [
{
"phone": [{ "value": "+493360849621" }, { "value": "+493360881680" }, { "value": "+49493360881680" }],
"fax": [{ "value": "033608 81682" }, { "value": "3360881682" }],
"www": [
{ "value": "http://www.shell.de/" },
{ "value": "https://find.shell.com/de/fuel/10025882-pillgram-a12-bieg-helle-nord" },
{ "value": "https://find.shell.com/de/fuel/10025893-pillgram-a12-bieg-helle-sud" }
],
"email": [{ "value": "shellcustomercare@shell.com" }]
}
],
"openingHours": [
{
"text": ["Mon-Sun: 00:00 - 24:00"],
"isOpen": true,
"structured": [
{ "start": "T000000", "duration": "PT24H00M", "recurrence": "FREQ:DAILY;BYDAY:MO,TU,WE,TH,FR,SA,SU" }
]
}
]
}
]
}
For more information about /discover
parameters, see: API Reference.