Best Free IP Geolocation APIs in 2026: Real Accuracy Test
We tested eight free or freemium IP geolocation APIs (ipapi.co, ip-api.com, ipinfo.io, ipgeolocation.io, ipstack, MaxMind GeoLite2, db-ip, AbstractAPI) on free quota, HTTPS support, fields returned, and city-level accuracy. None reliably break 80 percent at the city level in independent tests. Pick MaxMind GeoLite2 for self-hosting, ipinfo.io for the cleanest free tier, and ip-api.com for quick prototypes with no key.
Every free IP geolocation API will happily tell you which city an IP belongs to. Fewer than half of them are right more than 75 percent of the time at that resolution. That is the honest baseline for 2026. The comparison below is built around real free-tier limits, the fields each provider returns, and accuracy numbers from independent tests rather than vendor marketing pages.
How to read an IP geolocation API
Most providers expose a simple REST endpoint: you send an IP (or omit it to look up the caller), you get JSON back. The interesting differences sit in three places.
- Quota and auth. Some APIs work without a key (ip-api.com), others require a free account (ipinfo, ipgeolocation), and a few only ship as a downloadable database (MaxMind GeoLite2, db-ip Lite).
- Field richness. Country and city are table stakes. Latitude and longitude, ASN, timezone, currency, calling code, ISP name, mobile or proxy flags, and the new connection type field are where providers differentiate.
- Accuracy. Vendors publish optimistic numbers based on their own validation sets. Independent tests usually show 5 to 20 percent lower city accuracy. Country accuracy is uniformly above 95 percent everywhere.
For background on why these numbers vary so widely, see our companion piece on how accurate IP geolocation really is, which goes deep on the underlying data sources (BGP routing, ISP delegations, MaxMind crowdsourcing).
The eight providers compared
| Provider | Free quota | HTTPS | Key required | Notable fields |
|---|---|---|---|---|
| ip-api.com | 45 req/min from one IP | Paid tier only | No | ISP, org, ASN, mobile, proxy |
| ipapi.co | 1,000 req/day | Yes | Optional | Currency, languages, calling code |
| ipinfo.io | 50,000 req/month | Yes | Yes (free) | ASN, hostname, company (paid) |
| ipgeolocation.io | 1,000 req/day | Yes | Yes (free) | Timezone, currency, security flags |
| ipstack | 100 req/month | Paid only | Yes (free) | Connection, security (paid) |
| MaxMind GeoLite2 | Unlimited (self-hosted) | N/A (local) | Yes (free) | Country, city, ASN database |
| db-ip Lite | Unlimited (self-hosted) or 1,000 req/day API | Yes | Yes (free) | Country, city, ISP |
| AbstractAPI | 20,000 req/month | Yes | Yes (free) | Currency, flag, timezone, security |
Quotas were checked against the providers' public pricing pages in May 2026. They change often; treat the table as a snapshot.
Accuracy: the part nobody likes to publish
Independent academic work (the IMC 2011 study by Poese et al. remains the most cited baseline, and follow-up tests through 2024 broadly confirm its shape) reports the following ranges for free or freemium IP databases:
| Granularity | Typical accuracy (free tier) | Best paid tier |
|---|---|---|
| Country | 97 to 99.5 percent | 99.8 percent |
| Region or state | 75 to 88 percent | 90 to 93 percent |
| City | 55 to 78 percent | 75 to 82 percent |
| Within 25 km | 60 to 80 percent | 80 to 88 percent |
| Within 5 km | 20 to 45 percent | 40 to 60 percent |
Notice the gap between city and within 5 km: a provider can report the correct city name and still place a pin 30 km from the actual user. Mobile carriers, satellite ISPs, and CGNAT make the bottom rows worse. These trade-offs also drive how streaming services detect VPNs, because they rely on the same databases.
⚠️ No free API reliably hits 80 percent city accuracy across all regions. Anything you build on top of one needs to tolerate a wrong answer.
Provider-by-provider notes
ip-api.com
The pragmatic choice for prototypes. No key, generous 45 requests per minute, exposes ASN and ISP. The catch: HTTPS is paid-only on the free tier, which is a real problem for anything client-side or production-grade. Use it for backend lookups behind your own TLS, never directly from a browser.
ipapi.co
Clean JSON, HTTPS on the free tier, 1,000 requests per day without a key. Returns currency, calling code, and languages, which is handy for ecommerce localization. Accuracy is roughly mid-pack.
ipinfo.io
The free tier of 50,000 requests per month is the most generous in the list and HTTPS is on by default. Country and city data is good in North America and Europe; less reliable in parts of Africa and South Asia. Their paid company and privacy datasets are widely used by fraud teams, which is partly why so many VPNs get caught.
ipgeolocation.io
1,000 requests per day, HTTPS, key-based. Strong on security flags (Tor, proxy, hosting), which is useful if you are screening signups. City accuracy is comparable to ipapi.co.
ipstack
Only 100 requests per month on the free plan and no HTTPS without paying makes ipstack a poor fit for serious testing. The paid tiers are competitive on features, but you can do better elsewhere for free.
MaxMind GeoLite2
The most widely deployed IP database on the planet. Free, requires a registered license key for downloads since 2019, ships as a binary .mmdb file that your own service queries locally. Zero per-request cost, no rate limits, full offline support. The downside is that you have to refresh the database weekly to keep up with reassignments. See the official MaxMind GeoLite2 page for terms.
db-ip
Offers both a free Lite database (monthly updates, CC-BY licensed) and an API. The Lite file is a credible alternative to GeoLite2 if you want a second source for cross-checks. API accuracy is similar to ipapi.co at city level.
AbstractAPI
Newer entrant with a 20,000 request per month free tier and HTTPS. JSON shape is friendly, the dashboard is clean, but third-party benchmarks place city accuracy a few points below ipinfo. Reasonable second choice.
Choosing one
Pick based on workload pattern, not on a vendor's accuracy claim.
- Backend service with predictable volume: MaxMind GeoLite2 or db-ip Lite, self-hosted. No rate limits, no surprise bills.
- Client-side widget: ipapi.co or ipinfo.io (both ship HTTPS on the free tier). Never call ip-api.com or ipstack directly from a browser without HTTPS.
- Fraud or abuse screening: ipinfo.io or ipgeolocation.io for the proxy and hosting flags, ideally cross-checked against MaxMind.
- Prototype or one-off: ip-api.com. No key, fastest to integrate.
💡 In production, query two providers and only trust the result when they agree. The disagreement rate at city level is roughly 20 to 30 percent, which is itself a useful confidence signal.
Pitfalls when using any of them
Three failure modes show up over and over again.
- CGNAT and mobile pools: the IP your API sees may belong to a regional aggregation point hundreds of kilometres from the actual user. This is increasingly common as IPv4 exhaustion bites, as covered in our IPv4 vs IPv6 explainer.
- VPN and proxy traffic: location reflects the exit node, not the user. The privacy implications are covered in what your IP actually reveals and in our overview of how a VPN works.
- Stale data: IP blocks get sold, reassigned, and reused. A free database that updates monthly will have stale entries for any block that changed hands recently. This is the same root cause behind some famous geolocation disasters.
Legal and policy notes
IP geolocation is not personal data in most jurisdictions on its own, but as soon as you combine it with a user account or cookie it becomes personal data under GDPR. Most providers offer EU-hosted endpoints or data processing agreements on paid tiers. Free tiers usually do not. If you operate in the EU, that alone may force you toward a self-hosted MaxMind setup. Related reading: is using a VPN legal covers the user side of the same regulatory landscape.
Bottom line
For most projects the right answer is boring: self-host MaxMind GeoLite2 and add ipinfo.io as a fallback for fields it does not cover. You will get country accuracy in the high 90s, city accuracy in the 70s, no surprise bills, and offline capability. Whatever you pick, build your application assuming the location is approximate, because in 2026 it still is.
Frequently asked questions
Which free IP geolocation API has the highest city accuracy?
Across independent tests in 2024 and 2025, ipinfo.io and MaxMind GeoLite2 tend to lead the free tier at city level, both landing in the 70 to 78 percent range in North America and Western Europe. Neither reliably reaches 80 percent globally. Accuracy drops noticeably in Africa, South Asia, and on mobile networks regardless of provider. The honest answer is to test two providers against your own user population before committing.
Is it legal to use IP geolocation data?
Yes, in most jurisdictions IP geolocation on its own is not regulated personal data. Under GDPR in the EU, however, an IP address combined with any other identifier (cookie, account ID, fingerprint) becomes personal data and triggers consent and data-processing obligations. Most free APIs are hosted in the US and offer no DPA on the free tier, which can be a compliance blocker. Self-hosting MaxMind or db-ip Lite avoids the data transfer issue entirely.
Why does the API place my visitor in the wrong city?
Three usual suspects: CGNAT (one IP shared across a wide region), mobile carriers (traffic exits through one or two national gateways), or a recently reassigned IP block whose database entry is stale. Sometimes the database simply assigns the country's centroid when it lacks city data, which is why so many users appear to live in the geographic middle of nowhere. Cross-checking with a second provider usually exposes the problem.