IP geolocation API with city and ASN for any IP
Send an IPv4 or IPv6 address, or no address at all to locate the caller, and get city, region, country, coordinates, ASN and network as JSON.
What it does
City, region, coordinates, ASN, and network for any IPv4 or IPv6 address, plus country details and Tor exit and cloud or hosting flags. Call it without an IP to locate the calling device.
- GET /v1/ip
- GET /v1/ip/{ip}
- GET /v1/ip/{ip}/{field}
Limits: Postal code stays null for looked-up IPs. Time zone comes from the city coordinates. No VPN or residential proxy detection: is_hosting only covers published cloud ranges and known hosting networks.
Use cases
- Pre-fill country, currency and calling code in signup and checkout forms.
- Show prices in the visitor's currency or pick a default language.
- Tag log lines and analytics events with country, city and ASN.
- Spot logins from an unexpected country or network.
Data sources and freshness
DB-IP IP to City Lite, IP to Country Lite and IP to ASN Lite (CC BY 4.0).
Databases are refreshed monthly.
How it compares
If you are comparing ipapi.co, ipinfo.io, ip-api.com or MaxMind GeoLite2: LiveAPI gives city and ASN lookups for any IP over a simple REST API, and the same token also covers countries, phones, exchange rates and more. It flags Tor exits and cloud or hosting networks but does not offer VPN/residential proxy detection or a self-hosted database download.
Pricing
Every new account gets 100 free calls. Packs of 10,000 ($5), 100,000 ($15) and 250,000 calls ($29) never expire, or choose Unlimited for $39 a month. Only successful responses use a call. See pricing.
FAQ
Does it work for any IP, not only the caller's?
Yes. GET /v1/ip/{ip} looks up any IPv4 or IPv6 address and returns city, region, country, coordinates, ASN and organization. GET /v1/ip without an address locates the calling device.
Where does the IP data come from?
From the DB-IP Lite databases (country, city and ASN) under CC BY 4.0. LiveAPI refreshes them every month.
Can I get a single field as plain text?
Yes. GET /v1/ip/{ip}/{field}, for example /v1/ip/8.8.8.8/country, returns one field as plain text.
Does it detect Tor, VPNs or proxies?
Every response has is_tor (Tor Project exit list, refreshed hourly) and is_hosting with hosting_provider (published AWS, Google Cloud, Azure, Cloudflare, Oracle and DigitalOcean ranges plus hosting networks such as Hetzner and OVHcloud by ASN). There is no VPN or residential proxy flag, because no open source can say that honestly.
How much does it cost?
Every new account gets 100 free calls. Packs start at $5 for 10,000 calls and never expire, or use Unlimited for $39 a month. Failed requests are free.