Hello! I want my users to select a Restaurant/Bar/Hotel/Area and have all the related info. Google Places? How do I use it?
How do you actually let them “select” it? Do you have a pre-defined list of choices, or your setup is different?
I want them to choose from a pre/define list so it will be finite. Google Place I think might be the best options… what do you think? If agree, How do I do it?
Google Places is indeed the best option. You can fetch from this endpoint:
https://places.googleapis.com/v1/places:searchText
With the text query being something like “place name at address”.
Where do I put that link? (Thanks!) I do not need to have a Google Places API key?
You do need to have a Google Places API key. What plan are you on? If you don’t have access to Call API, then either a JavaScript column, or a Make scenario would do I guess.
Ok. I do have a Google Place API Key. I’m on the Maker Plan (Glide). Then, what do I need to do?
const body = JSON.stringify({
"textQuery": p2
});
var data = await fetch(p1, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Goog-Api-Key': 'your key here',
'X-Goog-FieldMask': '*'
},
body: body
});
const json = await data.text(); // or data.json();
return json;
p1 is https://places.googleapis.com/v1/places:searchText unless you want to use another end point.
p2 is your query.
And also enter your key, but please beware that this method isn’t safe and someone with enough technical ability can deep dive to get your API key.