Hacker News new | past | comments | ask | show | jobs | submit login
Go-based freegeoip.net now supports SSL for its API (freegeoip.net)
82 points by fiorix on July 27, 2013 | hide | past | favorite | 36 comments



For those unfamiliar, this free usage limit is much more relaxed than Google's Geocoder, which limits you to 2,500 free requests per day.

https://developers.google.com/maps/documentation/geocoding/#...


Google offers three geocoders:

The first[1] converts ip to location, and allows 100 free queries per day.

The second[2] converts physical addresses to location as part of it maps JavaScript api, and is part of its 25,000 free requests/day.

The third[3] is its http version of geocoding, which also converts physical addresses to locations or visa-versa. This api has the 2,500 req/day limit.

[1]https://developers.google.com/maps/documentation/business/ge...

[2]https://developers.google.com/maps/documentation/javascript/...

[3]https://developers.google.com/maps/documentation/geocoding/


Also note that Google's geocoder can only be used for results to be displayed on a Google map (mentioned in emptystacks's link, also section 10.1.1 (g): https://developers.google.com/maps/terms)


Google's API is for a very different thing: it converts an address to a lat/long and vice-versa.


you can fork it and run it on your own servers without the limit..


Why is it important what programming language was used in implementing a given web service+


This is a site for hackers, a lot of whom build things on the web. It's useful to get a sense of what tools are in vogue and/or complete enough to do certain projects.


Because freegeoip.net is open source and has always been a personal research project. First versions were written in Python, initially running on GAE, then twisted+cyclone, and currently in Go.


Because it is open source. If I am going to start using a service, I like to know if can fix bugs myself easily should the need arise.


Because anything that mentions Go gets more Karma?


Maybe because Go is exciting as a new and accessible language that appears to be both fast and pleasant to use?

I'm looking forward to ditching Python for Go.


This is exactly what I've been doing for the last months and freegeoip.net is part of the change.


Well written code except around //Check Quota . Scope for better readability there. Thanks!


There's definitely room for improvement there, thanks for pointing that out.


These guys might consider allowing people to pay for more requests. Even with the source, it would be easier for some people to just pay you, and you can still keep everything open source.


No plans to see anything there. It's a community supported service (volunteer donations only) and will always be. Also, although it currently uses MaxMind's GeoLite, this system has absolutely no affiliation with any company.


I don't think they're allowed to charge for it, since they're using the MaxMind database (see https://www.maxmind.com/en/partner)


See also https://dazzlepod.com/ip/8.8.8.8.json w/o hard limit; replace 8.8.8.8 with any IP.


GitHub issues as their best.

https://github.com/fiorix/freegeoip/issues/22

Thanks guys for implementing it.


Is this a REST API over Maxmind db ?


This needs more visibility. There should be clear indication on the page that this is just an API for the freely available MaxMind db's.


It's not. As I explained elsewhere it currently uses MaxMind but there's no affiliation with the company and I might eventually switch to any other db as did many times in the past.


According to the footer, it appears to be so.


Thanks, I've been looking for a Geo-IP API that supports both JSONP and SSL. Perfect.


;)


fiorix, I am curious why you are using sqlite/redis as a store for the geoip data, instead of using cgo in conjunction with libGeoIP.

Was it to enable updates to the geoip data if you get corrections (crowdsourced or otherwise)?


Some of the early versions used libgeoip, but the database has changed many times over time; it started with MaxMind data, then switched to ipinfodb.com, then ip2location.com came into the mix, and currently is back to using MaxMind again with a few tweaks. The idea is to be free to change to whatever is more suitable whenever is necessary... Redis was initially used in the Python version (twisted+cyclone) to share usage quotas between multiple instances (one per cpu), and ended up in the Go version just because; actually, it could use a map or something, but I'd have to implement the ttl part... In other words, it's mostly for historical reasons.


NICE! I've been looking for something like this to interface with Piwik


Piwik already has GeoIP with the same database (Maxmind) built in.


Great job! Finally a perfect geoip database with api application. :)


Thanks!


Nice job!! The source code is very well written!


Thank you!


No IPv6 support?


There's an open issue for IPv6 on GitHub: https://github.com/fiorix/freegeoip/issues/21


Gotta spend some time on that...




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: