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’s core capabilities include providing geolocation data such as:

CountryRegion and cityLatitude and longitudeCurrencyASN (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 visitorsPicking the correct language based on visitor locationBlocking users from specific countries for legal reasonsShowing GDPR information to visitors in EuropeBlocking fraudulent purchasesTierMax API calls / monthAPI calls / secondPrice / monthFree20,0001$0Starter200,00050$9Pro1,500,000500$49Pro plus20,000,000500$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 codeRegion or stateCityLatitude and longitudeZIP/Postal codeInternet 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.

TierCredits / yearPrice / monthTrial5,000$0WS100,000$49WS10X1,000,000$441WS50X5,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 lookupCurrency: detects local currency based on a visitor’s IP addressTime zone: identifies the visitor’s local time zoneConnection: provides ASN and ISP dataSecurity: 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.

TierMax API calls / monthPrice / monthFree5,000$0Basic50,000$9.99Professional500,000$49.99Professional plus2,000,000$99.99

4. ipapi

ipapi

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

Country flagLanguageCurrencyTime zoneFraud preventionCalling 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.

TierMax API calls / monthPrice / monthFree1,000$0Standard50,000$10Business500,000$50Business plus2,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:

CountryPostal codeASNAccuracy estimatesAverage 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.

TierPrice per callDemoUp to $5 totalCountry$0.0001City$0.0003Insights$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 codeCityZIP or postal codeLatitude and longitudeASN

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.

TierAPI calls / minutePrice / monthFree45$0ProUnlimited$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 addressRisk 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.

APITierMax API calls / dayPrice / monthBasicStarter50,000€8.29BasicPremium100,000€99.90BasicEnterpriseUnlimited€499.90CoreStarter50,000€11.49CorePremium1,000,000€139.90CoreEnterpriseUnlimited€699.90ExtendedStarter50,000€16.49ExtendedPremium1,000,000€199.90ExtendedEnterpriseUnlimited€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 codeCurrency name and symbolTime zone including daylight saving or summer time correctionsConnection including ISPSecurity including TOR, VPN and proxy detectionUser agent which detects the visitor’s browser, CPU and operating systemReverse IP lookup to source the host/domain name and DNSDomain IP lookup which includes ISP dataIP 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.

TierMax API calls / monthPrice / monthDeveloper30,000 (1,000 daily limit)FreeBronze150,000$15Silver1,000,000$65Silver+3,000,000$130Gold6,000,000$200Platinum20,000,000$500Enterprise solution>50,000,000Custom

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 dataASN and ISP detectionName of the company that owns the IPCarrier detectionIP 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.

TierMax API calls / monthPrice / monthFree plan50,000$0Basic250,000$49Business1,000,000$499Premium2,500,000$1,499EnterpriseFlexibleCustom

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 dataASN dataCurrencyTime zoneThreat 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.

TierMax API calls / dayPrice / monthFree1,500$0Personal2,500$10Lite10,00$30Startup50,000$50Business100,000$120EnterpriseCustomCustom

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 GeocodingReverse GeocodingBatch RequestsEmbeddable mapsJSON, 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.

TierMax API calls / monthPrice / monthFree25,000$0Basic100,000$10Professional1,000,000$30Business3,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 personalizationDigital marketingAccess blockingFraud detectionSecurity policy enforcementMax API calls / monthPrice / month25,000$010,000$15100,000$21300,000$391,000,000$793,000,000$15910,000,000$399200,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 personalizationCyber securityCompliance

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 / monthAPI calls / secondPrice / month100,000$0259,366Up to several thousand per second$25.94504,323Up to several thousand per second$50.431,008,246Up to several thousand per second$72.052,507,205Up 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:

GeolocationGeocoding (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.

TierMax API calls / dayAPI calls / secondPrice / 1,000 callsStatic mapsUp to 50,000 (can be increased)500 / 1 per IP addressFree for mobile / $2Dynamic mapsUp to 50,000 (can be increased)500 / 1 per IP addressFree for mobile / $7Local context mapUp to 50,000 (can be increased)500 / 1 per IP addressFree during beta BUT requires Dynamic MapsStatic street viewUp to 50,000 (can be increased)500 / 1 per IP address$7Dynamic street viewUp to 50,000 (can be increased)500 / 1 per IP address$14Gaming solutionUp to 50,000 (can be increased)500 / 1 per IP address$10EnterpriseUp to 50,000 (can be increased)500 / 1 per IP addressCustom

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.

ccuracy 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)

VendorIP #1 – 74.87.9.49IP #2 – 196.53.10.153IP #3 – 92.40.171.215Abstract IP geolocation APIUS, California, Bakersfield, CharterUS, New York, New York, LogicWebUK, England, London, 3ip2locationUS, California, Bakersfield, CharterUS, New York, New York, AfriNICUK, Wales, Porthmadog, 3ipstackUS, California, Bakersfield, CharterUS, New York, New York, NullGB, England, Pinner (Greater London), 3ipapiUS, California, Bakersfield, CharterUS, New York, New York, UnknownUK, Blank, Pinner (Greater London), 3MaxmindUS, California, Bakersfield, SpectrumUS, New York, New York, LogicWebEngland, London, Lambeth, 3ip-apiUS, California, Bakersfield, CharterUS, New York, New York, LogicWebUK, England, Milton Keynes, 3DB-IPUS, California, Los Angeles, CharterUS, Pennsylvania, Easton, LogicWebGB, Hertfordshire, Stevenage, 3ipgeolocationUS, Colorado, Greenwood Village, CharterMauritius, N/A, Port Louis, AfriNICUK, Blank, Reading, 3ipinfoUS, California, Bakersfield, CharterUS, New York, New York, AfriNICGB, England, London, 3ipdataUS, California, Bakersfield, CharterUS, New York, New York, BlankGB, Null, Null, 3PositionstackNo manual IP address test availableNo manual IP address test availableNo manual IP address test availableIP GeolocationUS, California, Los Angeles, CharterUS, Pennsylvania, Easton, YISPGB, Wales, Caernarfon, 3ipregistryUS, California, Bakersfield, CharterUS, Blank, New York, AfriNICGB, Null, London, 3Google MapsNo manual IP address test availableNo manual IP address test availableNo manual IP address test availableW3C geolocation APINo manual IP address test availableNo manual IP address test availableNo 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 randomWe opted not to retest all APIs using a different address because this is a revealing caseThe results for the cellular test showing Reading are showing the address of the carrier’s HQ not the actual location in Bloomsbury, LondonThe 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.

Did you miss our previous article…
https://www.tampawebdesign.org/?p=8101