How to get nearby places information for locations (POIs)
This tutorial provides instructions on how to use the HERE EV Charge Points API v3 to get the nearby places (POIs) associated with an EV charging location.
Note
Not all EV charging locations have nearby places.
Prerequisites
Before you start, complete your HERE platform onboarding and obtain application credentials. For more information about onboarding and credentials, see Get started.
This section requires you to understand basic requests in the HERE EV Charge Points API v3 as covered in Get one or multiple charging locations.
HTTP call to the endpoint
To access the HERE EV Charge Points API v3 locations endpoint, send this request:
This tutorial uses the EV charging location with location id: 246udbvy497hq-aGVyZS1ldjplY29tb3ZlbWVudDoyMDEyMTg1ODgz.
Get nearby places for an EV charging location
To get the nearby places and facilities for a charging location, use the query parameter fields=nearby. For details on this parameter, see the API reference.
curl -H "Authorization: Bearer $ACCESS_TOKEN" "https://evcp.hereapi.com/v3/locations/246udbvy497hq-aGVyZS1ldjplY29tb3ZlbWVudDoyMDEyMTg1ODgz?fields=nearby" | jq
The response is as follows:
{
"items": [
{
"id": "here:evcp:charginglocation:246udbvy497hq-aGVyZS1ldjplY29tb3ZlbWVudDoyMDEyMTg1ODgz",
"location": {
"lat": 61.493772,
"lng": 23.820261
},
"supportedVehicles": [
"car"
],
"name": "K-Lataus",
"operator": {
"name": "K-Lataus",
"partnerId": "a2f67dda-cca7-11ed-ad67-42010aa40fc0",
"website": "https://k-lataus.fi/"
},
"facilityTypes": [
"cafe",
"fastFood",
"health",
"mall",
"restaurant",
"sport",
"store"
],
"nearbyPlaces": [
{
"placeId": "246udbvy-7fb09afae79e4d051be15a99ce954c21",
"categories": [
"100-1100-0000"
],
"distance": 11
},
{
"placeId": "246udbvv-f7df1bf0c4b58ac52bb27aae702a95a1",
"categories": [
"600-6300-0066"
],
"distance": 18
},
{
"placeId": "246udbvy-d212d470a729ce30f7f201d2154471c4",
"categories": [
"100-1000-0000"
],
"distance": 18
},
{
"placeId": "246udbvy-fb678bd4922711b8c9e0ec372a188236",
"categories": [
"100-1000-0009"
],
"distance": 18
},
{
"placeId": "246udbvy-c196760bacf2cf00cc0ad8ea3b430f41",
"categories": [
"600-6100-0062"
],
"distance": 37
},
{
"placeId": "246udbvy-7ad4714dfd344077b765b6e23b01001d",
"categories": [
"100-1000-0000",
"100-1100-0000"
],
"distance": 70
},
{
"placeId": "246udbvv-99862c5dd678eff42c5fdf7abb7a03e0",
"categories": [
"100-1000-0000",
"100-1100-0000",
"100-1100-0010"
],
"distance": 110
},
{
"placeId": "2468lxx5-0f9257ec8daa035411790c0a04632ff3",
"categories": [
"100-1000-0000"
],
"distance": 158
},
{
"placeId": "246udbvy-27b79879cebc45519c44d47519bd4634",
"categories": [
"800-8600-0000"
],
"distance": 158
},
{
"placeId": "2461r4ve-a3366d17cd8c034f383b91711b4ff67f",
"categories": [
"100-1000-0009",
"800-8600-0000"
],
"distance": 179
},
{
"placeId": "246jx7ps-8504c878247504acb742ef6ca2923356",
"categories": [
"800-8000-0000"
],
"distance": 179
},
{
"placeId": "246udbvy-9e5eabb9036bf6a5d4f7e2f6c53a928d",
"categories": [
"100-1000-0000"
],
"distance": 187
}
]
}
]
}The nearby feature contains two attributes: facilities and nearbyPlaces.
The facilities attribute contains a list of the facilities (for example, mall, restaurant) in the vicinity of the EV charging location. Apart from the default OCPI-defined list, the facilities field also supports additional facility types that are relevant to your implementation. For details on this attribute, see the API reference.
The nearbyPlaces attribute lists points of interest (POIs) in the vicinity of the EV charging location. The placeId is a HERE Place ID. Use the HERE Search API to fetch online details or HERE Places for offline details. The categories field contains the HERE Place categories that classify the POI. The distance field shows the distance between the EV charging location and the POI in meters.
For more information about the Place categories, see HERE Place category system.
Updated 2 days ago