# Select from Google Places

**URL:** <https://community.glideapps.com/t/select-from-google-places/74945>\
**Category:** Ask for Help\
**Created:** [July 16, 2024, 12:08pm UTC](https://community.glideapps.com/t/select-from-google-places/74945 "2024-07-16T12:08:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![danego](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@danego](https://community.glideapps.com/u/danego)\
**Post date:** [July 16, 2024, 12:08pm UTC](https://community.glideapps.com/t/select-from-google-places/74945/1 "2024-07-16T12:08:48Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 16, 2024, 11:15pm UTC](https://community.glideapps.com/t/select-from-google-places/74945/2 "2024-07-16T23:15:29Z")

</div>

How do you actually let them “select” it? Do you have a pre-defined list of choices, or your setup is different?

---

<div class="post-metadata">

**Author:** ![danego](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@danego](https://community.glideapps.com/u/danego)\
**Post date:** [July 17, 2024, 8:32am UTC](https://community.glideapps.com/t/select-from-google-places/74945/3 "2024-07-17T08:32:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 17, 2024, 9:46am UTC](https://community.glideapps.com/t/select-from-google-places/74945/4 "2024-07-17T09:46:00Z")

</div>

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”.

---

<div class="post-metadata">

**Author:** ![danego](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@danego](https://community.glideapps.com/u/danego)\
**Post date:** [July 17, 2024, 9:57am UTC](https://community.glideapps.com/t/select-from-google-places/74945/5 "2024-07-17T09:57:42Z")

</div>

Where do I put that link? (Thanks!) I do not need to have a Google Places API key?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 17, 2024, 10:02am UTC](https://community.glideapps.com/t/select-from-google-places/74945/6 "2024-07-17T10:02:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![danego](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@danego](https://community.glideapps.com/u/danego)\
**Post date:** [July 17, 2024, 10:11am UTC](https://community.glideapps.com/t/select-from-google-places/74945/7 "2024-07-17T10:11:44Z")

</div>

Ok. I do have a Google Place API Key. I’m on the Maker Plan (Glide). Then, what do I need to do?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 17, 2024, 12:50pm UTC](https://community.glideapps.com/t/select-from-google-places/74945/8 "2024-07-17T12:50:34Z")

</div>

```auto
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](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.
