# GeoIP current visitor

**URL:** <https://community.hubspot.com/t/geoip-current-visitor/32249>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [February 24, 2021, 4:11pm UTC](https://community.hubspot.com/t/geoip-current-visitor/32249 "2021-02-24T16:11:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SRitchot](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sritchot/32/82797_2.png) [@SRitchot](https://community.hubspot.com/u/SRitchot)\
**Post date:** [February 24, 2021, 4:11pm UTC](https://community.hubspot.com/t/geoip-current-visitor/32249/1 "2021-02-24T16:11:17Z")

</div>

Hi,

I would like to know if there is a way for me to get the country ISO code, instead of the request.remote\_ip ([Hubspot variables](https://developers.hubspot.com/docs/cms/hubl/variables#http-request-variables)). Since, Hubspot smart rules do this (setting smart rules by country), I thought they might be a way for me to get that value, or should I use an api for this in my modules?

Simon

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [February 24, 2021, 6:35pm UTC](https://community.hubspot.com/t/geoip-current-visitor/32249/2 "2021-02-24T18:35:04Z")

</div>

Hi @SRitchot

Not sure if this is of any assistance, but there is also **request.geoip\_country**.

Maybe related to what you are doing, @prasadcolumbus asked this [question](https://community.hubspot.com/t5/CMS-Development/In-Hubl-language-how-to-get-country-code-or-country-name/td-p/304139) and @mansigovani also mentioned that variable

---

<div class="post-metadata">

**Author:** ![SRitchot](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sritchot/32/82797_2.png) [@SRitchot](https://community.hubspot.com/u/SRitchot)\
**Post date:** [February 24, 2021, 6:47pm UTC](https://community.hubspot.com/t/geoip-current-visitor/32249/3 "2021-02-24T18:47:14Z")

</div>

Hi @dennisedson ,

This is indeed what I was looking for, thank you so much. I was wondering if you knew were it was referenced in the HubSpot documentation. If I google the **request.geoip\_country** , I do get the community response you mentionned but I can’t seem to find a reference to this varaible in the Documentation.

Simon

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [February 24, 2021, 6:52pm UTC](https://community.hubspot.com/t/geoip-current-visitor/32249/4 "2021-02-24T18:52:25Z")

</div>

@SRitchot

Good question. I was looking for it also and couldn’t find it. Asked around and it appears it has never been officially documented. I believe I found it a few years ago on the developer slack group…

While looking through that slack group just now, I did see that someone said that it might not be the most reliable, though.
