Ask HN: Best IP Geolocation Database or Service?

11 points by jfaucett ↗ HN
Hey HN, I'm building an app for a Client and I need a good database or service that lets me determine a users location based on their IP address. Right now I'm considering Maxmind GeoIP but I'd like to have something better, just can't seem to find it. I don't care if its free or cost money, the main thing is that its highly relaiable, regularly updated, and maintained.

Thanks in advance!

8 comments

[ 3.8 ms ] story [ 29.4 ms ] thread
If you're writing it in PHP, you could install the GeoIP PECL extension (http://www.php.net/manual/en/book.geoip.php).

If not just use Maxmind GeoIP. I've never heard any complaints and its updated frequently.

Thanks, I just went with GeoIP, it looks like that's about all there is. Makes me wonder, it seems like this good be a pretty good API service someone could offer, do it a lot cleaner more modern, better docs and bindings etc.
Is this just one of those "dumb customer requirements"? At least for me, geocoding-by-ip gives a result that is wrong by about 250 miles.

Why not just use HTML5 geolocation? You'll get much better results if the user grants you permission, and if you don't get that permission, you probably shouldn't know the location anyways... HTML5 geolocation is really easy to use.

geolocation works good for mobile, but on the desktop its pretty annoying, you get a popup that you have to confirm which most users aren't used to, plus its javascript so you can't do server side stuff before you return your content (or in my case, redirect the user to a country specific version of the website for the online shop).
http://www.datasciencetoolkit.org/ may be worth a shot.

Don't know how accurate the data is or how often it's updated, but we've used it before without any issues. I will note though that the geolocation functionality was a secondary piece in our software, so we weren't really concerned with accuracy of the data.

At my company we use IP2Location (http://www.ip2location.com). They offer several databases with different data (from basic "IP-address to country" to quite comprehensive ones). You can get a DB as a CSV or binary file (in latter case the driver is required which also costs some money). The database is updated almost every month and you get free downloads.

In my home project I wanted to save some money so just bought the CSV file, wrote a tool that converts it to a binary representation (~1GB) and a driver (.NET) that can find records very quickly.