Sound too good to be true? Let’s put the new HERE Geocoding and Search API v7 to the test with a hypothetical tour of Chicago.
Using the Browse endpoint returns a list of popular Chicago locations:
https://browse.search.hereapi.com/v1/browse?apiKey={apiKey}&at=41.88939,-87.62413&limit=5
"title": "Italian Trade Agency",
"id": "here:pds:place:840dp3wq-ee270f82a2044b42b8d2d294aa156fcc",
"resultType": "place",
"address": {
"label": "Italian Trade Agency, 401 N Michigan Ave, Chicago, IL 60611, United States",
"countryCode": "USA",
"countryName": "United States",
"state": "Illinois",
"county": "Cook",
"city": "Chicago",
"district": "River North",
"street": "N Michigan Ave",
"postalCode": "60611",
"houseNumber": "401"
},
"position": {
"lat": 41.88939,
"lng": -87.62414
},
"access": [
{
"lat": 41.88941,
"lng": -87.62414
}
],
"distance": 1,
"categories": [
{
"id": "700-7400-0000"
}
],
"contacts": [
{
"phone": [
{
"value": "+13126704360"
}
]
}
]
Instead of sifting through “all places” returned in this example, results can be narrowed by filtering by category, chosen from the list of the HERE Place categories. For example, choosing category 600 returns available shopping options along with distance in meters from the search location to the POI.
https://browse.search.hereapi.com/v1/browse?apiKey={apiKey}&at=41.88939,-87.62413&categories=600&limit=5
"title": "Apple Store",
"id": "here:pds:place:840dp3wq-59acd9eeee754656ac017431ecd6ffc1",
"resultType": "place",
"address": {
"label": "Apple Store, 401 N Michigan Ave, Chicago, IL 60611, United States",
"countryCode": "USA",
"countryName": "United States",
"state": "Illinois",
"county": "Cook",
"city": "Chicago",
"district": "River North",
"street": "N Michigan Ave",
"postalCode": "60611",
"houseNumber": "401"
}
"position": {
"lat": 41.88939,
"lng": -87.62413
}
"access": [
{
"lat": 41.88941,
"lng": -87.62413
}
],
"distance": 0,
"categories": [
{
"id": "600-6500-0072"
}
],
"contacts": [
{
"phone": [
{
"value": "+13125299500"
}
],
"www": [
{
"value": "http://www.apple.com"
}
{
"value": "https://www.apple.com/retail/michiganavenue/"
}
],
"email": [
{
"value": "michiganavenue@apple.com"
}
]
}
],
"openingHours": [
{
"text": [
"Mon-Sat: 09:00 - 21:00",
"Sun: 10:00 - 19:00"
],
"isOpen": true,
"structured": [
{
"start": "T090000",
"duration": "PT12H00M",
"recurrence": "FREQ:DAILY;BYDAY:MO,TU,WE,TH,FR,SA"
}
{
"start": "T100000",
"duration": "PT09H00M",
"recurrence": "FREQ:DAILY;BYDAY:SU"
}
]
}
]
}
Filtering by POI name is also a possibility, as demonstrated by these results for “Willis Tower”:
https://browse.search.hereapi.com/v1/browse?apiKey={apiKey}&at=41.88939,-87.62413&categories=300&name=Willis&limit=5
"title": "Willis Tower",
"id": "here:pds:place:840jx7ps-9bc60957e80b01a6af1adb010f538376",
"esultType": "place",
"address": {
"label": "Willis Tower, 233 S Wacker Dr, Chicago, IL 60606, United States",
"countryCode": "USA",
"countryName": "United States",
"state": "Illinois",
"county": "Cook",
"city": "Chicago",
"district": "Loop",
"street": "S Wacker Dr",
"postalCode": "60606",
"houseNumber": "233"
},
"position": {
"lat": 41.8787,
"lng": -87.63598
},
"access": [
{
"lat": 41.87868,
"lng": -87.63669
}
],
"distance": 1541,
"categories": [
{
"id": "100-1000-0000"
},
{
"id": "200-2200-0000"
},
{
"id": "300-3000-0000"
},
{
"id": "300-3000-0023"
},
{
"id": "300-3000-0025"
},
{
"id": "300-3100-0000"
},
{
"id": "600-6900-0247"
},
{
"id": "700-7400-0000"
}
],
"foodTypes": [
{
"id": "101-000"
},
{
"id": "200-000"
},
{
"id": "201-000"
},
{
"id": "203-026"
}
],
"contacts": [
{
"phone": [
{
"value": "+13127152009"
},
{
"value": "+13127245621"
},
{
"value": "+13128750066"
},
{
"value": "+13128759447"
}
],
"www": [
{
"value": "http://marketcreationscafe.com/contact/"
},
{
"value": "http://www.the-skydeck.com"
},
{
"value": "https://theskydeck.com/"
}
]
}
]
},
And what’s a trip to Chicago without a stop for deep-dish pizza? With HERE Geocoding and Search API v7, even if a common word like pizza is misspelled there’s still nothing standing between you and your pizza fix. The autosuggest endpoint corrects the error and returns a list of pizza places.
https://autosuggest.search.hereapi.com/v1/autosuggest?apiKey={apiKey}&q=piza&at=41.88939,-87.62413
"title": "Pizano's Pizza & Pasta",
"id": "here:pds:place:840dp3wq-57b2e43ddd634845852d6e9af37f0c24",
"resultType": "place",
"address": {
"label": "Pizano's Pizza & Pasta, 61 E Madison St, Chicago, IL 60602, United States",
"countryCode": "USA",
"countryName": "United States",
"state": "Illinois",
"county": "Cook",
"city": "Chicago",
"district": "Loop",
"street": "E Madison St",
"postalCode": "60602",
"houseNumber": "61"
},
"position": {
"lat": 41.88194,
"lng": -87.62569
},
"access": [
{
"lat": 41.88208,
"lng": -87.62569
} ]
"distance": 838,
"categories": [
{
"id": "100-1000-0000"
},
{
"id": "100-1000-0001"
},
{
"id": "200-2000-0011"
},
{
"id": "700-7400-0138"
}
],
"foodTypes": [
{
"id": "304-000"
},
{
"id": "800-057"
},
{
"id": "800-067"
} ],
"highlights": {
"title": [
{
"start": 0,
"end": 4
}
],
"address": {
"label": [
{
"start": 0,
"end": 4
}
]
}
}
},
Whether it’s a metropolis like Chicago or Main Street USA, the HERE v7 Geocoding and Search API provides endless possibilities for navigating applications built on HERE Location Services. Contact ADCi today to discover more about this exciting new API, and learn about what sets HERE Location Services apart in our HERE Location Services Fact Sheet.