Details of the IP to Country Lite database MMDB file downloads
The format used in the IP to Country Lite MMDB database files is compliant with version 2.0 of the specification and is compatible with free MMDB reader libraries.
In order to maximize compatibility with existing tools and libraries, we try to stay as close as possible to their expected schema.
utf8_string
uint32
map<utf8_string>
uint32
utf8_string
boolean
map<utf8_string>
Below is a sample output from the mmdblookup tool that show all available details for a given IP address :
~$ mmdblookup -f dbip-country-lite.mmdb -i 8.8.8.8
{
"continent":
{
"code":
"NA" <utf8_string>
"geoname_id":
6255149 <uint32>
"names":
{
"de":
"Nordamerika" <utf8_string>
"en":
"North America" <utf8_string>
"es":
"Norteamérica" <utf8_string>
"fa":
" امریکای شمالی" <utf8_string>
"fr":
"Amérique Du Nord" <utf8_string>
"ja":
"北アメリカ大陸" <utf8_string>
"ko":
"북아메리카" <utf8_string>
"pt-BR":
"América Do Norte" <utf8_string>
"ru":
"Северная Америка" <utf8_string>
"zh-CN":
"北美洲" <utf8_string>
}
}
"country":
{
"geoname_id":
6252001 <uint32>
"is_in_european_union":
false <boolean>
"iso_code":
"US" <utf8_string>
"names":
{
"de":
"Vereinigte Staaten von Amerika" <utf8_string>
"en":
"United States" <utf8_string>
"es":
"Estados Unidos de América (los)" <utf8_string>
"fa":
"ایالات متحدهٔ امریکا" <utf8_string>
"fr":
"États-Unis" <utf8_string>
"ja":
"アメリカ合衆国" <utf8_string>
"ko":
"미국" <utf8_string>
"pt-BR":
"Estados Unidos" <utf8_string>
"ru":
"США" <utf8_string>
"zh-CN":
"美国" <utf8_string>
}
}
}
You may read the IP to Country Lite database and handle the data with your own code, or use it from existing software such as web servers.
There are several free open-source MMDB reader libraries available for many development platforms :
ngx_http_geoip2_module creates variables with values from a MMDB database based on the client IP (default) or from a specific variable (supports both IPv4 and IPv6).
The module now supports nginx streams and can be used in the same way the http module can be used.
mod_maxminddb allows you to query MMDB files from Apache 2.2+ using the libmaxminddb library.