4 ms·
Easy way to get geo from ip. I hate a lot of the options: downloading binarys or using google's that just regulates you.
by ransom1538 9y ago
Easy way to get geo from ip. I hate a lot of the options: downloading binarys or using google's that just regulates you.
- nolite 9y agoThere was a solution for this on HN not a week ago..
- ypys 9y agoHere it is: https://ipinfo.io https://ipinfo.io
- avar 9y agoThese free databases are really inaccurate in many cases compared to e.g. Maxmind. E.g. this thinks my IP address is 100 km away near the German border, but Maxmind's commercial DB puts me a 7 minute walk away in the center of Amsterdam. They're better than nothing, but be careful when relying on them for anything you need accurate Geo-IP info for.
- romanovcode 9y agoI also don't recommend free solution for serious business. This can be critical for E-Commerce which uses GEO-Locking. For customers that live on the borders it is very important that correct country is selected.
- superted 9y agoWe are using the geo lookup api fram maxmind, with success. Gets quite expensive though, if you are not careful
- deleted 9y ago[deleted]
- johns 9y agoMaxMind works great for us.
- seanwilson 9y agoEasiest solution is to put Cloudflare in front of your site for free and they'll pass in the geo data in the request header. Agreed that playing with binaries that you have to periodically download is horrible.
- richardkeller 9y agohttps://ipinfo.io https://ipinfo.io works well. Alternatively, CloudFlare also works well if you just need the country code, which it can attach as an HTTP header to each request.
- BrandoElFollito 9y agoI used http://ip-api.com/json http://ip-api.com/json, the precision varies but at least the country level is fine. From the limited tests I did I was in the 5 km radios range.