Hi all,
Please find below some questions about the Google Places API:
Not sure if i did a wrong setup or not, but when I want to display a list of markers (restaurants or whatever) on a map or repeating groups, it never shows more than 20 results. Is there a reason for that? It’s quite blocking for the app i am trying to build since I would need a comprehensive list of places in a many city…
Could we save additional information from the google places API, like the category of the place? That would be very useful.
What would be the best way to save these google places? So far, I did it using a click on marker that creates a new thing, but as i will need to do it for many places in many cities, it may take some time so I was wondering if there is a better way to do that? Like saving the whole list of markers displayed at once?
Yes, Google limits the Nearby and Text calls to 20 (Radar is 200). However it does provide a “next page” token, but we don’t have access to that in Bubble.
Once we have Arrays supported in the API Connector Plugin, you should be able to do all this and more, such as bring back photos.
Thank you Nigel. I have read some of your posts and it seems the radar search only returns ID right? Is it possible with the ID to retrieve atleast the name, address, etc.?
Don’t know if i should wait for Arrays to be implemented in the API connector plugin or find a workaround in the meantime, i guess that will depend on the timeline for such release. @georgeciobanu Any idea when this could be implemented? thanks
Hi George, sounds great,! I am not very familiar with the API connector yet but according to Nigel that should help a lot with I need to do, so thanks for the good news!
Hi Nigel. I have been playing a bit with the API connector and google places API but i am wondering if this the appropriate way for what i am trying to do, so before spending too much time on it i would like to have your opinion:
My app will many cities and each of them will contain a comprehensive list of places (restaurant, bars, museums, etc.)
So i am looking for a way to display and save a list on each type of places so that I can implement my own system of reviews.
The fields I would need to retrieve are: Name, Type, Address, GPS, photo, country and city.
To have a comprehensive list, the radar search seems appropriate, but seems limited in terms of fields, and using the nearby, 20 is definitely not enough… (I may be wrong but that’s my understanding)
My other idea was to have an input with an autocomplete searching for Places, and once saved, it saves the required fields, but no idea if that is feasible… (and will be time consuming)
As you seem well informed on the Google Places stuffs, may i ask you what you think of this matter?
Thanks a lot! I went for the first option and it works quite well. I still need to come up with a “clever” way to build the general data structure but this is big step for me
The only “issue” I have is that I do have the standard key to run the google places API, but i can’t find where to get the 2 other keys you used (Photoreference and placeid)?
@NigelG
I was kind of wondering the same thing. I see that in the google places API you can access the phone # of a location, the address, hours of operation, etc. But those don’t seem to be available in bubble. Do I need to use bubble’s API connector to be able to get those fields and use them?
Thanks a bunch @NigelG! I’ll give that a shot. I’m curious though, in the last photo, under parameters, for key ‘placeid’, where does the number in the value field come from? Is that a key given by google? Also, what does Client-safe check-mark mean?
That PlaceId in the API is a real PlaceId that is used to populate bubble’s data. So you pop a PlaceId in, and hit Validate and bubble knows what data to use.
Then in the Design tab you replace that “dummy” PlaceId with the actual PlaceId from your locations.
“Client Safe” refers to whether the parameter is able to be sent to the browser or not. In this case the Place ID is not anything secret, so it is client safe and we have the option to set it on the front end. However the API key is secret, and we don’t want it visible, so it isn’t client safe and is hidden on the server. Therefore we don’t have the option to overwrite it on the front end.