GeoIP2 Enterprise Databases
Determine geolocation data such as country, region, state, city, ZIP/postal code, and additional intelligence such as confidence factors, ISP, domain, and connection type.
To learn more about the GeoIP2 Enterprise database, please visit the GeoIP2 Enterprise Database page.
If you are interested in purchasing the database, please contact our Enterprise Business team for assistance.
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.
Data Privacy
To comply with data privacy regulations, please monitor our Do Not Sell My Personal Information Requests page (login required) for IP addresses and networks that should not be used for advertising or marketing purposes. You can automate retrieval of this list using our privacy exclusions API.
Binary Database
Binary databases make use of the MaxMind DB file format. MaxMind provides official client APIs in the language listed below. The following client APIs are open source and licensed under the Apache License, Version 2.0.
You can also use the mmdbinspect tool (in beta), a command line interface built with Go, to look up one or more IPs from one or more MMDB databases and receive output in a parsable JSON format.
Language or Framework | Documentation | Example |
---|---|---|
.NET (C#) | GitHub - Database Usage | Enterprise Example |
Java | GitHub - Database Usage | Enterprise Example |
Node.js | GitHub - Database Usage | Enterprise Example |
PHP | GitHub - Database Reader | Enterprise Example |
Python | GitHub - Database Usage | Enterprise Example |
Ruby | GitHub - Database Reader | Enterprise Example |
CSV Database
In addition to our MaxMind DB binary format, we also offer GeoIP2 and GeoLite2 databases in a CSV format suitable for importing into a SQL database. The CSV files are shipped as a single zip file.
The zip file itself is named GeoIP2-Enterprise-CSV_{YYYYMMDD}.zip
. The downloaded zip file contains a single directory which in turn contains several files. That directory is named GeoIP2-Enterprise-CSV_{YYYYMMDD}
.
The files in thie zip archive are:
Filename | Description |
---|---|
| Copyright statement |
| End user license |
| CSV file containing data on IPv4 addresses |
| CSV file containing data on IPv6 addresses |
| CSV file containing data on ISPs. This may be cross referenced with the various blocks files using the shared |
| CSV files containing data on locations. This may be cross referenced with the various blocks files using the shared |
All the CSV files start with a single header row containing column names. The specific column names and their contents are detailed below. The files are encoded as UTF-8.
Blocks Files
There are two CSV files for network blocks, one each for IPv4 and IPv6 blocks.
These files are named GeoIP2-Enterprise-Blocks-IPv4.csv
and
GeoIP2-Enterprise-Blocks-IPv6.csv
respectively.
Name | Type | Description |
---|---|---|
network | IP network as a string | This is the IPv4 or IPv6 network in CIDR format such as "2.21.92.0/29" or "2001:4b0::/80". We offer a utility to convert this column to start/end IPs or start/end integers. See the conversion utility section for details. |
geoname_id | integer | A unique identifier for the network's location as specified by GeoNames. This ID can be used to look up the location information in the Location file. Learn more about GeoNames IDs on our Knowledge Base. |
registered_country_geoname_id | integer | The registered country is the country in which the ISP has registered the network. This column contains a unique identifier for the network's registered country as specified by GeoNames. This ID can be used to look up the location information in the Location file. Learn more about registered countries on our Knowledge Base. |
represented_country_geoname_id | integer | The represented country is the country which is represented by users of the IP address. For instance, the country represented by an overseas military base. This column contains a unique identifier for the network's represented country as specified by GeoNames. This ID can be used to look up the location information in the Location file. Learn more about represented countries on our Knowledge Base. |
is_anonymous_proxy | boolean | Deprecated. Please see our GeoIP2 Anonymous IP database to determine whether the IP address is used by an anonymizing service. |
is_satellite_provider | boolean | Deprecated. |
postal_code | string | A postal code close to the user's location. For the following countries, we return partial postal codes with the number of characters indicated below:
|
latitude* | decimal | The approximate WGS84 latitude of the location associated with the network. Learn about the geolocation area defined by latitude, longitude, and accuracy radius, on our Knowledge Base. |
longitude* | decimal | The approximate WGS84 longitude of the location associated with the network. Learn about the geolocation area defined by latitude, longitude, and accuracy radius, on our Knowledge Base. |
accuracy_radius | integer | The radius in kilometers around the specified location where the IP address is likely to be. Learn about the geolocation area defined by latitude, longitude, and accuracy radius, on our Knowledge Base. |
isp_id | integer | A identifier for the ISP. This ID can be used to look up the location information in the ISP file. Learn more about ISP data on our Knowledge Base. |
domain | string | The domain associated with the network. Learn more about domain name data on our Knowledge Base. |
country_confidence | decimal (1-100) | The confidence that the country was correctly geolocated. Learn more about confidence factors on our Knowledge Base. |
subdivision_confidence | decimal (1-100) | The confidence that the most specific subdivision was correctly geolocated. Learn more about confidence factors on our Knowledge Base. |
city_confidence | decimal (1-100) | The confidence that the city was correctly geolocated. Learn more about confidence factors on our Knowledge Base. |
postal_confidence | decimal (1-100) | The confidence that the postal code was correctly geolocated. Learn more about confidence factors on our Knowledge Base. |
is_legitimate_proxy | boolean | Deprecated. Use the user_type data to identify traffic from businesses. Learn more about user_type data on our knowledge base. To identify anonymous proxies, you can learn more about the GeoIP2 Anonymous IP database in the developer portal or our main website. |
is_anycast | boolean | This is 1 if the network is an anycast network. |
* The coordinates are not precise and should not be used to identify a
particular street address or household. To better represent a level of
accuracy, please include the accuracy_radius
when displaying latitude and
longitude and make it clear that the coordinates refer to a larger
geographical area instead of a precise location.
ISP File
A single CSV file, called GeoIP2-Enterprise-ISP.csv
, contains information on
ISPs.
Name | Type | Description |
---|---|---|
isp_id | integer | The identifier for the ISP. This key can be cross referenced
with the |
isp | string | The name of the ISP associated with the IP address. |
organization | string | The name of the organization associated with the IP address. |
autonomous_system_number | integer | The ASN assigned to the ISP for routing. |
autonomous_system_organization | string | The name of the autonomous system organization. |
connection_type | string | The type of connection. This will be one of the following values:
|
user_type | string | The user type associated with the IP address. This will be one of the following values.
|
mobile_country_code | string | The mobile country code (MCC) associated with the IP address and ISP. |
mobile_network_code | string | The mobile network code (MNC) associated with the IP address and ISP. |
Locations Files
The zip file includes one location file for each locale code for which data is
available. There will always be an "en" file containing a record for every
geoname_id
used in the blocks files. Files corresponding to other locales will
exist and have a record for a geoname_id
only if data is available. The other
possible locales are "de", "es", "fr", "ja", "pt-BR", "ru", and "zh-CN".
These files are named GeoIP2-Enterprise-Locations-{locale}.csv
. An example
name would be "GeoIP2-City-Locations-en.csv".
Name | Type | Description |
---|---|---|
geoname_id | integer | A unique identifier for the a location as specified by GeoNames. This ID can be used as a key for the Location file. Learn more about GeoNames IDs on our Knowledge Base. |
locale_code | string | The locale that the names in this row are in. This will always correspond to the locale name of the file. |
continent_code | string (2) | The continent code for this location. Possible codes are:
|
continent_name | string | The continent name for this location in the file's locale. Learn more about localized names on our Knowledge Base. |
country_iso_code | string (2) | A two-character ISO 3166-1 country code for the country associated with the location. |
country_name | string | The country name for this location in the file's locale. Learn more about localized names on our Knowledge Base. |
subdivision_1_iso_code | string (1-3) | A string of up to three characters containing the region-portion of the ISO 3166-2 code for the first level region associated with the IP address. Some countries have two levels of subdivisions, in which case this is the least specific. For example, in the United Kingdom this will be a country like "England", not a county like "Devon". |
subdivision_1_name | string | The subdivision name for this location in the file's locale. As with the subdivision code, this is the least specific subdivision for the location. Learn more about localized names on our Knowledge Base. |
subdivision_2_iso_code | string (1-3) | A string of up to three characters containing the region-portion of the ISO 3166-2 code for the second level region associated with the IP address. Some countries have two levels of subdivisions, in which case this is the most specific. For example, in the United Kingdom this will be a a county like "Devon", not a country like "England". |
subdivision_2_name | string | The subdivision name for this location in the file's locale. As with the subdivision code, this is the most specific subdivision for the location. Learn more about localized names on our Knowledge Base. |
city_name | string | The city name for this location in the file's locale. Learn more about localized names on our Knowledge Base. |
metro_code | integer | Metro code is a geolocation target code from Google. |
time_zone | string | The time zone associated with location, as specified by the IANA Time Zone Database, e.g., “America/New_York”. |
is_in_european_union | boolean | This is 1 if the country associated with the location is a member state of the European Union. It is 0 otherwise. |
Returned Values as Database, Map, Dict, or Hash Keys
We strongly discourage you from using a value from any *_name
field as a key
in a database or map/dict/hash data structure.
These names may change between releases. Instead we recommend using one of the following:
Data object | Recommended key |
---|---|
city | geoname_id |
continent | continent_code |
country | country_iso_code |
postal | postal_code |
subdivisions | subdivision_{1,2}_iso_code |
Conversion Utility
We've created a small utility program to allow you to convert a GeoIP2 CSV file's representation of IP addresses to another format. You can choose between start/end IP addresses, with the addresses represented as strings or integers.
The program is available from our geoip2-csv-converter GitHub project releases tab.
Example Files
We maintain example files in CSV and MMDB format. The files contain dummy data rather than real GeoIP data.
CSV Example Files
We maintain examples of the CSV files as they would be downloaded from the account portal:
MMDB Example Files
We maintain test MMDB files on GitHub:
Alternatively, you can view all of our MMDB test data on GitHub.
Database Sizes
MaxMind databases can vary in size from release to release. If you are working with file size limitations that are concerning, you should build your integrations to fail gracefully in event of a significant size change.
From March to June 2024, the database files varied in file size and number of networks as follows:
Database | CSV File Size | MMDB File Size | IPv4 Networks | IPv6 Networks |
---|---|---|---|---|
GeoIP Enterprise | 975 MB - 1.06 GB | 341 MB - 350 MB | 8,064,000 - 8,733,000 | 2,933,000 - 3,151,000 |
The listed file sizes are for unpacked databases. Databases are downloaded in a compressed format.
Database Changes
We may add new data fields to the Enterprise database at any time.
New database fields are added as new columns to the right of existing columns in our CSV files, and as additional data in our MMDB files.
Subscribe to our GeoIP2 release notes to be notified when new data is added to our databases.
APIs and Third-Party Integrations
You can find a complete list of official and unofficial client APIs, and third-party integrations on the database documentation page.
This page was last updated on September 12, 2024.