Cracs
Cracs

Reputation: 525

HERE autosuggest get complete address informations

I'm currently working with HERE API, using autosuggest to get my results. In the adress object of each response I only got "label" who look like this :

"address": { "label": "Resort Mark Brandenburg, An der Seepromenade 20, 16816 Neuruppin, Germany" },

Is there a way to optain complete informations like discover or autocomplete do ? Like having countryCode, city, street in the address object ?

On this page https://developer.here.com/documentation/geocoding-search-api/api-reference-swagger.html at autosuggest menu we can see all the informations in the response samples.

I'm using this query at the moment :

https://autosuggest.search.hereapi.com/v1/autosuggest?apiKey=MYAPIKEY&result_types=address,place&in=bbox:0.5833,42.9667,2.241295,44.210550&in=countryCode:FRA&q=apitol&limit=5&content-type=application/json&lang=fr-fr

Upvotes: 0

Views: 234

Answers (2)

user3505695
user3505695

Reputation:

If some additional fields to be rendered in the response, then you have to pass the "show" tag in the request query string. Please note that some of the fields involve additional webservice calls and can increase the overall response time.

More details regarding "show" tag are covered in below API specs.

https://developer.here.com/documentation/geocoding-search-api/api-reference-swagger.html

Sample Request Query.

https://autosuggest.search.hereapi.com/v1/autosuggest?apiKey=YOUR_API_KEY&result_types=address,place&in=bbox:0.5833,42.9667,2.241295,44.210550&in=countryCode:FRA&q=apitol&limit=5&content-type=application/json&lang=fr-fr&show=details

Upvotes: 1

Poramet Wattaya
Poramet Wattaya

Reputation: 56

Add this parameter "&show=details" for show address details.

Upvotes: 2

Related Questions