15+ Best IP Geolocation APIs Compared

Looking up the IP addresses of website visitors can help in many ways. Whether you’re aiming to personalize their UX based on location or just want to understand your demographic better, IP geolocation can help.

No matter the use case, geolocation services involve sourcing the user’s location by doing a simple geolocate IP request. Currently, it’s possible to obtain this data in two different ways.

You can use an IP geolocation API to interact with the vendor’s database and get the information you need. The advantage is that you don’t have to maintain a database containing geolocation data yourself.

The alternative is an IP geolocation database and query system, both of which you install on your server(s). This is fully under your control, meaning you’ll have to update the database yourself on an ongoing basis (which can prove laborious).

For most use cases, the API route is the cleaner option. It might be faster if you use a local database, however, with APIs you have virtually zero maintenance tasks.

So let’s take a closer look at some of the best IP geolocation APIs available today. We’ll analyze core features, compare monthly pricing and perform an accuracy test using random IP addresses.

1. Abstract IP Geolocation API

Abstract IP geolocation API

Abstract’s core capabilities include providing geolocation data such as:

  • Country
  • Region and city
  • Latitude and longitude
  • Currency
  • ASN (such as ISP and referring to IPv4 or IPv6 address data)
  • Security data including VPN, TOR and proxy detection

The scalability of their IP geolocation API means that it’s going to be capable of supporting a wide variety of use cases. These include, but aren’t limited to:

  • Geolocating website visitors
  • Picking the correct language based on visitor location
  • Blocking users from specific countries for legal reasons
  • Showing GDPR information to visitors in Europe
  • Blocking fraudulent purchases
Tier Max API calls / month API calls / second Price / month
Free 20,000 1 $0
Starter 200,000 50 $9
Pro 1,500,000 500 $49
Pro plus 20,000,000 500 $499

Abstract’s REST API is easy to implement, and documentation is easily accessed right after you sign up for a free API key. The data is updated every day to ensure ongoing accuracy.

2. ip2location

ip2location

ip2location uses reverse IP lookup to offer a wide range of geolocation services including:

  • ISO3166 country code
  • Region or state
  • City
  • Latitude and longitude
  • ZIP/Postal code
  • Internet Service Provider (ISP) or company name

This is a very granular solution enabling you to pick exactly the features you need and no other. There’s also a range of add-ons that you could acquire to meet specific business needs.

There’s a demo version along with sample API code.

Tier Credits / year Price / month
Trial 5,000 $0
WS 100,000 $49
WS10X 1,000,000 $441
WS50X 5,000,000 $1960

Ip2location uses a REST API and documentation with examples is available on the pricing page. The data is updated monthly.

3. ipstack

ipstack

This geolocation API is structured as five modules that provide different functionalities:

  • Location: locates website visitors using IP lookup
  • Currency: detects local currency based on a visitor’s IP address
  • Time zone: identifies the visitor’s local time zone
  • Connection: provides ASN and ISP data
  • Security: detects proxies and TOR users

The free plan offers access to the location module only. Access to the API is easy with a link to the key offered from the product’s homepage.

The ipstack API is very easy to access with documentation readily available. The data is updated daily.

Tier Max API calls / month Price / month
Free 5,000 $0
Basic 50,000 $9.99
Professional 500,000 $49.99
Professional plus 2,000,000 $99.99

4. ipapi

ipapi

ipapi can be implemented using JavaScript or PHP. Its API returns provide geolocation data including:

  • Country flag
  • Language
  • Currency
  • Time zone
  • Fraud prevention
  • Calling code

If you’ve prepared different language versions of your website, then the language detection will support redirecting users to the correct version for them. Just make sure you have a manual selection option for the best user experience.

Fraud prevention will enable the detection of VPNs and proxies which could be critical in banking or e-commerce use cases.

Tier Max API calls / month Price / month
Free 1,000 $0
Standard 50,000 $10
Business 500,000 $50
Business plus 2,000,000 $100

The free API key is available from a homepage link and ipapi’s API is easy to use with the vendor claiming that you can learn it in 10 minutes. The data is updated daily.

5. Maxmind

Maxmind

Maxmind’s capabilities span the spectrum of geolocation data including:

  • Country
  • Postal code
  • ASN
  • Accuracy estimates
  • Average income and population density (US only)

With global servers, Maxmind offers good global response times with users paying per API call. Their demo offers $5 worth of calls.

Tier Price per call
Demo Up to $5 total
Country $0.0001
City $0.0003
Insights $0.002

Maxmind makes documentation available on their website, but it’s easy to end up on the wrong page which may impede implementation.

Depending on type, data is updated anywhere from daily to every four weeks.

6. ip-api

ip-api

ip-api offers a spectrum of geolocation information such as:

  • Continent and country code
  • City
  • ZIP or postal code
  • Latitude and longitude
  • ASN

A free, non-commercial version is available which is limited to 45 requests per minute, but doesn’t appear to be limited in terms of the total number of calls.

ip-api monitors their product 24 x 7 and achieves 99.999% uptime as a result, with SLAs available at all product tiers.

No API key is required for the free version. The data update frequency is ad-hoc being whenever IP address data changes.

Tier API calls / minute Price / month
Free 45 $0
Pro Unlimited $15

It can be implemented in a wide variety of languages with documentation readily available.

Data’s updated within 24 hours of a change being detected.

7. DB-IP

DB-IP

DB-IP offers location information spanning 215,000 cities worldwide. The data that they provide enables a wide range of use cases including:

  • Location awareness so that users see pricing in the correct currency (if you implement this, offer the opportunity to change currency manually as users may have a genuine need to shop in a different currency)
  • Sourcing demographic data based on IP address
  • Risk analysis where proxies or TOR can be detected

There’s a dashboard available to provide you with real-time and historic API request use data. Free trials are available, but there isn’t a free or non-commercial option.

API Tier Max API calls / day Price / month
Basic Starter 50,000 €8.29
Basic Premium 100,000 €99.90
Basic Enterprise Unlimited €499.90
Core Starter 50,000 €11.49
Core Premium 1,000,000 €139.90
Core Enterprise Unlimited €699.90
Extended Starter 50,000 €16.49
Extended Premium 1,000,000 €199.90
Extended Enterprise Unlimited €899.90

It’s easy to integrate using a RESTful API and the free trial doesn’t require an API key. Support on how to implement the API key is readily available. Threat detection data can be updated on an hourly basis with IP address data updated up to twice per day.

8. ipgeolocation.io

ipgeolocation.io

ipgeolocation structures its product into a range of modules:

  • IP location such as country code, language and ZIP/postal code
  • Currency name and symbol
  • Time zone including daylight saving or summer time corrections
  • Connection including ISP
  • Security including TOR, VPN and proxy detection
  • User agent which detects the visitor’s browser, CPU and operating system
  • Reverse IP lookup to source the host/domain name and DNS
  • Domain IP lookup which includes ISP data
  • IP batch lookup where you can query 50 IP addresses in one search

This spectrum of capabilities makes it a viable choice for use cases serving customers such as e-commerce.

Signing up for the free version takes a couple of minutes. This free version supports 30,000 requests per month with a daily limit of 1,000.

Tier Max API calls / month Price / month
Developer 30,000 (1,000 daily limit) Free
Bronze 150,000 $15
Silver 1,000,000 $65
Silver+ 3,000,000 $130
Gold 6,000,000 $200
Platinum 20,000,000 $500
Enterprise solution >50,000,000 Custom

Documentation is readily available, so this should be easy to implement, but no information on how frequently data is updated could be found.

9. ipinfo

ipinfo

ipinfo is currently serving more than 40 billion requests per month by enterprises and individuals. These users are able to source:

  • Geolocation data
  • ASN and ISP detection
  • Name of the company that owns the IP
  • Carrier detection
  • IP range (determines whether a visitor is using an IP address for a consumer, business or host)
  • VPN and proxy detection

This supports clients as they seek to personalize user experiences, detect fraud and remain legally compliant. The website lists a wide spectrum of solutions and use cases for different sectors.

There’s a free option as well which is limited to 50,000 requests per month as well as a startup and non-profit discount for the first two years of service.

Tier Max API calls / month Price / month
Free plan 50,000 $0
Basic 250,000 $49
Business 1,000,000 $499
Premium 2,500,000 $1,499
Enterprise Flexible Custom

ipinfo uses a Fetch API and documentation with examples is easy to find on their website. Data is updated daily.

10. ipdata

ipdata

ipdata is capable of sourcing:

  • Geolocation data
  • ASN data
  • Currency
  • Time zone
  • Threat data

All features are available at all paid levels, though there’s no information about whether all features are also available in the free trial/non-commercial version.

Tier Max API calls / day Price / month
Free 1,500 $0
Personal 2,500 $10
Lite 10,00 $30
Startup 50,000 $50
Business 100,000 $120
Enterprise Custom Custom

Documentation on their website provides examples of how the API can be implemented using a range of languages including Python, Node, PHP and more.

IP address data is updated twice each week and threat data updates are pushed live every hour.

11. Positionstack

Positionstack

Positionstack offers real-time geocoding capabilities including:

  • Forward Geocoding
  • Reverse Geocoding
  • Batch Requests
  • Embeddable maps
  • JSON, XML & GeoJSON

Positionstack’s embeddable maps option offers the opportunity to render a map for use cases where presenting a geographic map is of benefit to users.

Tier Max API calls / month Price / month
Free 25,000 $0
Basic 100,000 $10
Professional 1,000,000 $30
Business 3,000,000 $120

This REST API is easy to implement with Positionstack claiming set-up times of 30 seconds if their quickstart guide is followed.

The geolocation data is updated daily.

12. ipify

ipify

ipify offers the full spectrum of geolocation services that are suitable for supporting a range of use cases such as:

  • Content personalization
  • Digital marketing
  • Access blocking
  • Fraud detection
  • Security policy enforcement
Max API calls / month Price / month
25,000 $0
10,000 $15
100,000 $21
300,000 $39
1,000,000 $79
3,000,000 $159
10,000,000 $399
200,000,000 $2990

Documentation on implementation with examples is easy to source on their website. The data is updated daily.

13. ipregistry

ipregistry

ipregistry’s geolocation API targets the following use cases:

  • Web personalization
  • Cyber security
  • Compliance

There’s also a dashboard available to help you manage your usage.

ipregistry’s pricing is on a sliding scale so that you use what you pay for. The chart below shows some examples that broadly fall in line with other options. The numbers are uneven as the only selection option is a literal slider that skips.

Max API calls / month API calls / second Price / month
100,000 ? $0
259,366 Up to several thousand per second $25.94
504,323 Up to several thousand per second $50.43
1,008,246 Up to several thousand per second $72.05
2,507,205 Up to several thousand per second $125.36

ipregistry uses a REST API and documentation on the website shows how to implement the API to meet specific use cases, so this should be very easy to implement.

The IP address data is updated at least once per day with threat data updated every 15 minutes.

14. Google Maps Platform

Google Maps Platform

If your use case revolves around mapping, then Google’s APIs are worth assessing. Google’s decoupled their data into a range of APIs spanning:

  • Geolocation
  • Geocoding (where address data is transformed into latitude – longitude)
  • Places (data and photos of specific plates)
  • Roads (provides data for nearest roads and speed limits)
  • Time zone (provides the functionality to source time zone data all over the world)

As a result, you’ll need to have a clear understanding of your use case to make that you acquire the correct Google API and not ones that won’t support your needs.

Pricing is per 1,000 requests and spans Maps, Routes and Places. So the free $200 of usage per month spans all three products. The chart below shows just the Maps information.

Tier Max API calls / day API calls / second Price / 1,000 calls
Static maps Up to 50,000 (can be increased) 500 / 1 per IP address Free for mobile / $2
Dynamic maps Up to 50,000 (can be increased) 500 / 1 per IP address Free for mobile / $7
Local context map Up to 50,000 (can be increased) 500 / 1 per IP address Free during beta BUT requires Dynamic Maps
Static street view Up to 50,000 (can be increased) 500 / 1 per IP address $7
Dynamic street view Up to 50,000 (can be increased) 500 / 1 per IP address $14
Gaming solution Up to 50,000 (can be increased) 500 / 1 per IP address $10
Enterprise Up to 50,000 (can be increased) 500 / 1 per IP address Custom

The API should be easy to implement with Google offering examples in different languages: TypeScript, JavaScript, CSS, and HTML.

The data is being updated constantly.

15. W3C geolocation API

W3C geolocation API

This free API is an effort by the internet standards body, W3C, to standardize the interface for sourcing geographic location data for client devices. In its current form, it’s capable of producing a visual representation of user location along with latitude and longitude data.

However, as mentioned, this is an attempt to create standardization rather than create the most fleshed out product.

Since this isn’t a commercial product, pricing isn’t applicable in this case.

The W3C Schools website offers clear guidance on implementation combined with the ability to practice.

It appears to rely on Google data which would lead to it being updated on an ongoing basis as Google is.

Accuracy test

Below is a table outlining the outcome of a series of tests designed to test the accuracy of each of the previously mentioned geolocation APIs. The three tests are as follows:

#1. An IP from Bakersfield, California sourced from TraceMyIP chosen at random. The correct response is US, California, Bakersfield, Charter/Spectrum (IP address: 74.87.9.49)

#2. An IP from New York sourced from TraceMyIp chosen at random. The correct response is US, New York, New York (City), Charter/Spectrum (IP address: 196.53.10.153)

#3. A test from London, England using a 5G Android phone with a 5G connection. The correct response is UK/GB, England, London, 3/Three (IP address: auto but where a manual address needed to be entered 92.40.171.215)

Vendor IP #1 – 74.87.9.49 IP #2 – 196.53.10.153 IP #3 – 92.40.171.215
Abstract IP geolocation API US, California, Bakersfield, Charter US, New York, New York, LogicWeb UK, England, London, 3
ip2location US, California, Bakersfield, Charter US, New York, New York, AfriNIC UK, Wales, Porthmadog, 3
ipstack US, California, Bakersfield, Charter US, New York, New York, Null GB, England, Pinner (Greater London), 3
ipapi US, California, Bakersfield, Charter US, New York, New York, Unknown UK, Blank, Pinner (Greater London), 3
Maxmind US, California, Bakersfield, Spectrum US, New York, New York, LogicWeb England, London, Lambeth, 3
ip-api US, California, Bakersfield, Charter US, New York, New York, LogicWeb UK, England, Milton Keynes, 3
DB-IP US, California, Los Angeles, Charter US, Pennsylvania, Easton, LogicWeb GB, Hertfordshire, Stevenage, 3
ipgeolocation US, Colorado, Greenwood Village, Charter Mauritius, N/A, Port Louis, AfriNIC UK, Blank, Reading, 3
ipinfo US, California, Bakersfield, Charter US, New York, New York, AfriNIC GB, England, London, 3
ipdata US, California, Bakersfield, Charter US, New York, New York, Blank GB, Null, Null, 3
Positionstack No manual IP address test available No manual IP address test available No manual IP address test available
IP Geolocation US, California, Los Angeles, Charter US, Pennsylvania, Easton, YISP GB, Wales, Caernarfon, 3
ipregistry US, California, Bakersfield, Charter US, Blank, New York, AfriNIC GB, Null, London, 3
Google Maps No manual IP address test available No manual IP address test available No manual IP address test available
W3C geolocation API No manual IP address test available No manual IP address test available No manual IP address test available

To call out a few results:

  • The result showing the New York test as Mauritius is because it belongs to AfriNIC, the internet registry for Africa
  • To repeat: this IP address was chosen at random
  • We opted not to retest all APIs using a different address because this is a revealing case
  • The results for the cellular test showing Reading are showing the address of the carrier’s HQ not the actual location in Bloomsbury, London
  • The results showing Wales are simply wrong

Summary

This information may take a little time to evaluate, but the data accuracy tests should begin to illustrate whether each product is a viable solution for you. You can start to pair this with the pricing data for each product to start drawing up a short list of potentially viable options.

But you should be led by your business needs, not the technology itself. Many platforms could theoretically meet your needs, but until you know what those needs are, you won’t be able to create a truly viable shortlist. For example, a visitor’s location data may need to be more extensive for specific sectors such as e-commerce or banking.

Once you’ve done that, all of the products on this list have some kind of free trial or free version available that you can begin to test in real world scenarios. It’s also worthwhile sourcing information such as what level of SLAs and support are available to ensure that, should anything ever go wrong, you’ll be up and running again as soon as possible.