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

**URL:** <https://community.thunkable.com/t/how-to-generate-a-places-address-specifically-zip-code-with-latitude-and-longitude/637589>\
**Category:** Questions about Thunkable X\
**Created:** [June 26, 2020, 3:29am UTC](https://community.thunkable.com/t/how-to-generate-a-places-address-specifically-zip-code-with-latitude-and-longitude/637589 "2020-06-26T03:29:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![megnelaz](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@megnelaz](https://community.thunkable.com/u/megnelaz)\
**Post date:** [June 26, 2020, 3:29am UTC](https://community.thunkable.com/t/how-to-generate-a-places-address-specifically-zip-code-with-latitude-and-longitude/637589/1 "2020-06-26T03:29:31Z")

</div>

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! 😀

---

<div class="post-metadata">

**Author:** ![megnelaz](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@megnelaz](https://community.thunkable.com/u/megnelaz)\
**Post date:** [June 26, 2020, 3:37am UTC](https://community.thunkable.com/t/how-to-generate-a-places-address-specifically-zip-code-with-latitude-and-longitude/637589/2 "2020-06-26T03:37:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![megnelaz](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@megnelaz](https://community.thunkable.com/u/megnelaz)\
**Post date:** [June 27, 2020, 1:35am UTC](https://community.thunkable.com/t/how-to-generate-a-places-address-specifically-zip-code-with-latitude-and-longitude/637589/3 "2020-06-27T01:35:15Z")

</div>

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

> [@Reverse Geocoding App - Get Location from Latitude/Longitude](http://community.thunkable.com/t/reverse-geocoding-app-get-location-from-latitude-longitude/82343):
>
> This tutorial will show you how to retrieve a location given a Latitude and Longitude. We will use the Location Sensor to get the Latitude and Longitude for this app. This app will return the country you are currently in. This app uses the OpenCageData API. You can get an API key for it [here](https://opencagedata.com/api). Design [Design] The Design for this app is extremely simple: A Button and a Label. You’ll need to add a Web API component and a Location Sensor to this app. Blocks The only variable we need for thi…

---

<div class="post-metadata">

**Author:** ![megnelaz](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@megnelaz](https://community.thunkable.com/u/megnelaz)\
**Post date:** [June 27, 2020, 3:34am UTC](https://community.thunkable.com/t/how-to-generate-a-places-address-specifically-zip-code-with-latitude-and-longitude/637589/4 "2020-06-27T03:34:58Z")

</div>

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! 🙂

---

<div class="post-metadata">

**Author:** ![megnelaz](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@megnelaz](https://community.thunkable.com/u/megnelaz)\
**Post date:** [June 27, 2020, 3:35am UTC](https://community.thunkable.com/t/how-to-generate-a-places-address-specifically-zip-code-with-latitude-and-longitude/637589/5 "2020-06-27T03:35:29Z")

</div>

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

> [@Reverse Geocoding App - Get Location from Latitude/Longitude](http://community.thunkable.com/t/reverse-geocoding-app-get-location-from-latitude-longitude/82343):
>
> This tutorial will show you how to retrieve a location given a Latitude and Longitude. We will use the Location Sensor to get the Latitude and Longitude for this app. This app will return the country you are currently in. This app uses the OpenCageData API. You can get an API key for it [here](https://opencagedata.com/api). Design [Design] The Design for this app is extremely simple: A Button and a Label. You’ll need to add a Web API component and a Location Sensor to this app. Blocks The only variable we need for thi…

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [June 27, 2020, 8:17am UTC](https://community.thunkable.com/t/how-to-generate-a-places-address-specifically-zip-code-with-latitude-and-longitude/637589/6 "2020-06-27T08:17:23Z")

</div>

> [@megnelaz](#):
>
> I am currently using an OpenCage API Url.

Hey @megnelaz 👋

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

---

<div class="post-metadata">

**Author:** ![megnelaz](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@megnelaz](https://community.thunkable.com/u/megnelaz)\
**Post date:** [June 28, 2020, 5:17pm UTC](https://community.thunkable.com/t/how-to-generate-a-places-address-specifically-zip-code-with-latitude-and-longitude/637589/7 "2020-06-28T17:17:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:25am UTC](https://community.thunkable.com/t/how-to-generate-a-places-address-specifically-zip-code-with-latitude-and-longitude/637589/8 "2024-11-08T11:25:24Z")

</div>


