IP geolocation guides
Practical guides on blocking or redirecting by country, verifying crawlers, detecting VPN users and using IP geolocation in JavaScript, Python and PHP.
Guide · fraud prevention
Detect VPN, proxy and Tor users
How VPN and proxy detection works, what to do with flagged users and how to add it to sign-up and checkout flows with an IP security API. With code.
Guide · bots
Verify Googlebot, Bingbot and GPTBot
Fake crawlers pose as Googlebot or GPTBot to get past bot protection. Verify real ones with the official IP lists or reverse DNS, with Cloudflare and code.
Tutorial
IP geolocation in JavaScript, Python and PHP
Get the country, city and ISP of a visitor's IP address in Node.js, Python and PHP: finding the real client IP behind proxies, calling the API and caching.
Guide · geo-blocking
Block or redirect visitors by country
Geo-block or geo-redirect visitors by country with Cloudflare rules, nginx and GeoIP2, Next.js middleware or an IP geolocation API in Express, with configs.
Comparison
Best IP geolocation APIs in 2026
ipbase, IPinfo, MaxMind GeoIP2, ipstack and ip-api compared: data, free tiers, pricing model and when to use a local database instead of an API.
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 Small plan and above.
Read the documentation150 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 }
}
}