12 Best IP Geolocation APIs for Developers in 2026

A comparison of the top IP geolocation APIs, from keyless options like IP-API to the MaxMind and IPinfo datasets, judged on the fields they return, IPv4 and IPv6 support, licensing, and current official pricing.

An IP geolocation API takes an IP address and gives back a structured record of where that address is and what network it belongs to. A typical response has

  • country, region, and city
  • coordinates with an accuracy radius
  • a timezone, the ISP, or the hosting company
  • the autonomous system number, and
  • flags for VPNs, proxies and Tor.

You call it from a signup form, a checkout, a log pipeline, or a CDN edge function and act on the answer.

Four jobs cover most of the demand.

  1. Localization picks a language, currency and timezone before the user does anything.
  2. Compliance and licensing rules gate access by country.
  3. Fraud and abuse checks look for a proxy, a datacenter range or a location that does not match the account.
  4. Analytics attributes traffic to regions without cookies.

None of these need a precise address; they need a reliable country and a usable guess at the city.

Country-level results are dependable, usually quoted in the high nineties. City-level is an inference drawn from routing data and ISP records. The vendors that publish a figure put it around 60 to 80 percent, and it falls further on mobile networks, carrier-grade NAT and anything behind a VPN.

Building this yourself involves crawling registries, parsing BGP tables, and refreshing it all constantly. This guide compares the best IP geolocation APIs on what they return, how they price it, and how they treat commercial use.

IP geolocation APIs compared

ProviderBest forFree tierEntry paid priceNotable
IPstackA mature, widely-integrated hosted API100 lookups/mo, dev only$12.99/mo, 50,000 lookupsapilayer product with an MCP server; ipapi.com is its twin
Abstract APILocation plus security in a signup flow1,000 requests/mo$19/mo, 200,000 requestsSeven security booleans, SOC 2 Type II, sub-20ms responses
ipdataFraud and abuse screening1,500 lookups/day, non-commercial$10/mo, 2,500 lookups/dayTen threat flags including iCloud Private Relay, ML trust score
WhoisXMLA database-backed feed with wide coverage1,000 queries$29/mo, 100,000 queriesQuery by IP, domain or email; one-time credit packs
IP-API.comA quick, keyless lookup45 req/min, HTTP, non-commercialEUR 13.30/mo on annual billingNo signup; JSON, XML, CSV; batch of 100
ipgeolocation.ioPredictable scaling with no feature gates1,000 credits/day$19/mo, 150,000 creditsSame fields on every paid plan; accuracy radius and confidence
IpregistryThe full response on any budget20,000 credits, one-time$29/mo, 100,000 creditsNo field gating; one-time packs; 12 SDKs and 8 frameworks
DB-IPChoosing between a hosted API and a local databaseEntry API tier plus a downloadable databaseEUR 8.29/mo, up to 50,000 req/dayFree downloadable database; place names in 50-plus languages
IPinfoMeasurement-based accuracy at city levelUnlimited country-level lookups$26/mo, 150,000 requestsProbe Net active measurement; accuracy radius on every record
MaxMindThe industry baseline datasetGeoLite: 1,000 lookups/day$0.0001 per query, pay as you goCreated GeoIP; GeoLite ships with many open-source tools
IP2LocationOne vendor for both an API and BIN databases50,000 lookups/mo, attribution$49/mo, 150,000 lookupsUp to 79 fields; AI-crawler detection; free LITE database
IPLocate.ioA flat-priced, fully ungated API1,000 requests/day, all fields$25/mo, 100,000 requestsNo feature gating; MCP server; free country and ASN databases

I evaluated each provider on what its API actually returns, IPv4 and IPv6 support, how it licenses free and paid use, and its current published rates for US customers. Pure geocoding services and the Wi-Fi and cell-tower APIs sold under a similar name were left out, since they do not take an IP address as input.

IPstack

IPstack is a long-running hosted API from apilayer, part of Idera. A lookup comes back as roughly 100 JSON fields covering location, currency, timezone, the connecting ISP and a security block. There are three request styles: a single IP, a batch, and a keyless call that returns the caller’s own location. apilayer also sells a nearly identical twin, ipapi.com, at the same prices. Microsoft, Airbnb, and Samsung are listed as its customers.

IPStack Geolocation API

Key Features

  • Single, bulk and requester lookup endpoints, the last of which needs no IP passed in.
  • IPv4 and IPv6 support across more than 200,000 cities.
  • A security module that flags VPNs, proxies and threat levels.
  • An official MCP server, so an AI agent can call the API as a tool without an SDK.
  • JSON or XML responses, with SDKs and a Postman collection.

Pros & Cons

PROS

A large ecosystem of tutorials, libraries and integrations grown over years.
You can show a visitor their own location without ever handling their IP yourself.
The MCP server is a real shortcut for anyone wiring the data into an agent.

CONS

The free key is development-only and does not permit commercial use.
VPN and threat flags are limited to the most expensive plan.
The free allowance covers a smoke test, not a running feature.

Pricing

Billed monthly; annual billing is up to 15 percent cheaper.
– Free: 100 lookups/month, development and testing only
– Basic: $12.99/month, 50,000 lookups
– Professional: $59.99/month, 500,000 lookups
– Professional Plus: $99.99/month, 2,000,000 lookups
– Custom: contact sales for higher volume

Abstract API

The Abstract IP Geolocation API is designed to drop into a signup or checkout. One call returns city-level location, the ISP, a connection type, currency, a country flag as SVG or PNG, and seven security booleans covering VPN, proxy, Tor, hosting, relay, mobile and abuse.

It covers more than 4 billion IPv4 and IPv6 addresses and refreshes daily. It is SOC 2 Type II and GDPR compliant, which matters once the location data counts as personal data.

AbstactIP geolocation API

Key Features

  • A security object returned as plain booleans: is_vpn, is_proxy, is_tor, is_hosting, is_relay, is_mobile and is_abuse.
  • Country flags in emoji, Unicode, PNG and SVG form.
  • Connection type down to DSL, cellular or satellite.
  • A list of other domains hosted on the same IP.
  • Threat intelligence drawn from more than 250 proprietary feeds.
  • Native Python, PHP, and Node libraries plus an in-browser request sandbox.

Pros & Cons

PROS

The security fields are booleans, so gating logic stays simple.
Nielsen DMA and US ZIP fields are included, which helps with US ad targeting.
Sub-20ms responses keep it off a checkout's critical path.
The sandbox sends real requests before you write any code.

CONS

The base response is thinner than rivals that return company and threat data on the entry plan.
The free plan is rate-limited to one request a second.
There is no downloadable database, so every lookup is a network call.

Pricing

Annual billing saves 10 percent.
– Free: $0, 1,000 requests/month, one request per second
– Starter: $19/month, from 200,000 requests/month
– Standard: $35/month, adds company data
– Professional: $39/month, adds the security block and hosted domains
– Enterprise: custom, adds a commercial SLA and dedicated support

ipdata

ipdata pairs geolocation with a heavy security layer. Every response can carry ten threat booleans, including a flag for Apple’s iCloud Private Relay, alongside four separate confidence scores and checks against more than 100 threat feeds. Its customer list includes NASA’s Jet Propulsion Lab, Disney and Cisco, and around 40,000 developers use it.

Key Features

  • A threat block covering Tor, VPN, proxy, datacenter, iCloud Private Relay, bogon, and known attacker or abuser status.
  • Separate vpn_score, proxy_score, threat_score, and trust_score values, not a single verdict.
  • A usage-type label that marks an IP as an ISP, a datacenter, or a business.
  • The company name and domain behind the address.
  • Official client libraries and a command-line tool.

Pros & Cons

PROS

iCloud Private Relay detection is rare and useful for a fraud check.
Four confidence scores let you set a threshold instead of trusting one flag.
Results resolve to the city and postal-code level.

CONS

The free tier bars commercial use.
VPN detection and the trust score are locked to the top paid plan.
It is more security tooling than a plain localization feed needs.

Pricing

Billed monthly, with 20 percent off annual billing.
– Free: 1,500 requests/day, non-commercial use only
– Personal: $10/month, 2,500 requests/day
– Startup: $50/month, 50,000 requests/day, adds company data
– Business: $120/month, 100,000 requests/day
– Enterprise: custom, adds data downloads and a 99.999 percent SLA

WhoisXML IP Geolocation API

Best known for WHOIS and DNS data, WhoisXML API also sells a database-backed IP Geolocation API. It claims coverage of about 99.5 percent of active IP addresses across 291,000 locations and 235,000 ISPs, and you can query it by IP address, domain name or email. Its customer base includes security vendors: Trend Micro, Proofpoint, RSA and Akamai are on the list.

Key Features

  • Lookups by IPv4, IPv6, domain, or email address.
  • AS details including the routed prefix and an ASN-type label such as ISP, content, or education.
  • A downloadable data feed in CSV or JSON alongside the live API.
  • A shared credit balance that also covers WhoisXML’s WHOIS, DNS and threat APIs.

Pros & Cons

PROS

One of the widest raw coverage claims in this list.
A one-time credit purchase is an option if you do not want a subscription.
The same account and credits work across the wider WhoisXML catalogue.

CONS

Proxy and VPN detection is sold as a separate API and not included here.
There is no per-request risk score, so fraud tooling needs another source.

Pricing

Sold monthly, yearly or as one-time credit packs.
– Free: 1,000 queries
– Monthly: from $29 for 100,000 queries, up to $499 for 10 million
– One-time: from $49 for 100,000 queries, credits with no subscription
– Custom: contact sales for higher volume

IP-API.com

IP-API gets you a location with no signup at all. Send an unauthenticated request to ip-api.com and you get JSON, XML, CSV or newline text with city, region, ZIP, coordinates, timezone, ISP and AS number. The free endpoint allows 45 requests a minute, is limited to non-commercial use and works over plain HTTP only. A paid Pro plan adds HTTPS, commercial rights, and unlimited volume.

IP-API Geolocation API

Key Features

  • No API key on the free endpoint, so a script works in one line.
  • A batch endpoint that resolves up to 100 addresses per request.
  • Responses in JSON, JSONP, XML, CSV, newline text, or serialized PHP.

Pros & Cons

PROS

Nothing to register for on the free tier.
An anycast network with low latency across the US, Europe and Asia.
A flat per-minute limit is easy to reason about.

CONS

Free traffic must stay non-commercial and cannot use HTTPS.
No proxy, VPN or company data at any tier.

Pricing

Free for non-commercial use; Pro is billed in euros.
– Free: 45 requests/minute, HTTP only, non-commercial
– Pro: EUR 13.30/month on annual billing, or EUR 15/month on a shorter term, with HTTPS, commercial use and unlimited requests
– Enterprise: custom, with a dedicated-server option

ipgeolocation.io

ipgeolocation.io returns one unified response and charges by credit rather than by request. A basic lookup costs one credit. Adding the security block costs more, and live VPN and proxy detection is billed per call. Every paid plan carries the same fields, so you scale by buying more credits, not by upgrading to unlock data.

ipgeolocation API

Key Features

  • One endpoint that returns geolocation, ASN, company, currency, timezone, an accuracy radius, and a confidence label.
  • A security block with residential-proxy and known-attacker flags plus a threat score.
  • An abuse-contact lookup that returns the network’s reporting email and phone.
  • User-agent parsing for device, operating system, and browser.
  • Bulk lookups and place names in multiple languages.
  • No rate limits on any plan, including the free one.

Pros & Cons

PROS

Feature parity across paid tiers removes the usual upgrade-to-unlock-a-field trap.
A confidence label on every result tells you how much to trust it.
The abuse-contact data speeds up incident response without a separate WHOIS query.

CONS

The credit model makes cost forecasting fiddly, since an enriched call spends several credits.
The security block is an add-on rather than part of the base response.

Pricing

Credit-based, with annual billing about 17 percent cheaper. A standard lookup is one credit; the security block adds more, and live VPN and proxy detection is billed per call.
– Free: 1,000 credits/day
– Starter: $19/month, 150,000 credits/month
– Plus: $49/month, 500,000 credits/month
– Business: $129/month, 2,000,000 credits/month
– Enterprise: contact sales, unlimited

Ipregistry

Ipregistry sells a complete response and never holds fields back for a higher plan. City-level location, ASN, company, carrier, currency, timezone and VPN and proxy detection all come back on the first call, whether you are on a free trial or an enterprise contract. Coverage reaches about 99.99 percent of IPv4 and IPv6 addresses in use, and it names Accenture and Coinbase among 51,000 organizations using it.

Ipregistry

Key Features

  • A response header that returns your remaining credit count on every call.
  • Open-source libraries for 12 languages and 8 web frameworks, with response caching and batch lookups.
  • Threat data refreshed roughly every 15 minutes against more than 220 feeds.
  • Downloadable datasets regenerated daily in CSV and MMDB for offline lookups.
  • Anycast routing from data centers on five continents.

Pros & Cons

PROS

No feature gating, so a cheap plan returns the same data as an expensive one.
One-time credit packs never expire, handy for sporadic use.
The framework middleware enriches every request with a couple of lines of setup.
Threat data is among the most frequently refreshed here.

CONS

The datasets are licensed for internal use only, so redistribution needs a custom deal.
Small one-time credit packs cost more per lookup than the cheapest monthly subscription.

Pricing

Start with 20,000 free credits, then subscribe or buy one-time packs. Annual plans include two months free.
– Free: 20,000 credits, one-time
– Starter: $29/month, 100,000 credits/month
– Professional: $79/month, 300,000 credits/month
– One-time packs: from $10 for 15,000 credits, up to $500 for 1,750,000
– Enterprise: from $299/month with overage protection and an SLA

DB-IP

DB-IP offers the same location data two ways: a hosted JSON API and databases you download in CSV or MMDB and query locally. The dataset spans more than 44 million IPv4 and IPv6 blocks, refreshes daily, and localizes place names into over 50 languages. Pricing is in euros, and there is a free option on both the API and the database.

DB-IP IP geolocation API page with tabs for the Basic, Core and Extended API tiers and a sample JSON response

Key Features

  • Matching hosted API and downloadable database, so you can move between them without changing your data model.
  • Three API tiers, Basic, Core, and Extended, that add ISP, organization, and connection data as you move up.
  • Batch queries of up to 256 addresses.
  • A free Lite database under a Creative Commons Attribution licence.

Pros & Cons

PROS

A free downloadable database is rare here and useful for offline or air-gapped work.
Local database lookups have no per-request latency or rate limit.
Place-name localization helps non-English front-ends.

CONS

The Lite database has reduced coverage and accuracy and updates only monthly.
The data fields are split across three API tiers, so the full set needs the top plan.
Pricing is euro-only, so a US team carries a currency conversion.

Pricing

Billed monthly in euros; each paid API tier has a free trial.
– Free: an entry-level API tier, and the downloadable Lite database
– Basic API: from EUR 8.29/month for 2,000 to 50,000 requests/day
– Premium API: EUR 99.90/month for up to 1,000,000 requests/day
– Enterprise API: EUR 499.90/month, unlimited
– Commercial databases: quoted separately

IPinfo

IPinfo operates its own measurement network instead of leaning on public databases. Its Probe Net platform takes active measurements from more than 1,000 points of presence and reaches 44 percent of the world’s networks within a millisecond. It uses that to place addresses at the city level. The free Lite plan returns country and ASN data with no request cap; the paid plans add city-level data and the privacy flags.

Key Features

  • Probe Net active measurement instead of a static third-party database.
  • An accuracy radius and a last-changed timestamp on every geolocation record.
  • A free Lite tier with unlimited country-level requests.
  • Libraries for a dozen languages and native listings on Snowflake, Google Cloud, and Splunk.

Pros & Cons

PROS

The measurement-based approach tends to age better than a database refresh cycle.
Unlimited free country-level lookups suit coarse geo-gating at no cost.
The last-changed timestamp flags records that may be stale.
Cloud-marketplace listings simplify procurement for larger teams.

CONS

The free Lite tier requires a visible attribution.
The genuinely useful fields, city location, and privacy detection are not in the free tier.
Database downloads are quote-only and start well above the API plans.

Pricing

Annual billing includes two months free.
– Lite: $0, unlimited country-level and ASN lookups, attribution required
– Core: $26/month, 150,000 requests/month, adds city-level data and VPN, proxy and Tor detection
– Max: $163/month, 250,000 requests/month, adds carrier and residential-proxy detection
– Enterprise: custom, for more than a million requests a month
– Database downloads: from $1,000/month

MaxMind

MaxMind coined the term GeoIP and has kept the reference dataset for this category for more than 20 years. It sells two things: the paid GeoIP web services and databases and the free GeoLite dataset that many open-source geolocation libraries build on. The web services are pay-as-you-go with no minimum, priced per query by how much detail you ask for.

MaxMind GeoIP Web Services page showing a live lookup of the visitor's IP with location, network, postal code, latitude and longitude, and ISP

Key Features

  • Three query tiers, Country, City Plus, and Insights, that add ISP and coordinates, then anonymizer detection, a risk score, and confidence factors.
  • A free GeoLite web service and database behind a free account and license key.
  • An accuracy radius on every coordinate pair, which MaxMind requires you to display.
  • Servers on three continents with volume discounts above a spend threshold.

Pros & Cons

PROS

The closest thing to an industry baseline, so results are easy to compare against.
No commitment or minimum spend, which fits spiky or low volume.
GeoLite gives a free path that upgrades to the paid data with no code changes.
The Insights tier's confidence factors and risk score are granular for a dataset vendor.

CONS

GeoLite is capped and attribution-required, so it is for prototyping, not production.
The enrichment set is narrower than the security-first APIs here.
There is no flat monthly plan, so a steady high volume needs a spend estimate.

Pricing

Pay-as-you-go, no commitment, commercial use included. Buy credit from $25.
– GeoIP Country: $0.0001 per query
– GeoIP City Plus: $0.0003 per query, adds city, coordinates and ISP
– GeoIP Insights: $0.002 per query, adds proxy detection and risk scoring
– GeoLite: free with an account and license key, 1,000 web-service lookups per day
– Volume discounts above $2,500/month

IP2Location

IP2Location has sold IP data since 2001 and offers it two ways: IP2Location.io for a hosted JSON API, and IP2Location.com for downloadable BIN databases you query locally. The API tiers step up from basic city and ISP data to VPN, Tor, residential-proxy, datacenter, and AI-crawler detection with a fraud score. A separate LITE database is free for personal and commercial use.

IP2Location.io home page with the heading Geolocate Your User's Location and a call to action to create a free account

Key Features

  • Up to 79 response attributes, from basic geolocation to full anonymizer and crawler detection.
  • A keyless endpoint for 1,000 lookups a day that needs no account.
  • BIN databases in CSV, BIN, or CIDR with libraries for 30 languages.
  • Separate detection categories for AI crawlers and search-engine spiders.
  • A LITE database that resolves an address to its class-C block.

Pros & Cons

PROS

The LITE database allows commercial use, not only evaluation.
AI crawler detection is a current, uncommon field.
The same vendor covers both a live API and offline databases.

CONS

VPN and Tor detection are two paid tiers up from the free plan.
The free tier needs a visible attribution.
The LITE database resolves to the class-C block, not the full address.

Pricing

Billed monthly in US dollars; the top plan has a 7-day trial.
– Free: 50,000 lookups/month, open-proxy detection only, attribution required
– Starter: $49/month, 150,000 lookups/month
– Plus: $249/month, 300,000 lookups/month, adds VPN, Tor and residential-proxy detection
– Security: $499/month, 600,000 lookups/month, adds datacenter and crawler detection and a fraud score

IPLocate.io

IPLocate is a smaller, developer-first option that does not gate any data behind a plan. Proxy, VPN, Tor, relay and hosting detection, company data, ASN and abuse-contact details are all available on the free tier, which is generous enough for light production use. Paid access is a single flat price, whether you take a monthly quota or a one-time credit pack that never expires.

Key Features

  • The API and every downloadable database share one schema, so self-hosting later needs no remapping.
  • An official MCP server plus Zapier, Make, and Integrately connectors.
  • Free IP-to-country and IP-to-ASN databases, updated daily.
  • Abuse-contact and registry data pulled from every RIR and RWHOIS server.

Pros & Cons

PROS

The free tier is a complete product, not a stripped-down teaser.
One price to reason about, not a tier ladder.
An MCP server and no-code connectors shorten integration.

CONS

It is a newer, smaller provider without the track record of MaxMind or IPinfo.
The batch endpoint needs paid credits.

Pricing

One flat price for paid access; pay yearly for two months free.
– Free: 1,000 requests/day, all fields, no card
– Monthly: $25/month for 100,000 requests
– One-time: $25 for 300,000 credits that never expire
– Custom: contact sales for millions of requests and an SLA
– Databases: from $100/month, or free for country and ASN data

How to choose

Start with the license, not the price. IP-API’s free tier is non-commercial and HTTP-only. ipdata’s free tier bars commercial use. IPinfo Lite, MaxMind GeoLite and IP2Location’s free API all need visible attribution. Only a few options are free to ship on with no strings: MaxMind GeoLite and DB-IP Lite as downloadable databases, IPLocate’s free tier, and IP2Location’s LITE database if you show attribution. Everywhere else, the real entry cost is the first paid plan.

Decide next whether you want a hosted call or a local file. A hosted API is one request and always current, but it adds network latency and a rate limit to every lookup. A downloadable database works inside your own process with no per-call cost, which fits log enrichment and high-throughput batch jobs. MaxMind, DB-IP, IPinfo, IP2Location, Ipregistry and IPLocate all offer one, so you can prototype against the API and move to the file later.

Match the security depth to the job. For plain localization, IPstack, DB-IP or IP-API return enough data. For fraud and abuse work you want proxy, VPN, datacenter, and residential-proxy flags with confidence scores: ipdata, Ipregistry, IP2Location’s higher plans and IPinfo Max all carry them. Watch which tier unlocks them, because on several providers, the anonymizer fields are the reason to leave the entry plan.

Finally, set your accuracy expectations before you design around the data. Treat the country as solid and the city as a hint. IPinfo, MaxMind, ipgeolocation.io and Abstract return an accuracy radius; read it. Fall back to the region when the radius is wide, or when the response flags a VPN, a hosting range or a mobile network.

Frequently Asked Questions

Is there a completely free IP geolocation API?

Several, with conditions. IP-API is free with no key for non-commercial use at 45 requests a minute over HTTP. IPinfo Lite gives unlimited country-level and ASN lookups if you show an attribution. MaxMind GeoLite allows 1,000 web-service queries a day behind a free account and license key. ipdata and ipgeolocation.io have permanent free tiers, though ipdata’s is non-commercial. IPLocate allows 1,000 requests a day with every field included. For a commercial product with real traffic, the practical entry cost is the first paid tier.

How accurate is IP geolocation?

Country-level accuracy is dependable, usually quoted in the high nineties. IP2Location, for example, publishes about 98 percent for its free database and 99.5 percent for its commercial one. City-level is far looser, roughly 60 to 80 percent depending on the country. It is worse in rural areas, on mobile networks, behind carrier-grade NAT and through a VPN or proxy. On those connections the address points to a carrier hub or the VPN’s exit node, not the user. Use the accuracy radius where a provider returns one, and treat a wide radius as a signal to fall back to the region.

Is the Google Maps Geolocation API an IP geolocation API?

No. The Google Maps Geolocation API estimates a device’s location from nearby cell towers and Wi-Fi access points that your app includes in the request body. It also needs a billing-enabled Google Cloud project. It never takes the caller’s IP address as input. It solves a different problem: locating a device that can share network hardware, not an arbitrary IP from a server log.

Can I download a free IP geolocation database?

Yes. MaxMind GeoLite offers free country and city databases under its license with a free account and attribution. DB-IP publishes free Lite databases under a Creative Commons Attribution license. IP2Location’s LITE database is free for personal and commercial use. IPLocate gives away IP-to-country and IP-to-ASN files. All of them trade some coverage, accuracy, and update frequency against the paid versions.

Do IP geolocation APIs work with IPv6?

Every provider in this guide supports IPv6 lookups alongside IPv4. Accuracy on IPv6 depends on how each ISP assigns and documents its address blocks, so it can be coarser than IPv4 in practice. The API call and the response fields are the same either way.

Thanks to Our Partners

Geekflare Guides

© 2026 Geekflare. All rights reserved. Geekflare® is a registered trademark.

All Systems Operational →