

Go-based freegeoip.net now supports SSL for its API - fiorix
http://freegeoip.net

======
emptystacks
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/#...](https://developers.google.com/maps/documentation/geocoding/#Limits)

~~~
moatra
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...](https://developers.google.com/maps/documentation/business/geolocation/)

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

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

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

~~~
Aloisius
Because anything that mentions Go gets more Karma?

~~~
pstuart
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.

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

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

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

------
nodesocket
GitHub issues as their best.

[https://github.com/fiorix/freegeoip/issues/22](https://github.com/fiorix/freegeoip/issues/22)

Thanks guys for implementing it.

------
polvi
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.

~~~
fiorix
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.

------
disclosure
See also
[https://dazzlepod.com/ip/8.8.8.8.json](https://dazzlepod.com/ip/8.8.8.8.json)
w/o hard limit; replace 8.8.8.8 with any IP.

------
manishsharan
Is this a REST API over Maxmind db ?

~~~
zapt02
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.

~~~
fiorix
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.

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

~~~
fiorix
;)

------
stock_toaster
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)?

~~~
fiorix
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.

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

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

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

~~~
fiorix
Thanks!

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

~~~
fiorix
Thank you!

------
tlercher
No IPv6 support?

~~~
cpeterso
There's an open issue for IPv6 on GitHub:
[https://github.com/fiorix/freegeoip/issues/21](https://github.com/fiorix/freegeoip/issues/21)

