An IP geolocation API lets your application look up where an IP address is — its country, region, and city — plus the ISP and network behind it, all in a single request. It's the building block for content localization, fraud scoring, analytics, and geo-aware features. Below is how it works, a real request/response example, an honest note on accuracy, and how to get an API key.
What an IP geolocation API returns
You send an IP address; the API responds with structured JSON. The core fields are consistent across most providers:
| Field | Example | Notes |
|---|---|---|
| country / country_code | United States / US | Highest confidence field. |
| region | California | State or province. |
| city | Mountain View | Best estimate — often metro-level. |
| latitude / longitude | 37.40, -122.07 | Approximate centroid, not exact. |
| timezone | America/Los_Angeles | Useful for localization. |
| asn | AS15169 | Autonomous System of the network. |
| isp / organization | Google LLC | Who owns the address block. |
503 today. This page documents the request and response format so you can
build against it in advance — nothing here is being sold yet. Interactive lookups on the
IP Impala homepage work now, free, no key needed.
A simple request and response
Calling the API is a single authenticated HTTPS GET. Pass an IP and your API key; get JSON back:
# Request
curl "https://api.ipimpala.com/v1/lookup/8.8.8.8" \
-H "Authorization: Bearer YOUR_API_KEY"
# Response (JSON)
{
"ip": "8.8.8.8",
"country": "United States",
"country_code": "US",
"region": "California",
"city": "Mountain View",
"latitude": 37.4056,
"longitude": -122.0775,
"timezone": "America/Los_Angeles",
"asn": "AS15169",
"isp": "Google LLC",
"proxy": false,
"vpn": false
}
The honest truth about accuracy
Every reputable IP geolocation service should be upfront about this, so here it is plainly:
Why the gap? IP-to-location mapping is inferred from registry data, network routing, and provider-supplied hints — not from the device itself. Several things routinely skew results:
- Mobile networks route traffic through regional gateways, so a phone can appear dozens of miles from the user.
- Carrier-grade NAT shares one public IP across many subscribers.
- Corporate VPNs and cloud egress make a user look like they're at a datacenter.
- Consumer VPNs and proxies deliberately mask the true origin (which is why proxy/VPN detection matters).
The practical rule: use IP geolocation as a signal, and never as the sole basis for a decision with legal or financial consequences.
What developers build with it
Fraud & risk scoring
Compare the IP's country to the billing address, flag logins from unexpected regions, and — with VPN/proxy detection — score traffic that's hiding its origin. It's one input into a risk model, not a verdict on its own.
Content localization
Set a sensible default language, currency, or regional storefront on first visit, then let the user override. Great for reducing friction; not a substitute for explicit user preferences.
Analytics & segmentation
Enrich raw traffic logs with country, region, and ISP so you can see where demand actually comes from — without asking users for anything.
Compliance & access rules
Apply coarse, country-level routing (e.g., regional redirects). Because it's an estimate, pair it with stronger signals for anything legally binding.
Plans & limits
IP Impala has one plan and it is free. There is nothing to upgrade to:
Free
- 50 lookups per day
- Geolocation & ISP data
- VPN/proxy detection
- Bulk batches and CSV / JSON export
- Interactive map
Want to build with the API?
Programmatic access is not available yet. The endpoint and response format above show what is coming, and the lookup API currently answers 503 for every caller. Everything on the website works today, for free, within 50 lookups a day.
Look Up an IP Now →Frequently asked questions
What does an IP geolocation API do?
An IP geolocation API takes an IP address and returns an estimated physical location and network details in a structured format, usually JSON. Typical fields include country, region/state, city, approximate latitude and longitude, time zone, and the ISP or organization that owns the address. Developers call it from a server or app to localize content, estimate a visitor's region, or assess risk.
How accurate is IP geolocation?
Country-level accuracy is very high — typically around 95 to 99 percent. City-level accuracy is far lower and varies by region, often landing in the correct metro area rather than the exact town. IP geolocation never returns a street address or a specific household. Mobile networks, corporate VPNs, and carrier-grade NAT can shift the apparent location by many miles, so treat results as an estimate, not a precise fix.
Is there a free IP geolocation API?
Yes. IP Impala is free, with no paid plans. Everyone gets 50 lookups per day with geolocation, ISP data, VPN and proxy detection, bulk batches and CSV/JSON export. Programmatic API access is in preparation and is not available yet.
What format does the API return?
The API returns JSON. A typical response includes the queried IP, country and country code, region, city, approximate latitude and longitude, time zone, ASN, and the ISP or organization. Batched results can also be exported as CSV or JSON for offline processing.
Can an IP geolocation API detect VPNs and proxies?
Yes. IP Impala includes VPN and proxy detection for everyone, which flags when an IP belongs to a known hosting provider, anonymizer, or datacenter range rather than a residential ISP. This is useful for fraud scoring and for spotting traffic that is trying to hide its true origin.
Should I use IP geolocation for legal compliance or billing?
Use it as a signal, not a source of truth. Because IP geolocation is an estimate, do not rely on it alone for anything requiring a precise, verified location — such as tax jurisdiction, age-gating, or fraud decisions with real consequences. Combine it with other signals like billing address, device data, or explicit user confirmation.