The GeoIP product is available in a variety of downloadable databases. These databases use a custom binary format to maximize lookup speed. MaxMind also offers CSV versions of the same data. This is useful if you would like to import this data into a SQL RDBMS, for example.
Please see our CSV database documentation.
The binary databases come in many flavors, each of which contains a specific dataset. These are all offered as separate products with their own subscription. We provide installation instructions for GeoIP Country and GeoIP City.
At present, we offer the following databases:
We supply APIs for many major programming languages. Please see our benchmarks if you are interested in comparing the speed of various APIs.
If you'd like to embed GeoIP in the Apache server, we offer mod_geoip2 for this purpose.
This module can only look up the IP address of the client connected to the web server. It sets environment variables containing the results of the IP address lookup.
See the mod_geoip2 documentation for more details.
This code is licensed under the LGPL. You can download the latest version of the API from our download server.
This API should work on most Unix platforms. For installation on Windows,
please see the
READMEwin32.txt file in the distribution tarball.
Note that while most of the API is thread-safe,
not. In addition, opening a database with the
flag is not thread-safe.
Packages for this library are available in many distributions. They are usually named "GeoIP", "libgeoip1", or "libGeoIP1". Some systems (like Debian) may split the package into "libgeoip1" (the library) and "libgeoip-dev" (headers and static libraries).
We offer an LGPL-licensed C# library on our download server. This library does not require the libGeoIP C library and is thread-safe.
The C# library should work with both Microsoft's .NET framwork as well as Mono.
We offer an LGPL-licensed Java library on our download server. This library does not require the libGeoIP C library and is thread-safe.
We offer a COM API for the MaxMind Country, Region, City, ISP, and Organization database. To get GeoIP or GeoLite City to work with the new COM API, you must set GeoIP.set_db_path to the directory containing the GeoIPCity.dat file. If you are using GeoLite data, you have to rename GeoLiteCity.dat to GeoIPCity.dat for this to work.
The MS COM API may not work on 64 bit machines. To install on a 64 bit machine, copy the dll to %windir%/SysWOW64, then register the dll. If that doesn't work, a client of ours has documented a MS COM API guide for 64 bit machines.
Source code for the MS COM API is available.
GeoIP is available in two forms for Perl. The Geo::IP module can either use a XS wrapper to the libGeoIP C library installed on your system, or use pure Perl code. Geo::IP::PurePerl has been merged with Geo::IP and is now deprecated.
We offer an LGPL-licensed pure PHP API. This API works on Windows and Unix.
Finally, there are several third-party PHP APIs.
We offer an LGPL-licensed Python library that links against the libGeoIP C library on our download server.
If you require a faster API, there is a PECL package that lets you embed the libGeoIP C library in the PHP interpreter. This package also has a newer fork on github which supports more of the GeoIP data.
We offer instructions for using our downloadable databases with OpenX.