IP Geolocation API
Transparent accuracy_radius_km and confidence, plus ASN and Tor exit, known VPN network, privacy relay and hosting/datacenter flags.
We do not invent “99% city accuracy.”
Free: 1,000 req/day · HTTPS · commercial OK
Example
Look up one IP and get location, network and traits in a single response:
$ curl -s https://api.networkdatalabs.com/v0/ip/8.8.8.8 \ -H "Authorization: Bearer YOUR_API_KEY" { "ip": "8.8.8.8", "version": "v0", "location": { "continent_code": "NA", "country_code": "US", "country": "United States", "is_eu": false, "region": "California", "region_code": "CA", "city": "Mountain View", "postal": null, "latitude": 37.422, "longitude": -122.085, "timezone": "America/Los_Angeles", "accuracy_radius_km": 50.0, "confidence": "medium" }, "network": { "asn": 15169, "as_org": "Google LLC", "isp": "Google LLC", "organization": "Google LLC", "network": "8.8.8.0/24" }, "traits": { "is_anycast": true, "is_hosting": true, "is_mobile": false, "is_satellite": false, "is_bogon": false, "is_proxy": false, "is_vpn": false, "is_tor": false, "is_relay": false } }
8.8.8.8 is an anycast public DNS resolver, answered from many places at once, so the response says so: is_anycast is true, the radius is 50 km and confidence is medium. When we can’t be precise, the response tells you.
Have a list? POST /v0/bulk takes up to 100 IPs per request with the same schema; a bad IP shows up under errors without failing the batch, and each IP counts toward the daily quota.
Response fields
- Geo — continent, country, region, city, postal, lat/lon, timezone,
is_eu. Only need the country? See the IP to country API. - Honesty fields —
accuracy_radius_kmandconfidence(high|medium|low|unknown) - Network — ASN, AS org, ISP, organization, prefix, RIR
- Traits —
is_tor(current Tor exit nodes),is_vpn(known VPN networks, including major commercial VPN providers),is_relay(privacy relay),is_hosting(hosting/datacenter detection),is_satellite(satellite internet),is_mobile(mobile carrier networks; estimate),is_bogon(private / reserved ranges),is_anycast(well-known DNS resolvers)
Every field comes from the same GET /v0/ip/{ip} call, on every plan including Free.
What teams use it for
- Fraud & abuse — score Tor exit, known VPN, privacy relay and hosting/datacenter traffic, plus IP-country mismatches, with explicit flags (see the VPN detection API)
- Compliance — country / EU signals with a stated accuracy radius
- Localization — language and content defaults without overclaiming city precision
What it doesn’t do
- City is an estimate. City, postal code and coordinates are a best guess. When
accuracy_radius_kmis wide, build on country and region instead. - Behind a VPN, it’s the exit’s location. The IP belongs to the VPN, Tor or relay exit, so the location is the exit’s, not the user’s. Check
is_vpn,is_torandis_relay. - Some IPs can’t be placed. Location fields can be
null, so code a fallback.
Let accuracy_radius_km and confidence decide how much precision your feature relies on.
FAQ
Is it the same API as IP to country and VPN detection?
Yes. It’s one GET /v0/ip/{ip} call that returns location, network and traits together.
The IP to country and VPN detection pages focus on the fields each use case needs.
Does it support IPv6?
Yes. GET /v0/ip/{ip} and POST /v0/bulk accept both IPv4 and IPv6 addresses
(for example 2001:4860:4860::8888). Malformed IPs return 400 INVALID_IP.
Is there a free plan?
Yes: 1,000 requests per UTC day with the full response schema, commercial use OK. In bulk, each IP counts as one request toward the daily quota.
Start building
Sign up for a free account, or read the quickstart and full reference in the docs.
Related APIs
- IP to Country API — country code, name, continent and
is_eufor any IP - VPN Detection API — known VPN network, Tor exit, privacy relay and hosting flags
- ASN Lookup API — ASN, ISP and organization for any IP, plus Autonomous System detail
- IP Fraud Detection API — VPN, Tor, privacy relay, hosting and geo signals for signup, login and payment risk
- MaxMind & IPinfo alternative — what Network Data Labs offers if you’re comparing IP geolocation APIs
- API Docs — quickstart, endpoints and the full field reference