Need help with geoip-api-python?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

224 Stars 62 Forks GNU Lesser General Public License v2.1 113 Commits 0 Opened issues


GeoIP Legacy Python API

Services available


Need anything else?

Contributors list


MaxMind GeoIP Legacy Python Extension API

End of Life

MaxMind will be retiring the GeoIP Legacy databases at the end of May 2022. Until then, this library will only receive critical security and bug fixes. Support for this library will end completely with the last release of the legacy GeoIP databases.

We recommend that you upgrade to our GeoIP2 databases. You can read these from Python using

our GeoIP2 Python API 


our blog post 
_ for more information.


  • Python 2.5+ or 3.3+
  • GeoIP Legacy C Library 1.4.7 or greater




.. code-block:: bash

$ pip install GeoIP

From source:

.. code-block:: bash

$ python build
$ python install

IP Geolocation Usage

IP geolocation is inherently imprecise. Locations are often near the center of the population. Any location provided by a GeoIP database should not be used to identify a particular address or household.


See the examples in the



If you get a " cannot open shared object No such file or directory" error, add /usr/local/lib to /etc/ then run /sbin/ldconfig /etc/


Copyright (c) 2014 MaxMind LLC

All rights reserved. This package is free software; it is licensed under the LGPL 2.1 or greater.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.