Comparison

Best IP geolocation APIs in 2026

API or local database? Free tier or flat rate? A comparison of the common IP geolocation options and how to choose.

Updated October 1, 2026 ยท 1 min read

We make ipbase, so we are not neutral. Prices from public pricing pages in October 2026.

OptionModelFreeNotes
ipbaseAPI150 requests / month, city level65,000 requests $9.99, 650,000 with security data $39.99
IPinfoAPI + databasesLite: unlimited country + ASNCity + VPN from $26 / 150,000 requests
MaxMind GeoIP2 / GeoLite2Downloadable database + web serviceGeoLite2 free with accountThe standard for on-premise lookups
ipstackAPILimited free planPart of apilayer
ip-apiAPIFree for non-commercial use, rate limitedPro plan for commercial use

How to choose

  1. Country only, huge volume: IPinfo Lite or a local GeoLite2 database.
  2. City + VPN/proxy detection at a predictable price: a flat-rate API such as ipbase.
  3. No outbound requests allowed: a local MaxMind database with weekly updates.
  4. Behind Cloudflare and only need the country: use the free CF-IPCountry header.

See ipbase vs IPinfo for a detailed comparison.

Frequently asked questions

What is the most accurate IP geolocation provider?

At country level, the major providers are all very accurate. At city level, accuracy varies by region and connection type; test with a sample of your own traffic before you decide.

Should I use a local GeoIP database or an API?

A local database (e.g. MaxMind GeoIP2 or GeoLite2) is fastest and works offline, but you must update it weekly. An API is always current, includes extras such as VPN detection and needs no maintenance.

IP geolocation API

Get this data in your app

ipbase returns location, ISP, ASN, time zone and security flags (VPN, proxy, Tor, data center) for any IPv4 or IPv6 address, up to 100 addresses per request.

150 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": false, "is_tor": false, "threat_score": 0 }
  }
}

Keep reading

Start using the IP Geolocation API for free today!

Get 150 requests / month for free