Utilize Google Text Search API

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

The link to my project is here: Thunkable

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

1 Like

Assuming the Web API works, this block should fail

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.

I updated my project, here is the updated link: Thunkable

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 but still I am seeing “Null” for my API response. Could you advise?

1 Like

See my response from your project

This is the blocks I used

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

This worked wonderful thank you very much!

1 Like

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