What Is IP Geolocation and How Accurate Is It?
IP geolocation is the process of mapping an IP address to a physical location — country, region, city, and sometimes latitude/longitude. It powers fraud detection, content personalisation, compliance geo-blocking, and analytics dashboards used by millions of applications every day.
How IP Geolocation Works
Every IP address is allocated by a Regional Internet Registry (RIR) such as ARIN, RIPE, or APNIC to an organisation (usually an ISP or cloud provider). Geolocation databases are built by correlating this allocation data with additional signals:
- WHOIS / RDAP records — the organisation and country registered with the RIR.
- BGP routing tables — which ASN announces the prefix and from where.
- Active probing — latency measurements to known reference points triangulate a geographic estimate.
- User-submitted data — opt-in corrections from ISPs and businesses.
What Data Does a Geolocation Lookup Return?
A typical response includes:
- Country — the most reliable field; accurate for >99% of IPs.
- Region / State — accurate to the correct region in ~85–90% of cases.
- City — accurate within 50 km for ~70–80% of consumer IPs, but far less reliable for mobile or VPN traffic.
- Latitude / Longitude — a centroid estimate for the city or region, not a precise coordinate.
- Time zone — derived from the country/region, highly reliable.
- ISP / Organisation — the entity that owns the IP block.
Accuracy Limits
IP geolocation has well-understood failure modes:
- VPNs and proxies geolocate to the VPN server, not the user's physical location.
- Carrier-grade NAT (CGNAT) means many users share one IP, and the geolocation reflects the ISP's routing hub, not the subscriber.
- Mobile networks route traffic centrally; a user in Manchester may geolocate to London.
- CDN and cloud IPs geolocate to the edge node, which is rarely where the end user is.
Using ResolvIP for Geolocation
ResolvIP's /ip/{ip}/geo endpoint returns geolocation data sourced from ip-api.com, a free geolocation service with broad IPv4 and IPv6 coverage. A typical response looks like:
GET https://api.resolvip.net/ip/8.8.8.8/geo
{
"city": "Mountain View",
"region": "California",
"country": "US",
"country_name": "United States",
"latitude": 37.386,
"longitude": -122.0838,
"timezone": "America/Los_Angeles",
"isp": "Google LLC"
}
Best Practices
Use country-level data for compliance and fraud rules — it is reliable. Treat city-level data as probabilistic and never use lat/lon as a precise location. Combine geolocation with ASN data (/ip/{ip}/asn) and proxy flags to build a richer picture of who is making a request.
Ready to query IP intelligence in your own application? Get a free API key →