I have an open source project I need a similarly open source IP GeoLocation database for. i.e. IP address to country (and ideally city). Ideally with a license that allows redistribution.

This is a question that's been asked before (Advice on geocoding IP addresses, and https://stackoverflow.com/questions/3232516/geocode-an-ip-address most noteably), but they were for RESTful/API interfaces; I want a database that can be downloaded and used offline.

So far I've found two potentials:

IP2Location's 'Lite' - which claims to be open source but doesn't allow redistribution and has a very restrictive set of terms of use.

MaxMind's GeoLite2 - Released under a Attributeion ShareAlike Unported License, but again with restrictions on redistribution.

Does anyone know of any suitable datasets? Thanks.

  • If the latter is Attribution-Share alike, how can it restrict redistribution if you just mention the license? – user30184 Sep 20 '14 at 13:45
  • @user30184 - Beats me, I guess there's an overzealous business manager/lawyer somewhere behind it. Unfortunately for my purposes I have to work within the restrictions given as I'm not a lawyer and so can't know if it's valid/not. – GIS-Jonathan Sep 22 '14 at 19:22
  • 1
    The data are area clearly under a very well known licence creativecommons.org/licenses/by-sa/3.0. Summary from the front page "You are free to: Share — copy and redistribute the material in any medium or format. Adapt — remix, transform, and build upon the material for any purpose, even commercially. The licensor cannot revoke these freedoms as long as you follow the license terms. – user30184 Sep 22 '14 at 20:05
  • I had a similar requirement. Hope this helps. Cheers! ipinfodb.com/free-database – Md Saif Mar 18 '18 at 17:48

Here is a database I wrote for IP to country that is open source under Apache2: https://github.com/geoacumen/geoacumen-country

If anyone has any insight on how one would build an IP to City mapping database I would also be very interested.


Sure, you try this one https://ipinfodb.com/free-database

You can try this one as well: https://db-ip.com/db/.

Now, remember, they are there for your money, so the free db is lite version of what their commercial products is.

  • 1
    Neither of these are actually open source – A X Jun 4 '20 at 1:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.