Routing API ignores closed roads - here-api

I'm testing the routing API and I'm wondering why it creates routes through closed roads.
There is my request: https://route.ls.hereapi.com/routing/7.2/calculateroute.json?waypoint0=geo!50.01568168937738,20.901489257812504&waypoint1=geo!50.0155162303763,20.879259109497074&apiKey=API-KEY-HERE&mode=balanced%3Bcar&alternatives=0
{
"response": {
"metaInfo": {
"timestamp": "2020-03-31T16:54:22Z",
"mapVersion": "8.30.107.151",
"moduleVersion": "7.2.202013-6746",
"interfaceVersion": "2.6.76",
"availableMapVersion": [
"8.30.107.151"
]
},
"route": [
{
"waypoint": [
{
"linkId": "-985497829",
"mappedPosition": {
"latitude": 50.0160635,
"longitude": 20.9021437
},
"originalPosition": {
"latitude": 50.0156817,
"longitude": 20.9014893
},
"type": "stopOver",
"spot": 1,
"sideOfStreet": "right",
"mappedRoadName": "ulica Wędkarska",
"label": "ulica Wędkarska",
"shapeIndex": 0,
"source": "user"
},
{
"linkId": "-1052271133",
"mappedPosition": {
"latitude": 50.0154679,
"longitude": 20.8792651
},
"originalPosition": {
"latitude": 50.0155162,
"longitude": 20.8792591
},
"type": "stopOver",
"spot": 0.6372549,
"sideOfStreet": "right",
"mappedRoadName": "Ostrów",
"label": "Ostrów",
"shapeIndex": 29,
"source": "user"
}
],
"mode": {
"type": "balanced",
"transportModes": [
"car"
],
"trafficMode": "disabled",
"feature": []
},
"leg": [
{
"start": {
"linkId": "-985497829",
"mappedPosition": {
"latitude": 50.0160635,
"longitude": 20.9021437
},
"originalPosition": {
"latitude": 50.0156817,
"longitude": 20.9014893
},
"type": "stopOver",
"spot": 1,
"sideOfStreet": "right",
"mappedRoadName": "ulica Wędkarska",
"label": "ulica Wędkarska",
"shapeIndex": 0,
"source": "user"
},
"end": {
"linkId": "-1052271133",
"mappedPosition": {
"latitude": 50.0154679,
"longitude": 20.8792651
},
"originalPosition": {
"latitude": 50.0155162,
"longitude": 20.8792591
},
"type": "stopOver",
"spot": 0.6372549,
"sideOfStreet": "right",
"mappedRoadName": "Ostrów",
"label": "Ostrów",
"shapeIndex": 29,
"source": "user"
},
"length": 2383,
"travelTime": 312,
"maneuver": [
{
"position": {
"latitude": 50.0160635,
"longitude": 20.9021437
},
"instruction": "Head <span class=\"heading\">east</span> on <span class=\"street\">ulica Wędkarska</span>. <span class=\"distance-description\">Go for <span class=\"length\">153 m</span>.</span>",
"travelTime": 24,
"length": 153,
"id": "M1",
"_type": "PrivateTransportManeuverType"
},
{
"position": {
"latitude": 50.0159132,
"longitude": 20.9040749
},
"instruction": "Turn <span class=\"direction\">right</span> onto <span class=\"next-street\">ulica Wędkarska</span>. <span class=\"distance-description\">Go for <span class=\"length\">108 m</span>.</span>",
"travelTime": 18,
"length": 108,
"id": "M2",
"_type": "PrivateTransportManeuverType"
},
{
"position": {
"latitude": 50.0150228,
"longitude": 20.904547
},
"instruction": "Turn <span class=\"direction\">right</span> onto <span class=\"next-street\">ulica Dunajcowa</span>. <span class=\"distance-description\">Go for <span class=\"length\">374 m</span>.</span>",
"travelTime": 55,
"length": 374,
"id": "M3",
"_type": "PrivateTransportManeuverType"
},
{
"position": {
"latitude": 50.0127375,
"longitude": 20.9007919
},
"instruction": "Turn <span class=\"direction\">slightly right</span> onto <span class=\"next-street\">ulica Do Promu</span>. <span class=\"distance-description\">Go for <span class=\"length\">75 m</span>.</span>",
"travelTime": 18,
"length": 75,
"id": "M4",
"_type": "PrivateTransportManeuverType"
},
{
"position": {
"latitude": 50.0126946,
"longitude": 20.8997512
},
"instruction": "Turn <span class=\"direction\">left</span> onto <span class=\"next-street\">ulica Do Promu</span>. <span class=\"distance-description\">Go for <span class=\"length\">249 m</span>.</span>",
"travelTime": 41,
"length": 249,
"id": "M5",
"_type": "PrivateTransportManeuverType"
},
{
"position": {
"latitude": 50.0111175,
"longitude": 20.897305
},
"instruction": "Turn <span class=\"direction\">right</span> onto <span class=\"next-street\">ulica Wincentego Witosa</span>. <span class=\"distance-description\">Go for <span class=\"length\">717 m</span>.</span>",
"travelTime": 92,
"length": 717,
"id": "M6",
"_type": "PrivateTransportManeuverType"
},
{
"position": {
"latitude": 50.0145936,
"longitude": 20.8889151
},
"instruction": "Continue on <span class=\"next-street\">Ostrów</span>. <span class=\"distance-description\">Go for <span class=\"length\">707 m</span>.</span>",
"travelTime": 64,
"length": 707,
"id": "M7",
"_type": "PrivateTransportManeuverType"
},
{
"position": {
"latitude": 50.0154679,
"longitude": 20.8792651
},
"instruction": "Arrive at <span class=\"street\">Ostrów</span>. Your destination is on the right.",
"travelTime": 0,
"length": 0,
"id": "M8",
"_type": "PrivateTransportManeuverType"
}
]
}
],
"summary": {
"distance": 2383,
"trafficTime": 312,
"baseTime": 312,
"flags": [
"builtUpArea"
],
"text": "The trip takes <span class=\"length\">2.4 km</span> and <span class=\"time\">5 mins</span>.",
"travelTime": 312,
"_type": "RouteSummaryType"
}
}
],
"language": "en-us"
}
}
The proposed route looks like that:
route through the closed bride.
The road closure info is available in the map. I've checked that in the Map Creator. Here WeGo map also knows about this and suggest an alternative route:
the valid route from Here WeGo.
Is there something wrong with my request?

Please try using following combinations for mode in your rest call. The Routing API v7 supports the following valid parameter combinations for routing modes.
Traffic-enabled:
mode=fastest;car;traffic:enabled
Traffic not enabled:
mode=fastest;car;traffic:disabled
mode=shortest;car
Also refer : https://developer.here.com/documentation/routing/dev_guide/topics/routing-mode-parameter-combinations.html
Please connect even if this doesn't result to what you are expecting the output to be

Related

Turn-by-turn latitude and longitude on HERE Routing API

I want to get the latitude and longitude per instruction on the actions I get from HERE Routing API v8. I get the maneuvers from HERE Routing v7 but not on v8. I tried all the return values.
https://router.hereapi.com/v8/routes?apikey=APIKEY&origin=14.57755,121.04239&destination=14.57735,121.04274&return=polyline,summary,actions,instructions&spans=segmentId&transportMode=car
{
"routes": [{
"id": "bae447cc-a31f-48f7-83a7-2c73c34d492d",
"sections": [{
"id": "152087e3-7f61-451e-b764-e88583586f10",
"type": "vehicle",
"actions": [{
"action": "depart",
"duration": 10,
"length": 76,
"instruction": "Head toward Camiguin on Barangka Dr. Go for 76 m.",
"offset": 0
},
{
"action": "continue",
"duration": 22,
"length": 102,
"instruction": "Continue on 9 de Febrero toward Ortigas Ave/Shaw Blvd. Go for 102 m.",
"offset": 3
},
{
"action": "turn",
"duration": 12,
"length": 53,
"instruction": "Turn right onto Talumpong. Go for 53 m.",
"offset": 7,
"direction": "right",
"severity": "quite"
},
{
"action": "turn",
"duration": 29,
"length": 149,
"instruction": "Turn right onto Tabayog. Go for 149 m.",
"offset": 8,
"direction": "right",
"severity": "quite"
},
{
"action": "arrive",
"duration": 0,
"length": 0,
"instruction": "Arrive at Tabayog. Your destination is on the left.",
"offset": 13
}
],
"departure": {
"time": "2022-02-03T18:59:50+08:00",
"place": {
"type": "place",
"location": {
"lat": 14.5775706,
"lng": 121.0423584
},
"originalLocation": {
"lat": 14.5775499,
"lng": 121.04239
}
}
},
"arrival": {
"time": "2022-02-03T19:01:03+08:00",
"place": {
"type": "place",
"location": {
"lat": 14.5773811,
"lng": 121.0426889
},
"originalLocation": {
"lat": 14.5773499,
"lng": 121.04274
}
}
},
"summary": {
"duration": 73,
"length": 380,
"baseDuration": 65
},
"polyline": "BGm635bs767mHiS0MsEkD8L0KgF0FsEoGgF4IoQsdvb8L3IvRnQze3IvHzK3I9ElD",
"spans": [{
"offset": 0,
"topologySegmentId": "+here:cm:segment:46864687"
},
{
"offset": 3,
"topologySegmentId": "+here:cm:segment:47392105"
},
{
"offset": 7,
"topologySegmentId": "-here:cm:segment:26196228"
},
{
"offset": 8,
"topologySegmentId": "-here:cm:segment:23767715"
},
{
"offset": 10,
"topologySegmentId": "-here:cm:segment:21101714"
}
],
"language": "en-us",
"transport": {
"mode": "car"
}
}],
}],
}
As of 2nd day of February 2022, the position paremeter that outputs latitude and longitude in v7 is not supported in v8 under maneuverAttributes. Source
That is correct in routing V8, there is an offset into polyline in maneuver. Offset is the index into the polyline and all coordinates in V8 work this way. spans, actions, they have offset into the route shape which is an array of coordinates. Example: https://demo.routing.ext.here.com/#url=https://router.hereapi.com/v8/routes?apikey=DEFAULT_API_KEY&origin=52.551325,13.351349&destination=52.514255,13.34929&return=polyline,summary,actions,instructions&transportMode=car

Address in autocomplete results

When I do an autosuggest request in the address response I only receive the label. The address object is not filled.
This is my request: https://autosuggest.search.hereapi.com/v1/autosuggest?at=48.8578817,2.2791249999999934&limit=5&q=stj&apikey=xxxx
I receive this:
"title": "Top Services (Stj)",
"id": "here:pds:place:250u09wj-afceace0a11b49bca950ea22d0f8e452",
"resultType": "place",
"address": {
"label": "********"
},
I will need to receive the formatted address without the name
How can I fix this?
thanks
We have tried to reproduce your query and it works for us, please see the following code.
Please review the documentation page for detailed information on autosuggest
Documentation link :
https://autosuggest.search.hereapi.com/v1/autosuggest?at=48.8578817,2.2791249999999934&limit=5&q=stj&apikey=XXXX.
Query Result:
{
"items": [
{
"title": "Top Services (Stj)",
"id": "here:pds:place:250u09wj-afceace0a11b49bca950ea22d0f8e452",
"resultType": "place",
"address": {
"label": "Top Services, 61 Rue du Faubourg Saint-Denis, 75010 Paris, France"
},
"position": {
"lat": 48.8721,
"lng": 2.35384
},
"access": [
{
"lat": 48.87208,
"lng": 2.35392
}
],
"distance": 5690,
"categories": [
{
"id": "700-7200-0254",
"name": "Construction",
"primary": true
},
{
"id": "700-7200-0264",
"name": "Services de conseil et de gestion"
},
{
"id": "700-7200-0277",
"name": "Entrepreneur de second œuvre"
}
],
"highlights": {
"title": [
{
"start": 14,
"end": 17
}
],
"address": {
"label": [
]
}
}
},
{
"title": "La Clinique du Scooter d'Occasion (Stj 2 Roues)",
"id": "here:pds:place:250u09tv-591de1b090c54199b11154a72f462c0d",
"resultType": "place",
"address": {
"label": "La Clinique du Scooter d'Occasion, 148 Boulevard du Montparnasse, 75014 Paris, France"
},
"position": {
"lat": 48.84039,
"lng": 2.33383
},
"access": [
{
"lat": 48.84052,
"lng": 2.33393
}
],
"distance": 4451,
"categories": [
{
"id": "400-4200-0241",
"name": "Services logistiques",
"primary": true
}
],
"highlights": {
"title": [
{
"start": 35,
"end": 38
}
],
"address": {
"label": [
]
}
}
},
{
"title": "Stjohn's",
"id": "here:pds:place:2501r4ve-43f913ba8f9b0e7046aaee61bcfe8b9b",
"resultType": "place",
"address": {
"label": "Stjohn's, 11 Rue Edmond Valentin, 75007 Paris, France"
},
"position": {
"lat": 48.85961,
"lng": 2.30159
},
"access": [
{
"lat": 48.85968,
"lng": 2.30157
}
],
"distance": 1655,
"categories": [
{
"id": "700-7400-0141",
"name": "Services aux entreprises",
"primary": true
},
{
"id": "700-7200-0252",
"name": "Publicité, marketing, communication et études de marché"
}
],
"highlights": {
"title": [
{
"start": 0,
"end": 3
}
],
"address": {
"label": [
{
"start": 0,
"end": 3
}
]
}
}
},
{
"title": "Stjohn S",
"id": "here:pds:place:250u09tv-0f38e06dd8634ab4a0d931dad94de24c",
"resultType": "place",
"address": {
"label": "Stjohn S, 4 Rue des Petits-Pères, 75002 Paris, France"
},
"position": {
"lat": 48.86601,
"lng": 2.34027
},
"access": [
{
"lat": 48.8662,
"lng": 2.34023
}
],
"distance": 4564,
"categories": [
{
"id": "700-7200-0252",
"name": "Publicité, marketing, communication et études de marché",
"primary": true
},
{
"id": "700-7200-0271",
"name": "Services financiers et d'assurance"
}
],
"highlights": {
"title": [
{
"start": 0,
"end": 3
}
],
"address": {
"label": [
{
"start": 0,
"end": 3
}
]
}
}
},
{
"title": "Espace St-Jo'",
"id": "here:pds:place:250u09te-220742c64e4a40a48b8772987e7f987c",
"resultType": "place",
"address": {
"label": "Espace St-Jo', 54 Rue du Moulin de Pierres, 92140 Clamart, France"
},
"position": {
"lat": 48.80865,
"lng": 2.26594
},
"access": [
{
"lat": 48.8087,
"lng": 2.2659
}
],
"distance": 5558,
"categories": [
{
"id": "200-2200-0000",
"name": "Théâtre, musique et culture",
"primary": true
},
{
"id": "200-2000-0015",
"name": "Salle de spectacle/concert"
},
{
"id": "550-5520-0000",
"name": "Aire de loisirs"
}
],
"references": [
{
"supplier": {
"id": "yelp"
},
"id": "xJtl5krT8OZ3QYXtMl6Leg"
}
],
"highlights": {
"title": [
{
"start": 7,
"end": 12
}
],
"address": {
"label": [
{
"start": 7,
"end": 12
}
]
}
}
}
],
"queryTerms": [
]
}

How to format data to algolia

I'm learning How to use Algolia and I have a few questions.
I have the table FreightDriver, which has a relationship one to many with the table Truck
id: ID!
name: String!
email: String!
phoneNumber: String!
cities: [String!]!
state: String!
country: String!
picture: String
trucks: [Truck] #connection(keyName: "byFreightDriver", fields: ["id"])
Then, the table Truck, which has a relationship one to one with the table FreightDriver, and another table, which is Box one to one as well
id: ID!
freightDriverId: ID!
boxId: ID!
brand: String!
model: String!
yearModel: Int!
// and more fields
freightDriver: FreightDriver #connection(fields: ["freightDriverId"])
box: Box #connection(fields: ["boxId"])
and the table Box:
id: ID!
type: String!
width: Float!
height: Float!
depth: Float!
I want to find trucks based on the state and city of the FreightDrivers, and also (if the user needs it), find based on the type of box and brand or model of a truck (just as an example).
Example find by state and city of a FreightDriver:
{
"data": {
"freightDriversByState": {
"items": [
{
"name": "Andrés Montoya",
"cities": [
"GUADALAJARA"
],
"state": "JALISCO",
"country": "MX",
"trucks": {
"items": [
{
"brand": "chevrolet",
"model": "12",
"yearModel": 2020,
"box": {
"type": "Ganadera",
"width": 1,
"height": 2,
"depth": 3
}
},
{
"brand": "chevrolet",
"model": "12",
"yearModel": 2020,
"box": {
"type": "Seca (abierta)",
"width": 12,
"height": 12,
"depth": 12
}
},
{
"brand": "chevrolet",
"model": "12",
"yearModel": 2020,
"box": {
"type": "Seca (abierta)",
"width": 12,
"height": 12,
"depth": 12
}
},
{
"brand": "chevrolet",
"model": "Semi",
"yearModel": 2020,
"box": {
"type": "Seca (abierta)",
"width": 1,
"height": 2,
"depth": 3
}
},
{
"brand": "chevrolet",
"model": "12",
"yearModel": 2020,
"box": {
"type": "Seca (abierta)",
"width": 1,
"height": 2,
"depth": 3
}
},
{
"brand": "chevrolet",
"model": "12",
"yearModel": 2020,
"box": {
"type": "Volcadora",
"width": 1,
"height": 2,
"depth": 3
}
},
{
"brand": "hola",
"model": "12",
"yearModel": 12,
"box": {
"type": "Plataforma",
"width": 1,
"height": 2,
"depth": 3
}
},
{
"brand": "Ford",
"model": "12",
"yearModel": 2020,
"box": {
"type": "Seca (abierta)",
"width": 1,
"height": 2,
"depth": 1
}
},
{
"brand": "dasdas",
"model": "12",
"yearModel": 12231,
"box": {
"type": "Grúa",
"width": 1,
"height": 2,
"depth": 3
}
},
{
"brand": "Tesla",
"model": "Semi",
"yearModel": 2020,
"box": {
"type": "Seca (abierta)",
"width": 4,
"height": 4,
"depth": 2
}
}
]
}
},
{
"name": "Roberto mendez",
"cities": [
"GUADALAJARA"
],
"state": "JALISCO",
"country": "MX",
"trucks": {
"items": []
}
},
{
"name": "Fletes Jalisco Sa de Cv ",
"cities": [
"GUADALAJARA"
],
"state": "JALISCO",
"country": "MX",
"trucks": {
"items": [
{
"brand": "Ford",
"model": "F-450",
"yearModel": 2018,
"box": {
"type": "Seca (cerrada)",
"width": 2.7,
"height": 2.5,
"depth": 4.5
}
},
{
"brand": "Hiundai",
"model": "H100",
"yearModel": 2009,
"box": {
"type": "Seca (abierta)",
"width": 2.3,
"height": 2,
"depth": 4
}
},
{
"brand": "Hiundai",
"model": "H100",
"yearModel": 2020,
"box": {
"type": "Seca (abierta)",
"width": 2.35,
"height": 2,
"depth": 3
}
},
{
"brand": "Ford",
"model": "F-450",
"yearModel": 2018,
"box": {
"type": "Seca (cerrada)",
"width": 2.7,
"height": 2.2,
"depth": 3
}
},
{
"brand": "Ford",
"model": "F-450",
"yearModel": 2004,
"box": {
"type": "Seca (abierta)",
"width": 2.5,
"height": 2,
"depth": 3
}
}
]
}
},
{
"name": "Cotransport",
"cities": [
"GUADALAJARA"
],
"state": "JALISCO",
"country": "MX",
"trucks": {
"items": [
{
"brand": "Chevrolet",
"model": "CX-5",
"yearModel": 2019,
"box": {
"type": "Seca (cerrada)",
"width": 4,
"height": 3,
"depth": 4
}
}
]
}
},
{
"name": "Andrés",
"cities": [
"EL LIMÓN",
"MAGDALENA",
"SANTA MARÍA DEL ORO",
"GUADALAJARA",
"ETZATLÁN"
],
"state": "JALISCO",
"country": "MX",
"trucks": {
"items": [
{
"brand": "chevrolet",
"model": "12",
"yearModel": 2020,
"box": {
"type": "Seca (abierta)",
"width": 1,
"height": 2,
"depth": 3
}
}
]
}
}
]
}
}
}
But, if I want to find using the state and city of a freight driver, the type of box and the model or brand of a truck, that's where the problem comes, because I'm using Dynamodb and this one does not have relationships, so, it's a little bit tricky to get the exact data. That's why I'd like to use Algolia, but how do I format the data for Algolia in this case? What do I need to do? thanks!
If someone is interested, here's the answer https://discourse.algolia.com/t/how-to-format-data-to-algolia/10897

Rest API returning wrong result

I was planning to migrate from the json API to the rest API, however, the results are not matching, the reverse geocode of the rest API is returning the wrong result. has anyone faced that issue before? Find sample below:
https://revgeocode.search.hereapi.com/v1/revgeocode?at=-32.05786%2C115.93382&lang=en-US&apiKey={KEY}
enter code here {
"items": [
{
"title": "Reece Australia",
"id": "here:pds:place:036qd63w-93b4e78634c7482aa36a7140fde9701b",
"resultType": "place",
"address": {
"label": "Reece Australia, Thornlie WA 6108, Australia",
"countryCode": "AUS",
"countryName": "Australia",
"state": "Western Australia",
"city": "Perth",
"district": "Thornlie",
"postalCode": "6108"
},
"position": {
"lat": -32.05779,
"lng": 115.93393
},
"access": [
{
"lat": -32.05779,
"lng": 115.93393
}
],
"distance": 13,
"categories": [
{
"id": "700-7400-0366",
"primary": true
}
]
}
]
}
https://reverse.geocoder.ls.hereapi.com/6.2/reversegeocode.json?apiKey={APIKEY}&mode=retrieveAddresses&prox=-32.05786,115.93382&maxresults=1
enter code here {
"Response": {
"MetaInfo": {
"Timestamp": "2020-06-25T05:17:32.232+0000",
"NextPageInformation": "2"
},
"View": [
{
"_type": "SearchResultsViewType",
"ViewId": 0,
"Result": [
{
"Relevance": 1.0,
"Distance": 2.1,
"MatchLevel": "street",
"MatchQuality": {
"Country": 1.0,
"State": 1.0,
"City": 1.0,
"District": 1.0,
"Street": [
1.0
],
"PostalCode": 1.0
},
"Location": {
"LocationId": "NT_K800C2SShmW5hJiQktPlsB_l_133454375_L",
"LocationType": "point",
"DisplayPosition": {
"Latitude": -32.0578752,
"Longitude": 115.9338325
},
"MapView": {
"TopLeft": {
"Latitude": -32.05782,
"Longitude": 115.9337
},
"BottomRight": {
"Latitude": -32.05798,
"Longitude": 115.9339
}
},
"Address": {
"Label": "Bannister Rd, Canning Vale WA 6155, Australia",
"Country": "AUS",
"State": "WA",
"City": "Perth",
"District": "Canning Vale",
"Street": "Bannister Rd",
"PostalCode": "6155",
"AdditionalData": [
{
"value": "Australia",
"key": "CountryName"
},
{
"value": "Western Australia",
"key": "StateName"
}
]
},
"MapReference": {
"ReferenceId": "133454375",
"Spot": 0.66,
"SideOfStreet": "neither",
"CountryId": "1469256839",
"StateId": "1469256834",
"CityId": "1469263736",
"DistrictId": "1469282231"
}
}
}
]
}
]
}
}
Result given by Rest API is correct as you are getting accurate result at that coordinate.
while in JSON API you are passing proximities with retrieveAddresses which always search for the closest street address or addresses in the given proximities.
for more details you can visit the documentations for both API.
https://developer.here.com/documentation/geocoding-search-api/api-reference-swagger.html
https://developer.here.com/documentation/geocoder/dev_guide/topics/resource-reverse-geocode.html

Why is averageRating always 0?

I am using the 'Explore Popular Places by Category' API and it always returns averageRating as 0 for all items in the result.
I made this call with various categories such as restaurants and sights-museums, but it always returns 0 for averageRating. Does HERE not provide this detail, and if so, why is it returned in the response?
Some details:
I am making a call to this url:
https://places.ls.hereapi.com/places/v1/discover/explore?at=52.5159%2C13.3777&cat=sights-museums&apiKey={api_key}
and it returns something like this:
{
"results": {
"next": "https://places.ls.hereapi.com/places/v1/discover/explore;context=Y2F0PXNpZ2h0cy1tdXNldW1zJmZsb3ctaWQ9Mjk0ZjU1NTgtMmY0Mi01Y2FiLWJlYWUtOGEyM2ViY2EzMzgzXzE1ODMyNjMyNjEwMzZfMF84NTcyJm9mZnNldD0yMCZzaXplPTIw?at=52.5159%2C13.3777&app_id=LKO34glU2MBEVbcOD5mQ&app_code=A2ta_nQ8HRYwenju5HFG5Q",
"items": [
{
"position": [
52.51629,
13.37817
],
"distance": 54,
"title": "Brandenburg Gate",
"averageRating": 0,
"category": {
"id": "landmark-attraction",
"title": "Landmark/Attraction",
"href": "https://places.ls.hereapi.com/places/v1/categories/places/landmark-attraction?app_id=LKO34glU2MBEVbcOD5mQ&app_code=A2ta_nQ8HRYwenju5HFG5Q",
"type": "urn:nlp-types:category",
"system": "places"
},
"icon": "https://download.vcdn.data.here.com/p/d/places2/icons/categories/38.icon",
"vicinity": "Pariser Platz<br/>Mitte, 10117 Berlin",
"having": [],
"type": "urn:nlp-types:place",
"href": "https://places.ls.hereapi.com/places/v1/places/276u33db-8ee2e0de906e459cbade0593986debe9;context=Zmxvdy1pZD0yOTRmNTU1OC0yZjQyLTVjYWItYmVhZS04YTIzZWJjYTMzODNfMTU4MzI2MzI2MTAzNl8wXzg1NzImcmFuaz0w?app_id=LKO34glU2MBEVbcOD5mQ&app_code=A2ta_nQ8HRYwenju5HFG5Q",
"id": "276u33db-8ee2e0de906e459cbade0593986debe9",
"alternativeNames": [
{
"name": "Brandenburger Tor",
"language": "de"
}
]
},
{
"position": [
52.51373,
13.37976
],
"distance": 279,
"title": "Holocaust Memorial",
"averageRating": 0,
"category": {
"id": "museum",
"title": "Museum",
"href": "https://places.ls.hereapi.com/places/v1/categories/places/museum?app_id=LKO34glU2MBEVbcOD5mQ&app_code=A2ta_nQ8HRYwenju5HFG5Q",
"type": "urn:nlp-types:category",
"system": "places"
},
"icon": "https://download.vcdn.data.here.com/p/d/places2/icons/categories/10.icon",
"vicinity": "Cora-Berliner-Straße 1<br/>Mitte, 10117 Berlin",
"having": [],
"type": "urn:nlp-types:place",
"href": "https://places.ls.hereapi.com/places/v1/places/276u33de-df7d57fd38494a93b2018fe549a0fd75;context=Zmxvdy1pZD0yOTRmNTU1OC0yZjQyLTVjYWItYmVhZS04YTIzZWJjYTMzODNfMTU4MzI2MzI2MTAzNl8wXzg1NzImcmFuaz0x?app_id=LKO34glU2MBEVbcOD5mQ&app_code=A2ta_nQ8HRYwenju5HFG5Q",
"id": "276u33de-df7d57fd38494a93b2018fe549a0fd75",
"openingHours": {
"text": "Tue-Sun: 10:00 - 20:00",
"label": "Opening hours",
"isOpen": false,
"structured": [
{
"start": "T100000",
"duration": "PT10H00M",
"recurrence": "FREQ:DAILY;BYDAY:TU,WE,TH,FR,SA,SU"
}
]
},
"alternativeNames": [
{
"name": "Memorial to the Murdered European Jews",
"language": "en"
},
{
"name": "Memorial to the Murdered Jews of Europe",
"language": "en"
},
{
"name": "Denkmal für die ermordeten Juden Europas",
"language": "de"
}
]
},
{
"position": [
52.51666,
13.40784
],
"distance": 2041,
"title": "Nicholas Quarter",
"averageRating": 0,
"category": {
"id": "museum",
"title": "Museum",
"href": "https://places.ls.hereapi.com/places/v1/categories/places/museum?app_id=LKO34glU2MBEVbcOD5mQ&app_code=A2ta_nQ8HRYwenju5HFG5Q",
"type": "urn:nlp-types:category",
"system": "places"
},
"icon": "https://download.vcdn.data.here.com/p/d/places2/icons/categories/10.icon",
"vicinity": "Nikolaikirchplatz<br/>Mitte, 10178 Berlin",
"having": [],
"type": "urn:nlp-types:place",
"href": "https://places.ls.hereapi.com/places/v1/places/276u33dc-049683d3c6be4bdba823808678a1b164;context=Zmxvdy1pZD0yOTRmNTU1OC0yZjQyLTVjYWItYmVhZS04YTIzZWJjYTMzODNfMTU4MzI2MzI2MTAzNl8wXzg1NzImcmFuaz0xOQ?app_id=LKO34glU2MBEVbcOD5mQ&app_code=A2ta_nQ8HRYwenju5HFG5Q",
"id": "276u33dc-049683d3c6be4bdba823808678a1b164",
"alternativeNames": [
{
"name": "Nikolaiviertel",
"language": "en"
},
{
"name": "Nikolaiviertel",
"language": "de"
}
]
}
]
},
"search": {
"context": {
"location": {
"position": [
52.5159,
13.3777
],
"address": {
"text": "Ebertstraße 22<br/>Mitte, 10117 Berlin<br/>Germany",
"house": "22",
"street": "Ebertstraße",
"postalCode": "10117",
"district": "Mitte",
"city": "Berlin",
"county": "Berlin",
"stateCode": "Berlin",
"country": "Germany",
"countryCode": "DEU"
}
},
"type": "urn:nlp-types:place",
"href": "https://places.ls.hereapi.com/places/v1/places/loc-dmVyc2lvbj0xO3RpdGxlPUViZXJ0c3RyYSVDMyU5RmUrMjI7bGF0PTUyLjUxNTk7bG9uPTEzLjM3Nzc7c3RyZWV0PUViZXJ0c3RyYSVDMyU5RmU7aG91c2U9MjI7Y2l0eT1CZXJsaW47cG9zdGFsQ29kZT0xMDExNztjb3VudHJ5PURFVTtkaXN0cmljdD1NaXR0ZTtzdGF0ZUNvZGU9QmVybGluO2NvdW50eT1CZXJsaW47Y2F0ZWdvcnlJZD1idWlsZGluZztzb3VyY2VTeXN0ZW09aW50ZXJuYWw;context=c2VhcmNoQ29udGV4dD0x?app_id=LKO34glU2MBEVbcOD5mQ&app_code=A2ta_nQ8HRYwenju5HFG5Q"
}
}
}
Does HERE not provide the averageRatings of restaurants or sights-museums?
From the docs it appears if the place hasn't received a rating it'll be 0
Note: If the place has no ratings (yet), both the average and the count values are zero. But if the place cannot be rated (i.e. a street), the whole rating object is not present.
https://developer.here.com/documentation/places/dev_guide/topics/object-rating.html

Resources