How to Generate a Place's Address (Specifically Zip Code) with Latitude and Longitude

Hi! I am trying to generate the zip code of a particular location based on its latitude and longitude.

Here is the context of this part of my app:
The screen opens and the user’s current location is displayed on a map. (The latitude and longitude that are going to be used are calculated when the user’s current location is determined.)

I then plan to have a list of stores below the map that also have markers on the map and are in the same zip code as the user. I have the addresses of all the stores in an Airtable Database and an Airtable Invisible Component. One of the columns in the Database/Invisible Component regarding the stores’ addresses includes the zip code.

I plan to display the stores in a Data Viewer List. I also plan to display a store on the map using a location marker when it is clicked on in the Data Viewer List.

I already know how to put markers on the map, but I would just like to know how to generate zip code from longitude and latitude.

Thanks! :grinning:

Also, if I need to get an API key to generate the zip code, could you show me how to do that step-by-step? I would really appreciate it.

What I was trying to do is called reverse geocoding. I discovered a great Thunkable Discussion thread that answered my questions. Just change “country” to “postcode”.

Hi, I am trying to geocode in Thunkable, where I take the address of a place and get the latitude and longitude coordinates of it. I used the discussion post below as a reference for the reverse geocoding I did, but I am struggling to execute geocoding. I am currently using an OpenCage API Url.
Thanks! :slightly_smiling_face:

This is the post I used to help with reverse geocoding:

1 Like

Hey @megnelaz :wave:

does the OpenCage API support geocoding? If not, have you managed to find an API that does?

Yes, the OpenCage API Url supports geocoding. I am just not sure how to structure my API Url so that it works when I put the place’s address into it.