Asset 20 8 2
Does AI recommend your business? Run the free check →

Join 15,000 business owners, marketers and entrepreneurs. The Sunday newsletter you'll be annoyed only arrives once a week.

Article

Best IP Geolocation APIs (2026): 13 IP Lookup APIs Compared

The best IP geolocation APIs tell your website or app roughly where a visitor is connecting from, usually the country and often the city, network and time zone. Some offer free tiers for small projects, while others add VPN, proxy and threat detection. Thirteen options follow in no particular order.

Next step on this topic: Best Local Business Data APIs: 10 Sources Worth Testing.

Showing the right language, the right offer or the right shipping message to a first-time visitor makes a site feel local before they've clicked anything. An IP lookup is the quiet bit of plumbing that makes that possible.

The thirteen APIs below are listed alphabetically and in no particular order, and every description comes from the provider's own website, read this week. If you'd like to use location to sell more, my guide on how to increase conversions with on-site geotargeting shows what works.

IP geolocation APIs side by side

I checked the free plan column on each tool's own website, as of Oct 2026. Yes means the site names a free plan, a free version, a free tier or an open source version. Trial only means a time-limited trial. Not stated means the pages I read named neither, even where there's a button inviting you to start for free, so check the vendor's page before you sign up.

ToolTypeGood forFree plan
BigDataCloudIP geolocation and reverse geocoding APIsFree tiers on every packageYes
DB-IPGeolocation API and free address databaseDownloadable databases and an APIYes
GeoapifyIP geolocation APICity-level location from an IPNot stated
ip-apiGeolocation API, free for non-commercial useHobby projects with no API keyYes
IP2LocationIP location and proxy data providerLocation plus proxy detectionYes
ipapiIP address lookup and geolocation APILookups without signing upNot stated
ipdataIP geolocation and threat data APIFraud checks with carrier dataYes
ipgeolocation.ioIP geolocation API and databaseLocation with time zone and user agentYes
IPinfoIP data for developers and enterprisesAccurate data at enterprise scaleNot stated
IPLocateIP geolocation and privacy detection APISpotting VPNs and abuseYes
ipregistryIP geolocation and threat intelligence dataThreat data with official librariesNot stated
ipstackIP geolocation APILookups with VPN and proxy flagsYes
MaxMind GeoIPIP location databases and web servicesThe long-standing GeoIP databasesYes

Thirteen IP geolocation APIs to look at

BigDataCloud

Best for: Developers who want IP geolocation and reverse geocoding with a free tier on each package and every endpoint included.

DB-IP

Best for: Teams who want an API plus downloadable IP databases, including a free database to start with.

Geoapify

Best for: Developers who want city-level location from an IP to adapt map view, currency, and language.

Its page gives an example of a customer in Germany near Berlin who sees local offers and German content.

Skip it if you need street-level location.

ip-api

Best for: Hobbyists and students who want a quick geolocation API that needs no key for non-commercial projects.

IP2Location

Best for: Businesses that want IP location data with proxy, VPN and bot detection, starting from a free account.

ipapi

Best for: Testers who want a simple REST API they can try straight away with a single command, with no sign-up.

ipdata

Best for: Fraud and security teams who want geolocation with carrier and threat data, plus a free daily allowance.

ipgeolocation.io

Best for: Developers who want location, time zone and user agent context from one endpoint, with a free plan for testing.

IPinfo

Best for: Larger companies that want accurate IP data built to scale, with a straightforward API and many integrations.

IPLocate

Best for: Sign-up and checkout teams who want to catch fake accounts and abuse with privacy detection, plus free country-level data.

ipregistry

Best for: Engineering teams who want geolocation and threat intelligence with official open source libraries for many programming languages.

ipstack

Best for: Developers who want one IP lookup endpoint with threat checks.

It flags VPNs, proxies, and threats and returns location, ISP and timezone data in JSON and XML, with a free API key.

Skip it if you need a bulk database file.

MaxMind GeoIP

Best for: Teams who want long-established GeoIP databases for local lookups, with free GeoLite data to begin with.

Where to start for your project

  • Hobby projects with no API key: ip-api.
  • Downloadable databases for local lookups: MaxMind GeoIP or DB-IP.
  • Fraud checks with carrier and threat data: ipdata.
  • Catching VPNs and fake sign-ups: IPLocate.
  • Enterprise-scale IP data: IPinfo.

Why an IP address can be personal data

The Information Commissioner's Office says the UK GDPR names online identifiers in its definition of personal data, and lists internet protocol (IP) addresses and cookie identifiers among them.

So looking up a visitor's location from their IP address isn't a purely technical step. Mention it in your privacy notice, keep only what you need, and think about whether you need to store the result at all.

Work with me

Want AI doing the heavy lifting in your marketing?

I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.

I cover the next step in the best geocoding APIs.

Country-level lookups versus city-level detail

Country lookups are the most reliable and cover most everyday needs, such as choosing a language, a region or which shipping message to show.

City and postcode-level results are less precise, especially on mobile networks and for people using a VPN. Treat them as a helpful guess rather than an exact address, and never use them to make important decisions on their own. When you need exact places instead of a guess, there are map, geocoding and routing APIs to compare.

To see what visitors do once you know where they are, our list of product analytics tools lines up tools for tracking behaviour.

Want your tool on this list? Featured spots and reviews here are paid partnerships. Here's how to partner with me.

Questions to ask before you choose an IP geolocation API

  1. How accurate is it in the countries I care about?
  2. Does it detect VPNs, proxies and hosting networks?
  3. Does it support both IPv4 and IPv6?
  4. Can I download a database for local lookups?
  5. How quickly does it respond?
  6. Is the free allowance enough for my traffic?

Location is one use of an address, and our round-up of IP address management tools compares tools for managing the addresses on your own network.

Signs your site needs location data

  • Overseas visitors see the wrong shipping message. Localise it.
  • Fake accounts keep signing up. Check network details.
  • Every visitor sees the same language. Suggest a local one.
  • Your analytics can't explain regional sales. Add country data.

Do you make an IP geolocation or IP data API? Tool makers can ask to be considered for a featured place on this list.

Check which address your server sees before you compare accuracy

The first thing to check isn't any provider's accuracy; it's whether your own code is looking up the right address. If your site sits behind a CDN, a load balancer or a reverse proxy, the connection your server receives comes from that middle layer, and a lookup on it returns the location of a data centre, not your visitor. The visitor's address travels in a forwarded header that your stack has to read, and trust only when it comes from proxies you run, because anyone can send that header themselves.

It's a quiet failure. Every lookup succeeds, the API returns a tidy answer, and visitors in Paris are told they're wherever your nearest edge server happens to be. Log a handful of lookups beside the raw request headers before you judge any provider, or you'll blame the data for a plumbing fault.

Once the address is right, the choice follows the job. If you only need the country, to pick a language or a shipping message, start with a downloadable database queried on your own server, because there's no network call on each page and no allowance to run out of. Schedule its updates, though: address blocks change hands, and a file downloaded once drifts out of date. And if all you want is to show event or opening times in the visitor's own time zone, their browser already knows it, so no IP lookup is needed for that job.

If a lookup decides whether a sign-up or order goes through, start with an API that returns network details such as hosting, proxy or VPN flags alongside location, because country alone can't tell a traveller from someone hiding behind a rented server. And if you were planning to call an API from the visitor's browser, keep the call on your server instead and cache the answer for the session: a key sitting in page source is an allowance anyone can spend.

What your own logs can tell you before a trial

Your traffic answers more of this choice than any sales page. Put these to your logs first.

  • Which countries send the visitors you'd act on? Accuracy varies by region, so judge a provider where your buyers are, not on a global claim.
  • How much of your traffic arrives over mobile networks? Carrier traffic can appear far from where the person is standing, so a plan built on city-level detail rests on shaky ground if phones dominate.
  • Do you hold addresses with a known location, such as orders with a billing country? Run that sample through each trial and count the country matches. It's the fairest data-quality test you can make, as long as you allow for people who buy while travelling.
  • How many lookups does one visitor cause? If every page view triggers a call, caching per session can shrink the volume you need by a long way.
  • How many of your sign-ups come from hosting networks rather than homes and offices? If it's a real slice, threat flags matter more to you than city detail.

Where a wrong guess costs nothing, such as a language banner a visitor can dismiss, these checks are more work than the decision deserves, and any reputable source wired up correctly will do. They earn their time once a location result blocks or flags a real person.

My plain advice on choosing an IP geolocation API

Use location to help visitors, not to box them in. Suggest the local version of your site and let people switch, because travellers, VPN users and people on mobile networks will sometimes look like they're somewhere they're not.

And if you're using lookups to stop fraud, combine them with other signals rather than relying on location alone. My article on the types of ecommerce fraud and how to prevent them covers the other checks worth adding.

Frequently asked questions

What is an IP geolocation API?

An IP geolocation API is a service that looks up an IP address and returns its likely location, such as country, region and city, plus network details.

How accurate is IP geolocation?

Country results are usually reliable. City-level results are less precise and can be wrong for mobile networks and VPN users.

Are there free IP geolocation APIs?

Yes. Several providers offer free plans, free allowances or free databases. The free plan column above shows what each provider's own site says.

Is an IP address personal data?

It can be. The ICO lists IP addresses among the online identifiers the UK GDPR mentions in its definition of personal data.

Can IP geolocation detect a VPN?

Some providers flag VPNs, proxies and hosting networks, which helps with fraud checks and sign-up abuse.

Should I redirect visitors based on their location?

It's usually better to suggest the local version and let people choose, because location guesses are sometimes wrong.

Published and maintained by the Lilach Bullock team, covering marketing, AI and business growth.
Your buyers are asking AI who to use. Does it say you?

See for free whether ChatGPT, Claude, Perplexity, Gemini and Google name you, and get the plan to become the answer.

Check my AI visibility →
Sundays only

Get the Sunday newsletter.

One email a week. AI experiments, marketing tactics, and the workflows Lilach is building right now in her own business.

Subscribe free

Let’s get your marketing running on AI.

Book a free 30-minute call

We figure out what you need, where AI fits in, and what working together would look like.

Book the call →

Or take the 30-second calculator

You’ll see the hours and the money quietly leaking out of your week, and the three workflows worth building first.

Take the calculator →

Or grab the free AI resource library

Prompt packs, templates, checklists, and swipe files. The exact tools I build for paying clients. Yours, free.

Get the library →
Keep reading

More from the blog.