Best IP to Country Database [closed]
Asked Answered
R

2

63

We've got a requirement in a couple of our systems to detect a user's country based on their IP address. We'd prefer to use a database rather than a Web Service (to prevent issues with downtime/network access to an externally hosted service) so I'm looking for recommendations, anyone got any good or bad stories of the various IP to Country databases?

What I've found from google:

Paid

Free

Any information on how the free ones compare to the paid ones would be good. Right now I'm leaning towards Maxmind's paid service since it includes automatic updates that we can run via script once a week.

Rasla answered 22/10, 2013 at 10:4 Comment(3)
You can also consider IP2Location LITE as the free one. It has more information such as time zone compare to peers in the same category. lite.ip2location.comPiper
IPLocate.io provides a free API: https://www.iplocate.io/api/lookup/8.8.8.8 - Disclaimer: I run this service.Beaudry
Try clearip.io The most elegant one I've seen so far.Citric
N
33

We use Maxmind and it's very good, and pretty accurate. You can get scenarios where, say, a German company has offices in the US but is using a German IP range for internal purposes. So, they'll report as Germany while being based in the US. It won't be 100% reliable.

Negation answered 26/11, 2013 at 23:52 Comment(3)
Yeah we ended up going with Maxmind in the end. Seems like a good option.Rasla
no, my city listed 5 times,Rondelet
You understand a city may have multiple ISPs, or multiple blocks even for a single ISP, right? It is not an error for your city to be listed 5 times!Liberty
T
79

Totally free, LGPL, not easily found in google: ip2c.org

Thermodynamics answered 7/11, 2014 at 10:36 Comment(15)
This is the best answer and everyone should use this!Tweeter
It's being flagged by anti-virusIntemerate
Webservice only, so it doesn't allow downloading the databaseDanyluk
Very usefull and easy!Wellrounded
Also does not support HTTPS.Hygrograph
It's not accurate for me: It says that I'm in UK but I'm in France. When I'm using Maxmind or ip2location it gives me the right answer.Redeeming
The other problem with ip2c is for example, it shows me in "Canada". As the 2nd biggest country on the planet, just showing "Canada" is.....pretty vague. Not quite useless, but not great information.Liberty
For tiny projects, this LGPL thing is a nice add-on to this question. However, it's limited. It's unreliable at scale, the location identification is way too simple and thus often inaccurate, and if we're on secure servers (which everyone should be), then the service doesn't work at all.Cristiano
@Redzarf: The download of their DB is here. Their Notes page mentions which DB they use. It's a bit hard to spot on the downloadpage, you need to look here.Apogee
You can use http or https. Stated on their site.Notogaea
It doesn't appear that ip2c.org supports ipv6. ipv6 addresses are used pretty frequently. Is there a reliable solution for ipv6 addresses as well? I'd rather an API (like ip2c.org) rather than downloading and maintaining the DB myself.Deb
As @Apogee points in his comment, the database behind i2c.org comes from software77.net/geo-ip, which is the third provider in the original question.Buffoon
@Buffoon links don’t work nowPositron
@DanielLidström Yes, there is an error in the first link. It should be about.ip2c.org/#licensenotes . And for the second one, it seems that the service is down or no longer there, and the license notes of ip2c have not been updated.Buffoon
They stopped getting updated recentlyLindahl
N
33

We use Maxmind and it's very good, and pretty accurate. You can get scenarios where, say, a German company has offices in the US but is using a German IP range for internal purposes. So, they'll report as Germany while being based in the US. It won't be 100% reliable.

Negation answered 26/11, 2013 at 23:52 Comment(3)
Yeah we ended up going with Maxmind in the end. Seems like a good option.Rasla
no, my city listed 5 times,Rondelet
You understand a city may have multiple ISPs, or multiple blocks even for a single ISP, right? It is not an error for your city to be listed 5 times!Liberty

© 2022 - 2024 — McMap. All rights reserved.