API Directory › 🌍 Geo & Location › ipgeolocation.io
API KeyHTTPSCORS

ipgeolocation.io API

IP geolocation plus timezone and astronomy data with a free plan.

Auth
API Key
HTTPS
Yes
CORS
Yes
Open ipgeolocation.io docs ↗

What it does

ipgeolocation.io resolves IP addresses to location, timezone, currency and network details, and bundles related endpoints for timezone lookup by coordinates or zone name, astronomy (sunrise/sunset/moon) and user-agent parsing.

Base URL

https://api.ipgeolocation.io

Authentication

Sign up for a free API key and pass it as ?apiKey=YOUR_KEY. HTTPS is available on the free tier. Omit ip= to geolocate the caller.

Code examples

curl
curl -s "https://api.ipgeolocation.io/ipgeo?apiKey=$IPGEO_KEY&ip=8.8.8.8"
Python
import requests

r = requests.get("https://api.ipgeolocation.io/ipgeo",
                 params={"apiKey": KEY, "ip": "1.1.1.1",
                         "fields": "geo,time_zone,currency"}, timeout=10)
d = r.json()
print(d["country_name"], d["city"], d["time_zone"]["name"], d["currency"]["code"])

Rate limits & quotas

Free plan: roughly 1,000 requests/day (about 30k/month) with a modest per-second rate. Requesting fewer fields keeps responses small. Over the daily cap returns HTTP 429.

Key response fields

country_name / country_code2Country name and ISO alpha-2
city / state_prov / zipcodeLocality detail
latitude / longitudeCoordinates as strings
time_zone.name / time_zone.offsetIANA zone and UTC offset
currency.code / currency.symbolLocal currency

Common errors

401Missing or invalid apiKey.
423The IP is a bogon/private address.
429Daily request limit reached.
400Malformed IP or unknown fields value.

When to use it (and alternatives)

Pick it when you want location plus timezone and currency in one call — handy for localising prices and showing local time. For pure geolocation with bigger free volume, ipinfo is a strong alternative.

FAQ

Does the free tier support HTTPS?

Yes. Unlike some free IP APIs, ipgeolocation.io serves HTTPS on the free plan.

Can it tell me the user's local time?

Yes — the time_zone object includes the IANA name, current UTC offset, DST status and the current local time, so you don’t need a separate timezone API.

How accurate is the currency field?

It is the official currency of the detected country, not a per-user setting. Use it as a sensible default and let users override.

New to APIs?

Short guides for working with this API — and any other.

🛠️ Handy LarzOS tools

Free tools to help you work with this API.

IP LookupDNS Lookup

Related Geo & Location APIs

← Back

More Geo & Location APIs · All 196 APIs