Skip to main content

IP Geolocation API: Turn Any IP Into Location Data

Send an IP address, get back country, region, city, ISP, and network details in clean JSON. Free to start, with higher limits and VPN/proxy detection on Pro. Programmatic API keys are in preparation.

Get API Access → Try a Free Lookup

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:

FieldExampleNotes
country / country_codeUnited States / USHighest confidence field.
regionCaliforniaState or province.
cityMountain ViewBest estimate — often metro-level.
latitude / longitude37.40, -122.07Approximate centroid, not exact.
timezoneAmerica/Los_AngelesUseful for localization.
asnAS15169Autonomous System of the network.
isp / organizationGoogle LLCWho owns the address block.
Not available yet. Programmatic API access is in preparation and is not currently included in any plan. The endpoint below answers 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
}
Free to try: You can run interactive lookups right now on the IP Impala homepage — no key needed. API keys for programmatic access are not being issued yet; see the notice above.

The honest truth about accuracy

Every reputable IP geolocation service should be upfront about this, so here it is plainly:

IP geolocation is an estimate, not a GPS fix. Country-level accuracy is typically 95–99%. City-level accuracy is much lower and varies widely by region — a result often lands in the right metro area rather than the exact town. It never returns a street address or identifies a specific household.

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:

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:

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.

Related tools & guides