ipgeolocation.io API
IP geolocation plus timezone and astronomy data with a free plan.
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
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 -s "https://api.ipgeolocation.io/ipgeo?apiKey=$IPGEO_KEY&ip=8.8.8.8"
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_code2 | Country name and ISO alpha-2 |
| city / state_prov / zipcode | Locality detail |
| latitude / longitude | Coordinates as strings |
| time_zone.name / time_zone.offset | IANA zone and UTC offset |
| currency.code / currency.symbol | Local currency |
Common errors
| 401 | Missing or invalid apiKey. |
| 423 | The IP is a bogon/private address. |
| 429 | Daily request limit reached. |
| 400 | Malformed 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.