Search code examples
geocodinghere-apihere-maps-rest

Why do network calls from Here We Go browser provide different results compared to Here-API?


I called the following http request to the Geocoding endpoint of the Here API, with a free form address entry and language parameters, such as:

https://geocode.search.hereapi.com/v1/geocode?q=Tubdispanser+2+Belarus&lang=en-US&apiKey={API_KEY}

The parameters are:

  • The address: q = "Tubdispanser 2 Belarus"
  • Language: lang = "en-US"

The API response is the following:

{"items":[{"title":"Тубдиспансер 2, Minski rayon, Minskaya voblasts', Belarus","id":"here:af:streetsection:KRpXCVKK0uoNU4Le3JvXDD:CggIBCCU4sPZAhABGgEyKGQ","resultType":"houseNumber","houseNumberType":"PA","address":{"label":"Тубдиспансер 2, Minski rayon, Minskaya voblasts', Belarus","countryCode":"BLR","countryName":"Belarus","state":"Minskaya voblasts'","county":"Minski rayon","city":"Minski rayon","street":"Тубдиспансер","houseNumber":"2"},"position":{"lat":53.9567,"lng":27.64356},"access":[{"lat":53.95679,"lng":27.6433}],"mapView":{"west":27.64203,"south":53.9558,"east":27.64509,"north":53.9576},"scoring":{"queryScore":1.0,"fieldScore":{"streets":[1.0],"houseNumber":1.0}}}]}

The result is different from the one given by Here We Go online browser. Does Here We Go browser use a different endpoint?

Thank you.


Solution

  • Given the additional information provided by OP in comments, it appears that the location returned by HERE WeGo webapp refers to the same place as the result from the Geocode API with, notably, the following differences:

    • The coordinates decimal precision slightly differs
    • The address is formatted differently, e.g. the result from the geocoder also contains the "region" information (voblast of Minsk)

    The reason of this differences is that, as @leopectus hinted, the search from the HERE WeGo webapp actually uses the *Places Autosuggest API. It uses the following endpoint:

    https://places.api.here.com/places/v1/autosuggest