News for hackers. Stuff that matters.
Re:Ask HN: What API do you wish you had while building your ... by ransom1538 on Sunday July 09, 2017 @03:13PM (#14731185)
Easy way to get geo from ip. I hate a lot of the options: downloading binarys or using google's that just regulates you.
Re:Ask HN: What API do you wish you had while building your ... by richardkeller on Sunday July 09, 2017 @04:27PM (#14731513)
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.
Re:Ask HN: What API do you wish you had while building your ... by seanwilson on Sunday July 09, 2017 @04:20PM (#14731485)
Easiest 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.
Re:Ask HN: What API do you wish you had while building your ... by superted on Sunday July 09, 2017 @03:17PM (#14731202)
We are using the geo lookup api fram maxmind, with success. Gets quite expensive though, if you are not careful
Re:Ask HN: What API do you wish you had while building your ... by johns on Sunday July 09, 2017 @04:09PM (#14731435)
MaxMind works great for us.
Re:Ask HN: What API do you wish you had while building your ... by BrandoElFollito on Monday July 10, 2017 @05:00AM (#14734339)
I used 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.
Re:Ask HN: What API do you wish you had while building your ... by nolite on Sunday July 09, 2017 @03:16PM (#14731196)
There was a solution for this on HN not a week ago..
Re:Ask HN: What API do you wish you had while building your ... by ypys on Sunday July 09, 2017 @03:31PM (#14731262)
Here it is: https://ipinfo.io
Re:Ask HN: What API do you wish you had while building your ... by avar on Sunday July 09, 2017 @04:36PM (#14731542)
These 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.

Re:Ask HN: What API do you wish you had while building your ... by romanovcode on Monday July 10, 2017 @04:55AM (#14734324)
I 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.