# Utilize Google Text Search API

**URL:** https://community.thunkable.com/t/utilize-google-text-search-api/2408969
**Category:** Questions about Thunkable X
**Created:** [May 8, 2023, 5:58pm UTC](https://community.thunkable.com/t/utilize-google-text-search-api/2408969 "2023-05-08T17:58:19Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![steven.priggea6](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@steven.priggea6](https://community.thunkable.com/u/steven.priggea6)
#### Post date: [May 8, 2023, 5:58pm UTC](https://community.thunkable.com/t/utilize-google-text-search-api/2408969/1 "2023-05-08T17:58:19Z")

</div>

I am trying to utilize a Google Maps “Text Search” API with my Thunkable App. It seems I am unable to generate a response from the API though clearly when I go to the URL (see below) there is a response there:

[https://maps.googleapis.com/maps/api/place/textsearch/json?query=chipotle%2015222&key=AIzaSyCHsVSIIEPl0pfKJbECykBGZT26UB8AZxg](https://maps.googleapis.com/maps/api/place/textsearch/json?query=chipotle%2015222&key=AIzaSyCHsVSIIEPl0pfKJbECykBGZT26UB8AZxg)

The link to my project is here: [Thunkable](https://x.thunkable.com/copy/d2c1b2d8829b5263070cb9174de6d4b2)

My API key is already embedded in the API URL I pasted above.

So my goal is just to return the “Formatted Address” from the API and display those in my List Viewer.

Any help is appreciated!

Thanks,

Steve

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [May 8, 2023, 6:13pm UTC](https://community.thunkable.com/t/utilize-google-text-search-api/2408969/2 "2023-05-08T18:13:20Z")

</div>

Assuming the `Web API` works, this block should fail

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/4/644b78355fdd47d42efc43cd4683019c460a6c50.png)

The response from the API has 3 main JSON blocks

- html\_attributions
- results
- status

You are trying to loop through these keys and get the property of `result` from property `formatted_address` which does not exist in the response.

---

<div class="post-metadata">

### Author: ![steven.priggea6](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@steven.priggea6](https://community.thunkable.com/u/steven.priggea6)
#### Post date: [May 8, 2023, 6:20pm UTC](https://community.thunkable.com/t/utilize-google-text-search-api/2408969/3 "2023-05-08T18:20:40Z")

</div>

I updated my project, here is the updated link: [Thunkable](https://x.thunkable.com/copy/9107f29f10ad73a1157795cdcd387432)

What I am looking to do is get nested objects. As you will see in the response, formatte\_address is a nested object within the results array. I found some documentation on Thunkable’s website on how to return nested objects: [Objects - Thunkable Docs](https://docs.thunkable.com/objects#nested-values-and-values-from-arrays) but still I am seeing “Null” for my API response. Could you advise?

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [May 8, 2023, 6:35pm UTC](https://community.thunkable.com/t/utilize-google-text-search-api/2408969/4 "2023-05-08T18:35:33Z")

</div>

See my response from your project

 ![Screenshot_2023-05-08-21-34-21-14_2bbfbfee96a5dfce998f962ebb8b5da3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/2/42b27afb3a01ac29134ecf6d8373fb1564657802.jpeg)

This is the blocks I used

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/c/5c27da07a258e11a9e4b586eb7e1261064646f05.png)

I added a label just to show the error if available.

---

<div class="post-metadata">

### Author: ![steven.priggea6](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@steven.priggea6](https://community.thunkable.com/u/steven.priggea6)
#### Post date: [May 8, 2023, 6:48pm UTC](https://community.thunkable.com/t/utilize-google-text-search-api/2408969/5 "2023-05-08T18:48:58Z")

</div>

This worked wonderful thank you very much!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [August 6, 2023, 6:49pm UTC](https://community.thunkable.com/t/utilize-google-text-search-api/2408969/6 "2023-08-06T18:49:42Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
