1
votes

So, I'm using Google Places API to search places and get data from places.

My goal is to get locations (geometry) by name, independently of my location, all around the world with autocomplete suggestions. These are the options that I tested:

OPTION 1

I'm already using "findplacefromtext":

https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input={name of place}&inputtype=textquery&fields={fields}&language=en&key={key}"

https://developers.google.com/places/web-service/search#FindPlaceRequests

It works, but I get only one result. I would like to get autocomplete suggestions in that request. Is possible to return more than 1 result in this request?

OPTION 2

So, in my second approach, I tried to use AutoComplete request "autocomplete/json":

https://maps.googleapis.com/maps/api/place/autocomplete/json?key={key}&input={text}&language=en

https://developers.google.com/places/web-service/autocomplete

It's exactly I am looking for, but it lacks location and place information. It contains "place_id", with "place_id" I can make a second request, that return all the data of place that I need, but it's in total, 2 requests, instead of 1. If I have 15 results I'll with have to use 15 requests (Place Detail Request)

https://developers.google.com/places/web-service/details

Is possible to return place information in autocomplete request, without make a place detail request?

1
Follow this stackoverflow.com/a/55045772/10579969, for androidNavin Kumar
Any solutions ?shift66

1 Answers

0
votes

Places Autocomplete does not currently return or support a more detailed information than what's indicated here. If you're interested to have this feature, you can file a feature request in Google's Public Issue Tracker for Google's product team to evaluate.