# 🌐 IP Geolocation & Nighttime Plugins

**URL:** <https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984>\
**Category:** Showcase\
**Created:** [December 30, 2020, 2:31am UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984 "2020-12-30T02:31:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Appkit](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/appkit/32/74099_2.png) [@Appkit](https://forum.bubble.io/u/Appkit)\
**Post date:** [December 30, 2020, 2:31am UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/1 "2020-12-30T02:31:52Z")

</div>

Hi Bubblers, we’ve released a free plugin. 👰 👨‍✈️  
No sign up or API keys required, you don’t need to ask for the user’s permission & best request limit we found. For example [Geo.ipify.](http://geo.ipify.org/pricing) offers only 1000 queries per month. With [Freegeoip](https://freegeoip.live/) you’re allowed up to **50,000** queries per hour! We used a service from [Cloudflare](https://1.1.1.1/cdn-cgi/trace) to get the user’s IP, doesn’t seem to be blocked by client and is accurate even when using vpns.

> **[IP Geolocation Plugin for Bubble](https://bubble.io/plugin/ip-geolocation-1609292923286x875371992761761800)**
>
> IP Geolocation Plugin page on Bubble. Add IP Geolocation in one click to your app. Bubble lets you build web apps without any code.

* * *

```
    $.get('https://1.1.1.1/cdn-cgi/trace', function (data) {
            const regex = /^(?:ip)=(.*)$/gm;
            let ip = "";
            match = regex.exec(data);
            while (match != null) {
                ip = match[1];
                match = regex.exec(data)
            }
            $.getJSON(`https://freegeoip.live/json/${ip}`, function (data) {
                    let response = {
                        "_p_City": data.city,
                        "_p_Country Code": data.country_code,
                        "_p_Country Name": data.country_name,
                        "_p_IP": data.ip,
                        "_p_Latitude": data.latitude,
                        "_p_Longitude": data.longitude,
                        "_p_Metro Code": data.metro_code,
                        "_p_Region Code": data.region_code,
                        "_p_Region Name": data.region_name,
                        "_p_Timezone": data.time_zone,
                        "_p_Zip Code": data.zip_code
                    };
                    instance.publishState('data', response)
                })
        })
```

---

<div class="post-metadata">

**Author:** ![yorgio1024](https://avatars.discourse-cdn.com/v4/letter/y/f17d59/32.png) [@yorgio1024](https://forum.bubble.io/u/yorgio1024)\
**Post date:** [December 30, 2020, 2:48am UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/2 "2020-12-30T02:48:44Z")

</div>

Very helpful ✨

---

<div class="post-metadata">

**Author:** ![Appkit](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/appkit/32/74099_2.png) [@Appkit](https://forum.bubble.io/u/Appkit)\
**Post date:** [December 30, 2020, 5:44pm UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/3 "2020-12-30T17:44:07Z")

</div>

We made another plugin reusing this code to [calculate sun position](https://github.com/mourner/suncalc). The element returns simple yes/no state, helpful for designing automatic dark/light UI.

> **[Nighttime Plugin for Bubble](https://bubble.io/plugin/nighttime-1608994138405x254449244651126800)**
>
> Nighttime Plugin page on Bubble. Add Nighttime in one click to your app. Bubble lets you build web apps without any code.

---

<div class="post-metadata">

**Author:** ![myflappd](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@myflappd](https://forum.bubble.io/u/myflappd)\
**Post date:** [December 30, 2020, 9:22pm UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/4 "2020-12-30T21:22:10Z")

</div>

@Appkit Can you please create a page to show how to extract zip/postal code using this plugin?

---

<div class="post-metadata">

**Author:** ![Appkit](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/appkit/32/74099_2.png) [@Appkit](https://forum.bubble.io/u/Appkit)\
**Post date:** [December 30, 2020, 9:31pm UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/5 "2020-12-30T21:31:25Z")

</div>

Hi Sumit, it’s still working for us, did you add the element onto the page?

![image](https://us1.discourse-cdn.com/bubble/original/3X/9/c/9caef123465c57136216da1a92a2d58cf94e44f1.png)

> **[Bubble Editor - Appkit](https://bubble.io/page?type=page&name=test&id=appkit&tab=tabs-1)**
>
> Build stuff without code and launch a startup without a tech-cofounder! Bubble is a visual programing language. Instead of typing code, use a visual editor to build applications.

[https://appkit.bubbleapps.io/test?debug\_mode=true](https://appkit.bubbleapps.io/test?debug_mode=true)

Also to mention, postcodes may not be 100% accurate but close to the current user’s location, see this [https://www.quora.com/Is-it-correct-that-IP-address-geolocation-only-gives-an-ISP-server-location?share=1](https://www.quora.com/Is-it-correct-that-IP-address-geolocation-only-gives-an-ISP-server-location?share=1). For us the post code is close (city) but not exact.

---

<div class="post-metadata">

**Author:** ![myflappd](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@myflappd](https://forum.bubble.io/u/myflappd)\
**Post date:** [December 31, 2020, 6:22am UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/6 "2020-12-31T06:22:09Z")

</div>

@Appkit Thank you! That’s very helpful. I figured out the mistake I was making.

---

<div class="post-metadata">

**Author:** ![Appkit](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/appkit/32/74099_2.png) [@Appkit](https://forum.bubble.io/u/Appkit)\
**Post date:** [January 1, 2021, 9:40am UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/7 "2021-01-01T09:40:58Z")

</div>

Added sunlight definition 🙂

![image](https://us1.discourse-cdn.com/bubble/original/3X/a/a/aa4651fc62a912b74ec3c6dadc05266c450f61bb.png)

---

<div class="post-metadata">

**Author:** ![ZeroqodeSupport](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zeroqodesupport/32/88962_2.png) [@ZeroqodeSupport](https://forum.bubble.io/u/ZeroqodeSupport)\
**Post date:** [November 17, 2022, 8:24am UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/8 "2022-11-17T08:24:28Z")

</div>

Hi Bubblers, some good news here! 🥳  
This plugin has been acquired by Zeroqode a while ago, and in a recent update become even more useful, getting more states to be used.  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/e/7/e71cd28e4ec94f6b870e7fd98e7d3e2ceb206f85.png)  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/b/c/bc40b6b78d4983038510df7cb44d2cf06f432336.png)

To check changes, please upgrade your plugin to the latest version (Version 1.13.0: Added more states) and give it a try.

In case there will be any plugin-related questions, the Zeroqode Support Team will be glad to help you 🤗

Have a good day!

Regards,  
Zeroqode Support Team

---

<div class="post-metadata">

**Author:** ![onfyre](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/onfyre/32/231412_2.png) [@onfyre](https://forum.bubble.io/u/onfyre)\
**Post date:** [August 21, 2023, 1:28pm UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/9 "2023-08-21T13:28:18Z")

</div>

Is the IP Geolocation Plugin for Bubble using [https://freegeoip.live](https://freegeoip.live)?

The plugin description says it’s using IPApi and to get an API for 1000+ per day using.

Which one is it?

1. [https://ipapi.co/](https://ipapi.co/)  
or
2. [https://ipapi.com/](https://ipapi.com/)

Thanks,  
Mickey

---

<div class="post-metadata">

**Author:** ![ZeroqodeSupport](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zeroqodesupport/32/88962_2.png) [@ZeroqodeSupport](https://forum.bubble.io/u/ZeroqodeSupport)\
**Post date:** [August 24, 2023, 7:12am UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/10 "2023-08-24T07:12:04Z")

</div>

Hi @onfyre,

Thank you for the question 🙂

No, IP Geolocation Plugin is using [https://ipapi.co/](https://ipapi.co/) to fetch the data via API.

> [@onfyre](#):
>
> The plugin description says it’s using IPApi and to get an API for 1000+ per day using.

The Free Plan on [https://ipapi.co/](https://ipapi.co/) allows you to pull up to 1,000 requests per day so 30,000 requests per month in total. If you require more than 1000 requests per day we suggest getting one of the paid plans which allows more versatility.

Cheers 🤗

---

<div class="post-metadata">

**Author:** ![diego.cambalache](https://avatars.discourse-cdn.com/v4/letter/d/71c47a/32.png) [@diego.cambalache](https://forum.bubble.io/u/diego.cambalache)\
**Post date:** [March 26, 2024, 5:51pm UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/12 "2024-03-26T17:51:59Z")

</div>

Hi!  
Today it stopped working did something happen?

---

<div class="post-metadata">

**Author:** ![ZeroqodeSupport](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zeroqodesupport/32/88962_2.png) [@ZeroqodeSupport](https://forum.bubble.io/u/ZeroqodeSupport)\
**Post date:** [March 27, 2024, 10:21am UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/13 "2024-03-27T10:21:16Z")

</div>

Hello @diego.cambalache,

Thank you for reaching out to us.

We’re truly sorry to learn about the challenges you’re encountering with our plugin. To better assist you, could you please describe the specific issue you’re facing? Also, it would be helpful if you could check your browser console for any error messages or alerts.

One possible cause for the problem might be exceeding the daily request limit, which is currently set at 1000 requests per day. To overcome this limitation, we suggest obtaining a paid API Access key directly from [ipapi.co](https://ipapi.co/#pricing). For detailed instructions on how to acquire and integrate this key into your application, please refer to our documentation here: [IP Geolocation Plugin Documentation](https://docs.zeroqode.com/plugins/ip-geolocation#4ae284942fee484da2afdf6cb0128ab4).

We hope this guidance is useful to you, please let us know about your findings.

Wishing you a wonderful day ahead!

Best regards,  
Zeroqode Support Team

---

<div class="post-metadata">

**Author:** ![tgotchi](https://avatars.discourse-cdn.com/v4/letter/t/f08c70/32.png) [@tgotchi](https://forum.bubble.io/u/tgotchi)\
**Post date:** [March 28, 2024, 6:15am UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/14 "2024-03-28T06:15:38Z")

</div>

Does Zeroqode support other free API such as [ip2location.io](https://www.ip2location.io)? It has keyless / tokenless API which is easier to use without sign-up.

---

<div class="post-metadata">

**Author:** ![ZeroqodeSupport](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zeroqodesupport/32/88962_2.png) [@ZeroqodeSupport](https://forum.bubble.io/u/ZeroqodeSupport)\
**Post date:** [March 28, 2024, 2:55pm UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/15 "2024-03-28T14:55:51Z")

</div>

Hello @tgotchi,

Thank you for reaching out and sharing your suggestion.

The current plugin is designed to work specifically with [ipapi.co](http://ipapi.co). Integrating with ip2location would require adapting to a different API architecture. Nevertheless, I’ve noted your idea of incorporating [ip2location.io](https://www.ip2location.io/) into this or a future plugin.

It’s worth mentioning that [ip2location.io](http://ip2location.io) offers the same number of free API queries per month as the ipapi service we currently use.

 ![Screenshot 2024-03-28 at 16.46.08](https://us1.discourse-cdn.com/bubble/original/3X/b/c/bc3e1b14440fba89505bd5806f9755b6d89238b1.png)

Thank you once again for bringing this to our attention. We truly appreciate your input.

Wishing you a wonderful day ahead!

Best regards,  
Zeroqode Support Team

---

<div class="post-metadata">

**Author:** ![deon1](https://avatars.discourse-cdn.com/v4/letter/d/f9ae1b/32.png) [@deon1](https://forum.bubble.io/u/deon1)\
**Post date:** [May 28, 2024, 10:57am UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/16 "2024-05-28T10:57:41Z")

</div>

Hi @ZeroqodeSupport,  
Is this plugin still functional?  
I cannot seem to make it work and the demo is also not working. Though the map updates to my approximate location.  
I confirmed my IP by navigating to [ipapi.co](http://ipapi.co), that shows my IP just fine.

---

<div class="post-metadata">

**Author:** ![ZeroqodeSupport](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zeroqodesupport/32/88962_2.png) [@ZeroqodeSupport](https://forum.bubble.io/u/ZeroqodeSupport)\
**Post date:** [June 4, 2024, 11:02am UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/17 "2024-06-04T11:02:05Z")

</div>

Hello @deon1, 👋

We apologize for the delayed reply. 🙏

We just checked the [live demo](https://appkit.bubbleapps.io/ip_geolocation) of the IP geolocation plugin and it’s working as expected. You can refer to the demo editor here: [Appkit | Bubble Editor](https://bubble.io/page?version=live&id=appkit&name=ip_geolocation&tab=tabs-1)

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/d/0/d03cd5d208b8d3932acea1459f2d0555833631ae.jpeg)  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/7/9/796331625a9efc4861ff6bbbf924b5f0d5b1bab0.jpeg)

It seems you’re having some trouble getting the plugin to work fully. Here is plugin documentation: [IP Geolocation](https://docs.zeroqode.com/plugins/ip-geolocation)

We’d be happy to help troubleshoot this further. Could you describe in more detail the issues you’re encountering? Any error messages or unexpected behavior would be helpful information.

Best regards,  
Zeroqode Support Team.

---

<div class="post-metadata">

**Author:** ![deon1](https://avatars.discourse-cdn.com/v4/letter/d/f9ae1b/32.png) [@deon1](https://forum.bubble.io/u/deon1)\
**Post date:** [June 4, 2024, 12:42pm UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/18 "2024-06-04T12:42:12Z")

</div>

Thanks for your response.  
I have gone through your documentation and I cannot figure out why I cannot see my IP with your app.  
Here is some screenshots of my setup:

 ![Screenshot 2024-06-04 at 14.34.18](https://us1.discourse-cdn.com/bubble/original/3X/1/8/18dae4b589676d147aa54f34795a589d70010b4b.png)  
 ![Screenshot 2024-06-04 at 14.31.48](https://us1.discourse-cdn.com/bubble/original/3X/5/f/5fff940d1e78d1e0122890978ca85cc26cb24394.png)  
 ![Screenshot 2024-06-04 at 14.37.03](https://us1.discourse-cdn.com/bubble/original/3X/6/4/646c777986ded33f7166acf77a63b64838aeda73.png)

And lastly the ipapi website to confirm it is available:

 ![Screenshot 2024-06-04 at 14.33.31](https://us1.discourse-cdn.com/bubble/original/3X/f/0/f0f5297d73fff99a2c1ff041586f013e1f1ea233.png)

---

<div class="post-metadata">

**Author:** ![ZeroqodeSupport](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zeroqodesupport/32/88962_2.png) [@ZeroqodeSupport](https://forum.bubble.io/u/ZeroqodeSupport)\
**Post date:** [June 4, 2024, 3:30pm UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/19 "2024-06-04T15:30:16Z")

</div>

Hi again @deon1, 👋

Thank you for your message.

To confirm, are the screenshots you sent showing your experience with [our live demo](http://appkit.bubbleapps.io/ip_geolocation?debug_mode=true), or your own Bubble application using our plugin?

For the live demo to function properly, it won’t require you to enter an API access key. However, if you’re using the plugin within your own Bubble app, you’ll need to enter an API access key from Ipapi and enter it into the designated field:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/9/9/99f0ef0a5c38b3254f1e1bf067934cac25150921.png)

Let us know if this clarifies things, and if you have any further questions!

Best regards,  
Zeroqode Support Team.

---

<div class="post-metadata">

**Author:** ![deon1](https://avatars.discourse-cdn.com/v4/letter/d/f9ae1b/32.png) [@deon1](https://forum.bubble.io/u/deon1)\
**Post date:** [June 4, 2024, 5:24pm UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/20 "2024-06-04T17:24:15Z")

</div>

Hi @ZeroqodeSupport, thanks for getting back to my so quickly.

The screenshots are from your live demo, but mine is identical.  
Do I need an API key from Ipapi if I want to use the free version? Since I cannot register without selecting a paid plan.

---

<div class="post-metadata">

**Author:** ![ZeroqodeSupport](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zeroqodesupport/32/88962_2.png) [@ZeroqodeSupport](https://forum.bubble.io/u/ZeroqodeSupport)\
**Post date:** [June 5, 2024, 3:48pm UTC](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984/21 "2024-06-05T15:48:23Z")

</div>

Hi @deon1, 👋

Thank you for the information. We’ve checked, and the plugin should work without the API keys as well.

Please note that in some cases, the current user’s IP might not be returned due to browser/security settings, third-party browser extensions, or VPN blocking services.

Could you please let us know which browser you are using? Additionally, please try testing in Chrome incognito mode to see if the issue persists.

Looking forward to your response.

Best regards,  
Zeroqode Support Team.

[Next page](https://forum.bubble.io/t/ip-geolocation-nighttime-plugins/127984.md?page=2)
