IP geolocation guides for developers

Practical, code-first guides for working with IP data: choosing an IP geolocation API, detecting VPN, proxy and Tor users, verifying real Googlebot and GPTBot traffic, and blocking or redirecting visitors by country with Cloudflare, nginx, Next.js or an API.

Choosing a provider? Start with Best IP geolocation APIs in 2026, then see the head-to-head API comparisons.

More resources

IP geolocation API

Get this data in your app

ipbase returns location, ISP, ASN and time zone for any IPv4 or IPv6 address, up to 1,000 addresses per POST request. Security flags (VPN, proxy, Tor, data center) are on the Medium plan and above.

Read the documentation

1,000 free requests every month. No credit card required.

GET https://api.ipbase.com/v2/info?ip=1.1.1.1

{
  "data": {
    "ip": "1.1.1.1",
    "type": "v4",
    "connection": {
      "asn": 13335,
      "organization": "APNIC and Cloudflare DNS Resolver project",
      "isp": "Cloudflare, Inc",
      "range": "1.1.1.0/24"
    },
    "location": {
      "country": { "alpha2": "AU", "name": "Australia" },
      "zip": "4000"
    },
    "security": { "is_vpn": null, "is_tor": null, "threat_score": null }
  }
}

Get your free IP geolocation API key

Start with 1,000 free requests a month