| Ocalt Query Language
Pricing Dashboard ocalt.com v1.0

GEOIP — Geolocation

GEOIP performs IP geolocation using the MaxMind GeoLite2 database. In site mode, the visitor's IP is automatically available. Pass a specific IP string to look up any address.

VerbReturns
GEOIP ADDRESS SET ?ipVisitor's IP address string
GEOIP CITY SET ?cityCity name
GEOIP COUNTRY SET ?countryCountry name
GEOIP REGION SET ?regionState / province
GEOIP LAT SET ?latLatitude (number)
GEOIP LON SET ?lonLongitude (number). LNG is accepted as an alias.
GEOIP ALL SET ?geoFull object: {ip, city, country, region, lat, lon}
GEOIP "1.2.3.4" SET ?geoLook up a specific IP — returns full object

Client IP — in site mode

GEOIP ADDRESS SET ?ip AFTER GEOIP CITY SET ?city AFTER GEOIP COUNTRY SET ?country AFTER EMIT ?ip & " — " & ?city & ", " & ?country
Try it ›

Full geo object

GEOIP ALL SET ?geo AFTER EMIT ?geo
Try it ›

Look up a specific IP

GEOIP "8.8.8.8" SET ?geo AFTER EMIT ?geo(city) & ", " & ?geo(country) AFTER EMIT ?geo(lat) & " / " & ?geo(lon)
Try it ›