Search for places by category within a corridor
This tutorial demonstrates how to search for places by category within a corridor.
Procedure
To search for "zoo" from a position along a route from New-York City to Lost Angeles, send the following request:
https://discover.search.hereapi.com/v1/
discover?apiKey={YOUR_API_KEY}
&at=41.70035,-93.20866
&limit=10
&route=BF-hw4Hzw2jOwyH51kB2uU77gBwjC3vSomI_6J1hEh0iB69Gl7TsP7t7B8wNhuK_gC_zRsgFrqMqwI3lEuzDjuP64BrtsBvrFzmTyQv_pB34K_5qBssB_wamxF_wMjqKzylC-3RzmqBjiH5goBm3Ex5P7pDpvUskE5-Q5lKxgiBxpJnpLj-E55Qy2Pz_jBhlM_7lB-9LzmzBwlUzynBzcv0V4jHlvc1hE9-boqG15
Ik9DrmnBvtDlsNw-Ev8jC9yFjoOi7G3irBx5D1vzD_wOvz9B-sZttfuqCt1zD0hUrw5BwjHr5vBhiDl1atkInyVp2Bn2d2rFlokCo2KvuzB-zjBh1iD1SzgpEo-Hxy7C-7U3qgBuoE5tvBz_HjyhGu5Hv1wB98F7lbn_J_pO5mUl_8BkqEjswBlhFh_PshDn2rC5jGl3OiDzjajsHp0Rpczpbx9J59gBh1Pzjar5C79uEo_G
_zb53C5igDm-FjpZxoCpxL6-G30jBgC5kiBiqEp7G5lDzilB2sLt-RkgT9oB--F7ufk9L3t1Ev3C7olI67Dzq0BlyJ_ppCiCj-jBluLv4Cp-Nv83B5VltXhzEh6GsbjipIjyKx5E_opB74rBr7B5vyB__Q11P95KtoV_xOhhH_6SlqiB54Cl3iBtyPlsSyuBr8gKz9Szm0BziLn6jC0vHpt-D0z2Bju9DkmX_hzC20GxkkCn
lHn-rCmhChyzBjrPnwuCrlTxlgB5rCn-bznhBnwnDl1Tl8gBvwwBvqoBn0Z92rBnvI1o0DvhZpl0Cn41BhujCj1J5mmBxoQvvN-4N_4xCr-NtjTmrB70ahiM72jB7-axlXwnBjlH6nQ91Iu4K19M5G3rPtmH13L-tJrojBo6KxwN5oLt5aj4Bx-uBhlRnugB6xCvh4B_5Jp79B7iJr7hB58Tv2ch5Vp5R35J2Nh_RpiOn1B_
7_B6hYx3xB77HxpT5b5wUp3xBly8B4zFr75BriI1lsB26N1muB_pNtvlBg7CviVp3E7sElhJninBruFz3sC3uQh_4BytBphOqrI99Mq_NlzFu4Kr77BvvcjosBlwVh9Nj6SpsXjZp2MrzFh6F-8Lrta9qGxwSpiUvsBx0Tj1J_liBslD3sK2_F_tN56NzypB98al4clivB3mNnkEzkG_vM19O9qKv1YjiGr4YtzNv0U_kW5h
Nt8ariYj-N7iHzohB9yHtyHyIv0H16Qtga55Ml9f24Cv_Rl8Gl_ehlOxiT75BjmKh8lB72xBtsb5mT3qTrmlBziTn2M_zkB5Xz4mB_lhBx31B_gTkWv6azyUj7-B_pWhziBrtKlwGtnTr3br0E14a3sdtl_B37I5niCt0OvkHv0QzvS_gPxwEhxgBp8XrwYl2T1hCvhItoR2oGpsGs1HllQpoQnqExvnCgrD79SnwNj_I1oC
3uvB;w=2000
&q=zoo
Authorization: Bearer [your token]
The following parameters are used:
- apiKey - Your API key.
- at - Specify the center of the search context expressed as coordinates.
- limit - Maximum number of results to be returned.
- route - Select within a geographic corridor. Results will be returned if they are located within the specified area.
- q - Enter a free-text query.
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 places:
{
"items": [
{
"title": "Omaha's Henry Doorly Zoo and Aquarium",
"id": "here:pds:place:8409z7f9-8f341be571f64104afa591220b4aeab1",
"resultType": "place",
"address": {
"label": "Omaha's Henry Doorly Zoo and Aquarium, 3701 S 10th St, Omaha, NE 68107-2299, United States",
"countryCode": "USA",
"countryName": "United States",
"stateCode": "NE",
"state": "Nebraska",
"county": "Douglas",
"city": "Omaha",
"district": "Deer Park",
"street": "S 10th St",
"postalCode": "68107-2299",
"houseNumber": "3701"
},
"position": { "lat": 41.22445, "lng": -95.92756 },
"access": [{ "lat": 41.22451, "lng": -95.92965 }],
"distance": 250822,
"categories": [
{ "id": "550-5520-0208", "name": "Zoo", "primary": true },
{ "id": "200-2100-0019", "name": "Cinema" },
{ "id": "200-2200-0020", "name": "Performing Arts Center" },
{ "id": "300-3000-0000", "name": "Landmark-Attraction" },
{ "id": "550-5520-0211", "name": "Aquarium" },
{ "id": "550-5520-0228", "name": "Animal Park" }
],
"references": [
{ "supplier": { "id": "core" }, "id": "28902771" },
{ "supplier": { "id": "tripadvisor" }, "id": "209041" },
{ "supplier": { "id": "yelp" }, "id": "qpjyWl8vdJRmizemUrorRA" }
],
"contacts": [
{
"phone": [
{ "value": "+14023304629" },
{ "value": "+14027331989" },
{ "value": "+14027338400" },
{ "value": "+14027338401" },
{ "value": "+14027382073" }
],
"fax": [{ "value": "+14027337868" }],
"www": [
{ "value": "http://www.omahazoo.com/" }
],
"email": [{ "value": "admissions@omahazoo.com" }]
}
],
"openingHours": [
{
"text": ["Mon-Sun: 09:00 - 17:00"],
"isOpen": false,
"structured": [
{ "start": "T090000", "duration": "PT08H00M", "recurrence": "FREQ:DAILY;BYDAY:MO,TU,WE,TH,FR,SA,SU" },
{ "start": "T100000", "duration": "PT07H00M", "recurrence": "FREQ:DAILY;BYDAY:MO,TU,WE,TH,FR,SA,SU" }
]
}
]
},
...
]
}
Additional information
For more information about /discover
parameters, see: API Reference.