# MaxMind Developer Portal
Source: https://dev.maxmind.com/
> Documentation for MaxMind's GeoIP and GeoLite IP intelligence databases and
> web services, and for the minFraud fraud detection web services.
Every documentation page has a Markdown version at the page URL followed by
`index.md`, for example
https://dev.maxmind.com/geoip/docs/web-services/responses/index.md. Every page listed
below, as one Markdown file, is at
[llms-full.txt](https://dev.maxmind.com/llms-full.txt).
The GeoIP web services are GeoIP Country, GeoIP City Plus, and GeoIP Insights.
The minFraud web services are minFraud Score, minFraud Insights, and minFraud
Factors. Each field in the API reference names the services that return it.
## GeoIP and GeoLite
- [GeoIP and GeoLite](https://dev.maxmind.com/geoip/index.md): Overview of the GeoIP and GeoLite IP intelligence databases and web services, with links to guides and resources.
- [GeoIP and GeoLite Database Documentation](https://dev.maxmind.com/geoip/docs/databases/index.md): Overview of the GeoIP and GeoLite databases, with official and third-party client APIs, integrations, and the mmdbinspect command-line tool.
- [GeoIP Anonymous IP Databases](https://dev.maxmind.com/geoip/docs/databases/anonymous-ip/index.md): Formats, example files, and sizes of the GeoIP Anonymous IP database, which identifies proxy, VPN, hosting, and other anonymous IP addresses.
- [GeoIP Anonymous IP binary database fields](https://dev.maxmind.com/geoip/docs/databases/anonymous-ip/binary/index.md): Reference for each field in the GeoIP Anonymous IP binary (MMDB) database.
- [GeoIP Anonymous Plus Databases](https://dev.maxmind.com/geoip/docs/databases/anonymous-plus/index.md): Formats, example files, and sizes of the GeoIP Anonymous Plus database, which identifies anonymizer traffic with confidence scores and VPN provider names.
- [GeoIP Anonymous Plus binary database fields](https://dev.maxmind.com/geoip/docs/databases/anonymous-plus/binary/index.md): Reference for each field in the GeoIP Anonymous Plus binary (MMDB) database.
- [GeoLite ASN Databases](https://dev.maxmind.com/geoip/docs/databases/asn/index.md): Formats, example files, and sizes of the GeoLite ASN database, which gives the autonomous system number and organization for an IP address.
- [GeoLite ASN binary database fields](https://dev.maxmind.com/geoip/docs/databases/asn/binary/index.md): Reference for each field in the GeoLite ASN binary (MMDB) database.
- [GeoIP and GeoLite City and Country Databases](https://dev.maxmind.com/geoip/docs/databases/city-and-country/index.md): Formats, example files, and sizes of the GeoIP and GeoLite City and Country databases, which give the country, subdivision, city, and postal code.
- [GeoIP City binary database fields](https://dev.maxmind.com/geoip/docs/databases/city-and-country/city-binary/index.md): Reference for each field in the GeoIP City binary (MMDB) database, grouped by top-level key.
- [GeoIP Country binary database fields](https://dev.maxmind.com/geoip/docs/databases/city-and-country/country-binary/index.md): Reference for each field in the GeoIP Country binary (MMDB) database, grouped by top-level key.
- [GeoIP Connection Type Databases](https://dev.maxmind.com/geoip/docs/databases/connection-type/index.md): Formats, example files, and sizes of the GeoIP Connection Type database, which identifies cellular, cable/DSL, corporate, and satellite connections.
- [GeoIP Connection Type binary database fields](https://dev.maxmind.com/geoip/docs/databases/connection-type/binary/index.md): Reference for each field in the GeoIP Connection Type binary (MMDB) database.
- [GeoIP Domain Databases](https://dev.maxmind.com/geoip/docs/databases/domain/index.md): Formats, example files, and sizes of the GeoIP Domain database, which gives the second-level domain name for an IP address.
- [GeoIP Domain binary database fields](https://dev.maxmind.com/geoip/docs/databases/domain/binary/index.md): Reference for each field in the GeoIP Domain binary (MMDB) database.
- [GeoIP Enterprise Databases](https://dev.maxmind.com/geoip/docs/databases/enterprise/index.md): Formats, example files, and sizes of the GeoIP Enterprise database, which adds confidence factors, ISP, domain, and connection type to geolocation data.
- [GeoIP Enterprise binary database fields](https://dev.maxmind.com/geoip/docs/databases/enterprise/binary/index.md): Reference for each field in the GeoIP Enterprise binary (MMDB) database, grouped by top-level key.
- [GeoIP ISP Databases](https://dev.maxmind.com/geoip/docs/databases/isp/index.md): Formats, example files, and sizes of the GeoIP ISP database, which gives the ISP, organization, and autonomous system for an IP address.
- [GeoIP ISP binary database fields](https://dev.maxmind.com/geoip/docs/databases/isp/binary/index.md): Reference for each field in the GeoIP ISP binary (MMDB) database.
- [GeoIP Residential Proxy Databases](https://dev.maxmind.com/geoip/docs/databases/residential-proxy/index.md): Formats, example files, and sizes of the GeoIP Residential Proxy database, which identifies IP addresses seen in residential proxy networks.
- [GeoIP Residential Proxy binary database fields](https://dev.maxmind.com/geoip/docs/databases/residential-proxy/binary/index.md): Reference for each field in the GeoIP Residential Proxy binary (MMDB) database.
- [GeoIP Static IP Score Databases](https://dev.maxmind.com/geoip/docs/databases/static-ip-score/index.md): Formats, example files, and sizes of the GeoIP Static IP Score database, which shows how static or dynamic an IP address is.
- [GeoIP Static IP Score binary database fields](https://dev.maxmind.com/geoip/docs/databases/static-ip-score/binary/index.md): Reference for each field in the GeoIP Static IP Score binary (MMDB) database.
- [GeoIP User Count Databases](https://dev.maxmind.com/geoip/docs/databases/user-count/index.md): Formats, example files, and sizes of the GeoIP User Count database, which estimates the number of users on an IP address and its subnet.
- [GeoIP User Count binary database fields](https://dev.maxmind.com/geoip/docs/databases/user-count/binary/index.md): Reference for each field in the GeoIP User Count binary (MMDB) database.
- [GeoIP and GeoLite Web Services Documentation](https://dev.maxmind.com/geoip/docs/web-services/index.md): Overview of the GeoIP and GeoLite web services: the OpenAPI specification, client APIs, timeouts, curl examples, accuracy, and versioning.
- [GeoIP Legacy Web Services](https://dev.maxmind.com/geoip/docs/web-services/legacy/index.md): Reference for the GeoIP Legacy web services HTTP API, which is not available to new customers.
- [GeoIP and GeoLite API Requests](https://dev.maxmind.com/geoip/docs/web-services/requests/index.md): Reference for GeoIP and GeoLite web service requests: authorization, service endpoints, headers, and how to troubleshoot IP lookups.
- [GeoIP and GeoLite API Responses](https://dev.maxmind.com/geoip/docs/web-services/responses/index.md): Reference for GeoIP and GeoLite web service responses: headers, errors, rate limits, and each field of the response body.
- [Testing GeoIP Web Services in the MaxMind Sandbox](https://dev.maxmind.com/geoip/docs/web-services/sandbox-environment/index.md): How to test a GeoIP web service integration in the MaxMind Sandbox: license keys, Sandbox endpoints, and test data.
- [GeoIP Exchange documentation](https://dev.maxmind.com/geoip/geoip-exchange/index.md): How GeoIP Exchange members can automate downloads of the GeoIP Exchange geofeed report.
- [GeoLite on Snowflake](https://dev.maxmind.com/geoip/geolite-on-snowflake/index.md): How to get and query the GeoLite Country, City, and ASN datasets on the Snowflake Marketplace.
- [GeoLite Databases and Web Services](https://dev.maxmind.com/geoip/geolite2-free-geolocation-data/index.md): How to sign up for GeoLite and use the free GeoLite geolocation and ASN databases and web services.
- [Geolocate an IP](https://dev.maxmind.com/geoip/geolocate-an-ip/index.md): Guides to geolocate an IP address with GeoIP and GeoLite databases, server-side web service calls, or client-side JavaScript.
- [Geolocate an IP address using Web Services with the client-side JavaScript](https://dev.maxmind.com/geoip/geolocate-an-ip/client-side-javascript/index.md): How to use the GeoIP JavaScript client to call GeoIP web services from the browser, and the limits of this approach.
- [Geolocate an IP address using Databases](https://dev.maxmind.com/geoip/geolocate-an-ip/databases/index.md): Step-by-step guide to geolocate an IP address with a GeoIP or GeoLite database and an official client library.
- [Geolocate an IP address using Web Services](https://dev.maxmind.com/geoip/geolocate-an-ip/web-services/index.md): Step-by-step guide to geolocate an IP address with a GeoIP or GeoLite web service and an official client library.
- [Importing Databases](https://dev.maxmind.com/geoip/importing-databases/index.md): Guides to import GeoIP and GeoLite CSV databases into PostgreSQL or MySQL.
- [Importing GeoIP and GeoLite databases to MySQL](https://dev.maxmind.com/geoip/importing-databases/mysql/index.md): How to import GeoIP or GeoLite CSV databases into MySQL and query them quickly.
- [Importing GeoIP and GeoLite databases to PostgreSQL](https://dev.maxmind.com/geoip/importing-databases/postgresql/index.md): How to import GeoIP or GeoLite CSV databases into PostgreSQL and index them for fast queries.
- [Privacy Exclusions API](https://dev.maxmind.com/geoip/privacy-exclusions-api/index.md): Reference for the Privacy Exclusions API, which returns the Do Not Sell My Personal Information requests that MaxMind receives.
- [GeoIP Release Notes](https://dev.maxmind.com/geoip/release-notes/index.md): List of GeoIP and GeoLite release notes that announce new features, data changes, and deprecations.
- [Track Location Name Updates](https://dev.maxmind.com/geoip/track-location-name-updates/index.md): How to download the report of changes to the location names in GeoIP databases.
- [Updating GeoIP and GeoLite Databases](https://dev.maxmind.com/geoip/updating-databases/index.md): How to keep GeoIP and GeoLite databases current with GeoIP Update or with direct downloads.
- [Upgrading GeoIP Update from v3.x to v4.0 and higher](https://dev.maxmind.com/geoip/upgrading-geoip-update/index.md): How to upgrade GeoIP Update from version 3.x to version 4.0 or higher.
- [What's New in GeoIP2](https://dev.maxmind.com/geoip/whats-new-in-geoip2/index.md): Changes for developers who move from GeoIP Legacy to the GeoIP2 databases and web services.
## minFraud Web Services
- [minFraud Web Services](https://dev.maxmind.com/minfraud/index.md): Overview of the minFraud Score, minFraud Insights, and minFraud Factors transaction risk services, with links to guides and resources.
- [minFraud Alerts](https://dev.maxmind.com/minfraud/alerts/index.md): How minFraud Alerts tell you by email or webhook when the risk score of a transaction increases after scoring, and how to secure the webhook.
- [minFraud API Documentation](https://dev.maxmind.com/minfraud/api-documentation/index.md): Overview of the minFraud API: the OpenAPI specification, client APIs, the disposition, report, and device tracking features, timeouts, and versioning.
- [minFraud API Requests](https://dev.maxmind.com/minfraud/api-documentation/requests/index.md): Reference for minFraud API requests: authorization, service endpoints, headers, and each field of the request body.
- [minFraud API Responses](https://dev.maxmind.com/minfraud/api-documentation/responses/index.md): Reference for minFraud API responses: headers, errors, rate limits, and each field of the Score, Insights, and Factors response body.
- [Evaluate a Transaction](https://dev.maxmind.com/minfraud/evaluate-a-transaction/index.md): Step-by-step guide to send a transaction to minFraud Score, Insights, or Factors for risk evaluation with an official client library.
- [minFraud Legacy Web Service API](https://dev.maxmind.com/minfraud/minfraud-legacy/index.md): Reference for the minFraud Legacy Standard and Premium web service API, including its inputs, outputs, and Sandbox testing.
- [Normalizing Email Addresses for minFraud](https://dev.maxmind.com/minfraud/normalizing-email-addresses-for-minfraud/index.md): How to normalize an email address before you send its MD5 hash to the minFraud services, with examples.
- [Proxy Detection Legacy Web Service](https://dev.maxmind.com/minfraud/proxy-detection/index.md): Reference for the Proxy Detection Legacy web service, which returns a risk score for an IP address.
- [minFraud Release Notes](https://dev.maxmind.com/minfraud/release-notes/index.md): List of minFraud release notes that announce new features, data changes, and deprecations.
- [Report a transaction](https://dev.maxmind.com/minfraud/report-a-transaction/index.md): How to report chargebacks, suspected fraud, spam, and false positives to MaxMind with the Report Transactions API.
- [Testing minFraud in the MaxMind Sandbox](https://dev.maxmind.com/minfraud/sandbox-environment/index.md): How to test a minFraud integration in the MaxMind Sandbox: license keys, Sandbox endpoints, and test data.
- [Track Devices](https://dev.maxmind.com/minfraud/track-devices/index.md): How the Device Tracking Add-On identifies devices across networks to improve minFraud risk scores, and how to link devices to transactions explicitly.
- [Android Device Tracking](https://dev.maxmind.com/minfraud/track-devices/android/index.md): How to install and use the MaxMind Device SDK for Android to send device data to the minFraud service.
- [iOS Device Tracking](https://dev.maxmind.com/minfraud/track-devices/ios/index.md): How to install and use the MaxMind Device SDK for iOS, with Swift and Objective-C examples, to send device data to the minFraud service.
- [Web Device Tracking](https://dev.maxmind.com/minfraud/track-devices/web/index.md): How to add the Device Tracking Add-On JavaScript to your website, and how to protect it from ad blockers.
- [What's New in minFraud Score, minFraud Insights, and minFraud Factors](https://dev.maxmind.com/minfraud/whats-new-in-minfraud-score-and-minfraud-insights/index.md): Changes for developers who move from minFraud Legacy to minFraud Score, minFraud Insights, and minFraud Factors.
- [Working with Transaction Dispositions](https://dev.maxmind.com/minfraud/working-with-transaction-dispositions/index.md): How to use the disposition API to accept or reject a minFraud transaction after manual review.
## General
- [Contribute to the MaxMind Community](https://dev.maxmind.com/contribute/index.md): How to build and share community tools that use MaxMind APIs and data.
- [License Key Validation API](https://dev.maxmind.com/license-key-validation-api/index.md): Reference for the License Key Validation API, which checks that a MaxMind license key exists and has a valid format.
- [MaxMind Server IP Addresses](https://dev.maxmind.com/maxmind-server-ip-addresses/index.md): List of IP addresses that MaxMind web services and database downloads use, and how to monitor changes to them.
# GeoIP and GeoLite
Source: https://dev.maxmind.com/geoip/
MaxMind’s GeoIP and GeoLite IP intelligence products and services are used to
discover information about a specific IP address. We provide free and paid web
services, subscription-based downloadable databases, and free downloadable
databases.
## GeoIP Products and Services
GeoIP IP intelligence products and services can provide data on geolocation,
network information, anonymizer status, and more. Learn about the different
kinds of
[geolocation data](https://support.maxmind.com/knowledge-base/articles/choose-the-right-maxmind-geolocation-product)
and
[IP intelligence data](https://support.maxmind.com/knowledge-base/articles/choose-the-maxmind-ip-intelligence-data-you-need)
in GeoIP products and services on our knowledge base.
|
Binary Database |
CSV Database |
Web Service* |
| City and Country |
Docs
|
Docs
|
Docs
|
| ISP |
Docs
|
Docs
|
Included in GeoIP City Plus and Insights web services. |
| Domain |
Docs
|
Docs
|
Included in GeoIP City Plus and Insights web services. |
| Connection Type |
Docs
|
Docs
|
Comparable data included in the GeoIP Insights web service. |
| Enterprise |
Docs
|
Docs
|
Comparable data included in the GeoIP Insights web service. |
| Anonymous IP |
Docs
|
Docs
|
Included in the GeoIP Insights web service. |
| Anonymous Plus |
Docs
|
Docs
|
Included in the GeoIP Insights web service. |
| Insights** |
• |
• |
Docs
|
* GeoIP web services provide more accurate geolocation than our
equivalent databases.
Learn more about the differences between GeoIP web services and
databases on our knowledge base.
** The GeoIP Insights web service contains comparable data to all of
the databases and web services listed above.
|
## GeoLite Databases and Services
GeoLite databases and web services provide free geolocation and limited network
data for IP addresses. This data is less accurate than the data in our paid,
GeoIP products and services. You must
[sign up for a free GeoLite account](https://www.maxmind.com/en/create-account)
in order to download GeoLite databases or query the GeoLite web services.
GeoLite uses the same integration methods and documentation as GeoIP (linked
below), with a few minor modifications. It is recommended that you get started
by [reading about GeoLite](/geoip/geolite2-free-geolocation-data/index.md).
| | Binary Database | CSV Database | Web Service |
| --- | --- | --- | --- |
| City and Country | [Docs](/geoip/docs/databases/city-and-country/index.md#binary-databases) | [Docs](/geoip/docs/databases/city-and-country/index.md#csv-databases) | [Docs](/geoip/docs/web-services/index.md) |
| ASN | [Docs](/geoip/docs/databases/asn/index.md#binary-database) | [Docs](/geoip/docs/databases/asn/index.md#csv-database) | Included in the GeoLite City Web Service. |
## Pages in this section
- [GeoIP Release Notes](https://dev.maxmind.com/geoip/release-notes/index.md): List of GeoIP and GeoLite release notes that announce new features, data changes, and deprecations.
- [GeoIP and GeoLite API Requests](https://dev.maxmind.com/geoip/docs/web-services/requests/index.md): Reference for GeoIP and GeoLite web service requests: authorization, service endpoints, headers, and how to troubleshoot IP lookups.
- [GeoIP and GeoLite API Responses](https://dev.maxmind.com/geoip/docs/web-services/responses/index.md): Reference for GeoIP and GeoLite web service responses: headers, errors, rate limits, and each field of the response body.
- [GeoIP and GeoLite City and Country Databases](https://dev.maxmind.com/geoip/docs/databases/city-and-country/index.md): Formats, example files, and sizes of the GeoIP and GeoLite City and Country databases, which give the country, subdivision, city, and postal code.
- [GeoIP and GeoLite Database Documentation](https://dev.maxmind.com/geoip/docs/databases/index.md): Overview of the GeoIP and GeoLite databases, with official and third-party client APIs, integrations, and the mmdbinspect command-line tool.
- [GeoIP and GeoLite Web Services Documentation](https://dev.maxmind.com/geoip/docs/web-services/index.md): Overview of the GeoIP and GeoLite web services: the OpenAPI specification, client APIs, timeouts, curl examples, accuracy, and versioning.
- [GeoIP Anonymous IP Databases](https://dev.maxmind.com/geoip/docs/databases/anonymous-ip/index.md): Formats, example files, and sizes of the GeoIP Anonymous IP database, which identifies proxy, VPN, hosting, and other anonymous IP addresses.
- [GeoIP Anonymous Plus Databases](https://dev.maxmind.com/geoip/docs/databases/anonymous-plus/index.md): Formats, example files, and sizes of the GeoIP Anonymous Plus database, which identifies anonymizer traffic with confidence scores and VPN provider names.
- [GeoIP Connection Type Databases](https://dev.maxmind.com/geoip/docs/databases/connection-type/index.md): Formats, example files, and sizes of the GeoIP Connection Type database, which identifies cellular, cable/DSL, corporate, and satellite connections.
- [GeoIP Domain Databases](https://dev.maxmind.com/geoip/docs/databases/domain/index.md): Formats, example files, and sizes of the GeoIP Domain database, which gives the second-level domain name for an IP address.
- [GeoIP Enterprise Databases](https://dev.maxmind.com/geoip/docs/databases/enterprise/index.md): Formats, example files, and sizes of the GeoIP Enterprise database, which adds confidence factors, ISP, domain, and connection type to geolocation data.
- [GeoIP Exchange documentation](https://dev.maxmind.com/geoip/geoip-exchange/index.md): How GeoIP Exchange members can automate downloads of the GeoIP Exchange geofeed report.
- [GeoIP ISP Databases](https://dev.maxmind.com/geoip/docs/databases/isp/index.md): Formats, example files, and sizes of the GeoIP ISP database, which gives the ISP, organization, and autonomous system for an IP address.
- [GeoIP Legacy Web Services](https://dev.maxmind.com/geoip/docs/web-services/legacy/index.md): Reference for the GeoIP Legacy web services HTTP API, which is not available to new customers.
- [GeoIP Residential Proxy Databases](https://dev.maxmind.com/geoip/docs/databases/residential-proxy/index.md): Formats, example files, and sizes of the GeoIP Residential Proxy database, which identifies IP addresses seen in residential proxy networks.
- [GeoIP Static IP Score Databases](https://dev.maxmind.com/geoip/docs/databases/static-ip-score/index.md): Formats, example files, and sizes of the GeoIP Static IP Score database, which shows how static or dynamic an IP address is.
- [GeoIP User Count Databases](https://dev.maxmind.com/geoip/docs/databases/user-count/index.md): Formats, example files, and sizes of the GeoIP User Count database, which estimates the number of users on an IP address and its subnet.
- [GeoLite ASN Databases](https://dev.maxmind.com/geoip/docs/databases/asn/index.md): Formats, example files, and sizes of the GeoLite ASN database, which gives the autonomous system number and organization for an IP address.
- [GeoLite on Snowflake](https://dev.maxmind.com/geoip/geolite-on-snowflake/index.md): How to get and query the GeoLite Country, City, and ASN datasets on the Snowflake Marketplace.
- [Geolocate an IP](https://dev.maxmind.com/geoip/geolocate-an-ip/index.md): Guides to geolocate an IP address with GeoIP and GeoLite databases, server-side web service calls, or client-side JavaScript.
- [Importing Databases](https://dev.maxmind.com/geoip/importing-databases/index.md): Guides to import GeoIP and GeoLite CSV databases into PostgreSQL or MySQL.
- [Privacy Exclusions API](https://dev.maxmind.com/geoip/privacy-exclusions-api/index.md): Reference for the Privacy Exclusions API, which returns the Do Not Sell My Personal Information requests that MaxMind receives.
- [Testing GeoIP Web Services in the MaxMind Sandbox](https://dev.maxmind.com/geoip/docs/web-services/sandbox-environment/index.md): How to test a GeoIP web service integration in the MaxMind Sandbox: license keys, Sandbox endpoints, and test data.
- [Track Location Name Updates](https://dev.maxmind.com/geoip/track-location-name-updates/index.md): How to download the report of changes to the location names in GeoIP databases.
- [Updating GeoIP and GeoLite Databases](https://dev.maxmind.com/geoip/updating-databases/index.md): How to keep GeoIP and GeoLite databases current with GeoIP Update or with direct downloads.
- [Upgrading GeoIP Update from v3.x to v4.0 and higher](https://dev.maxmind.com/geoip/upgrading-geoip-update/index.md): How to upgrade GeoIP Update from version 3.x to version 4.0 or higher.
- [What's New in GeoIP2](https://dev.maxmind.com/geoip/whats-new-in-geoip2/index.md): Changes for developers who move from GeoIP Legacy to the GeoIP2 databases and web services.
# GeoIP and GeoLite Database Documentation
Source: https://dev.maxmind.com/geoip/docs/databases/
## Databases
- [City and Country Databases](/geoip/docs/databases/city-and-country/index.md): Determine the country, subdivisions (regions), city, and postal code associated with IPv4 and IPv6 addresses worldwide.
- [Enterprise Databases](/geoip/docs/databases/enterprise/index.md): Determine geolocation data such as country, region, state, city, ZIP/postal code, and additional intelligence such as confidence factors, ISP, domain, and connection type.
- [Anonymous IP Databases](/geoip/docs/databases/anonymous-ip/index.md): MaxMind's GeoIP Anonymous IP database helps protect your business by identifying proxy, VPN, hosting, and other anonymous IP addresses.
- [Anonymous Plus Databases](/geoip/docs/databases/anonymous-plus/index.md): MaxMind's GeoIP Anonymous Plus database helps protect your business by identifying anonymized proxy traffic and reducing false positives based on confidence scores, timestamps, and VPN provider names.
- [ISP Databases](/geoip/docs/databases/isp/index.md): Determine the Internet Service Provider, organization name, and autonomous system number and organization associated with an IP address.
- [Connection Type Databases](/geoip/docs/databases/connection-type/index.md): Determine the connection type of your visitors based on their IP address. The database identifies cellular, cable/DSL, corporate, and satellite connection types.
- [Domain Databases](/geoip/docs/databases/domain/index.md): Look up the second-level domain names associated with IPv4 and IPv6 addresses.
- [ASN Databases](/geoip/docs/databases/asn/index.md): Look up the autonomous system number and autonomous system organization associated with IPv4 and IPv6 addresses.
## Client APIs
### Official Client APIs
| Language or Framework | Package Repository | Documentation | Version Control |
| --------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------- | -------------------------------------------------- |
| .NET (C#) | [NuGet](https://www.nuget.org/packages/MaxMind.GeoIP2/) | [GitHub Pages](https://maxmind.github.io/GeoIP2-dotnet/) | [GitHub](https://github.com/maxmind/GeoIP2-dotnet) |
| C | N/A | [GitHub Pages](https://maxmind.github.io/libmaxminddb/) | [GitHub](https://github.com/maxmind/libmaxminddb) |
| Java | [Maven Central Repository](https://search.maven.org/artifact/com.maxmind.geoip2/geoip2) | [GitHub Pages](https://maxmind.github.io/GeoIP2-java/) | [GitHub](https://github.com/maxmind/GeoIP2-java) |
| Node.js | [npm](https://www.npmjs.com/package/@maxmind/geoip2-node) | [GitHub Pages](https://maxmind.github.io/GeoIP2-node/) | [GitHub](https://github.com/maxmind/GeoIP2-node) |
| PHP | [Packagist](https://packagist.org/packages/geoip2/geoip2) | [GitHub Pages](https://maxmind.github.io/GeoIP2-php/) | [GitHub](https://github.com/maxmind/GeoIP2-php) |
| Python | [PyPI](https://pypi.org/project/geoip2/) | [Read the Docs](https://geoip2.readthedocs.io/en/latest/) | [GitHub](https://github.com/maxmind/GeoIP2-python) |
| Ruby | [RubyGems](https://rubygems.org/gems/maxmind-geoip2) | [RubyDoc](https://www.rubydoc.info/gems/maxmind-geoip2) | [GitHub](https://github.com/maxmind/GeoIP2-ruby) |
### Unofficial Client APIs
> **⚠️ Warning**
>
> **Use at your own risk.**
>
> MaxMind does **_not_** offer support for these APIs. Please contact the
> maintainer for assistance.
| Language | API Name | Package Repository | Documentation | Version Control |
| ----------------------- | ------------------------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| C++ | GeoLite2++ | | [Usage](https://www.ccoderun.ca/GeoLite2++/api/usage.html) | |
| Clojure | maximator | [Clojars](https://clojars.org/com.oscaro/maximator) | [README](https://github.com/oscaro/maximator/blob/master/README.md) | [GitHub](https://github.com/oscaro/maximator) |
| Common Lisp | CL-MAXMINDDB | | [README](https://github.com/turtle-bazon/cl-maxminddb/blob/hg/README.md) | [GitHub](https://github.com/turtle-bazon/cl-maxminddb) |
| Crystal | GeoIP2.cr (C extension) | | [README](https://github.com/delef/geoip2.cr/blob/main/README.md) | [GitHub](https://github.com/delef/geoip2.cr) |
| Crystal | MaxMindDB.cr | | [README](https://github.com/delef/maxminddb.cr/blob/main/README.md) | [GitHub](https://github.com/delef/maxminddb.cr) |
| D | dmaxminddb | [DUB](https://code.dlang.org/packages/dmaxminddb) | [DUB](https://code.dlang.org/packages/dmaxminddb) | [GitHub](https://github.com/maxpoulin64/dmaxminddb) |
| Dart | maxminddb | [pub.dev](https://pub.dev/packages/maxminddb) | [pub.dev](https://pub.dev/documentation/maxminddb/latest/) | [GitHub](https://github.com/fischerscode/dart-maxmindDB) |
| Delphi | MMDB Reader | | [README](https://github.com/optinsoft/MMDBReader/blob/master/README.md) | [GitHub](https://github.com/optinsoft/MMDBReader) |
| Elixir | Geolix | [Hex](https://hex.pm/packages/geolix) | [README](https://github.com/elixir-geolix/geolix/blob/master/README.md) | [GitHub](https://github.com/elixir-geolix/geolix) |
| Erlang | ego | | [README](https://github.com/jflatow/ego/blob/master/README) | [GitHub](https://github.com/jflatow/ego/tree/master) |
| Erlang | geodata2 | | [README](https://github.com/brigadier/geodata2/blob/master/README.md) | [GitHub](https://github.com/brigadier/geodata2) |
| Erlang | locus | [Hex](https://hex.pm/packages/locus) | [HexDocs](https://locus.hexdocs.pm/) | [GitHub](https://github.com/g-andrade/locus) |
| Go | oschwald/geoip2-golang | | [pkg.go.dev](https://pkg.go.dev/github.com/oschwald/geoip2-golang) | [GitHub](https://github.com/oschwald/geoip2-golang) |
| Go | IncSW/geoip2 | | [pkg.go.dev](https://pkg.go.dev/github.com/IncSW/geoip2) | [GitHub](https://github.com/IncSW/geoip2) |
| Haskell | geoip2 | [Hackage](https://hackage.haskell.org/package/geoip2) | [README](https://github.com/ondrap/geoip2/blob/master/README.md) | [GitHub](https://github.com/ondrap/geoip2) |
| Lua | mmdblua | | [README](https://github.com/daurnimator/mmdblua/blob/master/README.md) | [GitHub](https://github.com/daurnimator/mmdblua) |
| Lua (C extension) | lua-maxminddb | | | [GitHub](https://github.com/fabled/lua-maxminddb) |
| Lua (C extension) | lua-resty-maxminddb | | [README](https://github.com/anjia0532/lua-resty-maxminddb/blob/master/README.md) | [GitHub](https://github.com/anjia0532/lua-resty-maxminddb) |
| Node.js | jgeoip | [npm](https://www.npmjs.com/package/jgeoip) | [npm](https://www.npmjs.com/package/jgeoip) | [GitHub](https://github.com/jclo/jgeoip) |
| Node.js | maxmind | [npm](https://www.npmjs.com/package/maxmind) | [npm](https://www.npmjs.com/package/maxmind) | [GitHub](https://github.com/runk/node-maxmind) |
| Node.js / Deno / Bun | maxminddb-wasm | [npm](https://www.npmjs.com/package/maxminddb-wasm) / [Deno](https://deno.land/x/maxminddb) | [JSR](https://jsr.io/@josh-hemphill/maxminddb-wasm) | [GitHub](https://github.com/josh-hemphill/maxminddb-wasm) |
| OCaml | ocaml-maxminddb | [OPAM](https://opam.ocaml.org/packages/maxminddb/) | [README](https://github.com/fxfactorial/ocaml-maxminddb/blob/master/README.md) | [GitHub](https://github.com/fxfactorial/ocaml-maxminddb) |
| Perl | Geo::Location::IP | [CPAN](https://metacpan.org/pod/Geo::Location::IP) | [MetaCPAN](https://metacpan.org/pod/Geo::Location::IP) | [GitHub](https://github.com/voegelas/Geo-Location-IP) |
| Perl | IP::Geolocation::MMDB | [CPAN](https://metacpan.org/pod/IP::Geolocation::MMDB) | [MetaCPAN](https://metacpan.org/pod/IP::Geolocation::MMDB) | [GitHub](https://github.com/voegelas/IP-Geolocation-MMDB) |
| PHP | librarymarket/maxmind-db-reader | [Packagist](https://packagist.org/packages/librarymarket/maxmind-db-reader) | [README](https://github.com/librarymarket/maxmind-db-reader/blob/1.0.x/README.md) | [GitHub](https://github.com/librarymarket/maxmind-db-reader) |
| Python | pandas-maxminddb | [PyPI](https://pypi.org/project/pandas-maxminddb/) | [README](https://github.com/andrusha/pandas-maxminddb/blob/main/README.md) | [GitHub](https://github.com/andrusha/pandas-maxminddb) |
| Python (Rust extension) | maxminddb-rust | [PyPI](https://pypi.org/project/maxminddb-rust/) | [README](https://github.com/oschwald/maxminddb-rust-python/blob/main/README.md) | [GitHub](https://github.com/oschwald/maxminddb-rust-python) |
| Python (Zig extension) | maxminddb-zig | [PyPI](https://pypi.org/project/maxminddb-zig/) | [README](https://github.com/marselester/maxminddb.py/blob/main/README.md) | [GitHub](https://github.com/marselester/maxminddb.py) |
| R | rgeolocate | [CRAN](https://cran.r-project.org/web/packages/rgeolocate/index.html) | [README](https://github.com/Ironholds/rgeolocate/blob/master/README.md) | [GitHub](https://github.com/Ironholds/rgeolocate) |
| Racket | geoip | | [Racket Documentation](https://docs.racket-lang.org/geoip/index.html) | [GitHub](https://github.com/Bogdanp/racket-geoip) |
| Raku | GeoIP2 | | [README](https://github.com/bbkr/GeoIP2/blob/master/README.md) | [GitHub](https://github.com/bbkr/GeoIP2) |
| Ruby (Rust extension) | maxmind-db-rust | [RubyGems](https://rubygems.org/gems/maxmind-db-rust) | [README](https://github.com/oschwald/maxmind-db-rust-ruby/blob/main/README.md) | [GitHub](https://github.com/oschwald/maxmind-db-rust-ruby) |
| Rust | geoip2 | [Cargo](https://crates.io/crates/geoip2) | [API docs](https://docs.rs/geoip2/0.1.6/geoip2/) | [GitHub](https://github.com/IncSW/geoip2-rs) |
| Rust | maxminddb | [Cargo](https://crates.io/crates/maxminddb) | [API docs](https://oschwald.github.io/maxminddb-rust/maxminddb/struct.Reader.html) | [GitHub](https://github.com/oschwald/maxminddb-rust) |
| Scala | maxmind-geoip2-scala | | [README](https://github.com/Sanoma-CDA/maxmind-geoip2-scala/blob/master/README.md) | [GitHub](https://github.com/Sanoma-CDA/maxmind-geoip2-scala) |
| Swift (C extension) | MaxMindDBSwift | | [README](https://github.com/SunboyGo/MaxMindDBSwift/blob/main/README.md) | [GitHub](https://github.com/SunboyGo/MaxMindDBSwift) |
| Swift (C extension) | MMDB-Swift | [MMDB-Swift](https://cocoapods.org/pods/MMDB-Swift) | [CocoaPods](https://cocoapods.org/pods/MMDB-Swift) | [GitHub](https://github.com/lexrus/MMDB-Swift) |
| Zig | maxminddb | | [README](https://github.com/marselester/maxminddb.zig/blob/master/README.md) | [GitHub](https://github.com/marselester/maxminddb.zig) |
## Integrations
### Official Integrations
These integrations are developed or provided by MaxMind.
| Application | Platform | Documentation or Listing | Version Control |
| ------------------------------ | ------------------ | ----------------------------------------------------------- | -------------------------------------------------- |
| Database | Snowflake | [GeoLite on Snowflake](/geoip/geolite-on-snowflake/index.md) | N/A |
| Log Analyzer / Data Processing | Splunk | [MaxMind GeoIP App](https://splunkbase.splunk.com/app/8554) | [GitHub](https://github.com/maxmind/geoip-splunk) |
| Web server | Apache HTTP Server | [mod_maxminddb](https://maxmind.github.io/mod_maxminddb/) | [GitHub](https://github.com/maxmind/mod_maxminddb) |
### Unofficial Integrations
> **⚠️ Warning**
>
> **Use at your own risk.**
>
> MaxMind does **_not_** offer support for these integrations. Please contact the
> integrator for assistance.
| Application | Platform | Link |
| ------------------------------ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Ad-serving | Revive Adserver | [Geotargeting with Revive Adserver](https://www.revive-adserver.com/faq/geotargeting-with-revive-adserver/) |
| Analytics | Piwik/Matomo | [GEO LOCATE YOUR VISITORS](https://matomo.org/faq/how-to/setting-up-accurate-visitors-geolocation/) |
| Analytics | Snowplow Analytics | [IP lookups enrichment](https://github.com/snowplow/snowplow/wiki/IP-lookups-enrichment) |
| Content Delivery | Varnish Software | [libvmod-geoip2](https://github.com/varnishcache-friends/libvmod-geoip2) |
| Data Processing | Apache NiFi | [GeoEnrichIP](https://nifi.apache.org/components/org.apache.nifi.processors.GeoEnrichIP/) |
| Data Processing | Polars | [maxminddb-polars](https://pypi.org/project/maxminddb-polars/) |
| Database | DuckDB | [duckdb-maxmind](https://github.com/marselester/duckdb-maxmind) |
| E-commerce | WooCommerce / WordPress | [MaxMind Geolocation Integration](https://woocommerce.com/document/maxmind-geolocation-integration/) |
| Load balancer | Envoy | [IP geolocation filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/listeners/network_filters/geoip_filter) |
| Load balancer | NGINX | [ngx_http_geoip2_module](https://github.com/leev/ngx_http_geoip2_module) |
| Log Analyzer / Data Processing | Fluent Bit | [GeoIP2 filter](https://docs.fluentbit.io/manual/data-pipeline/filters/geoip2-filter) |
| Log Analyzer / Data Processing | Graylog | [GeoIP Data Adapter](https://go2docs.graylog.org/current/making_sense_of_your_log_data/geoip_data_adapter.htm) |
| Log Analyzer / Data Processing | Logstash | [GeoIP filter plugin](https://www.elastic.co/docs/reference/logstash/plugins/plugins-filters-geoip) |
| Log Analyzer / Data Processing | Vector | [GeoIP and MMDB enrichment tables](https://vector.dev/docs/reference/configuration/pipeline-components/) |
| Network Protocol Analyzer | Wireshark | [How To Use GeoIP With Wireshark](https://gitlab.com/wireshark/wireshark/-/wikis/HowToUseGeoIP) |
| Search | Elasticsearch | [GeoIP processor](https://www.elastic.co/docs/reference/ingest-processor/geoip-processor) |
| Web server | Caddy | [caddy-geoip2](https://github.com/zhangjiayin/caddy-geoip2) |
## Command Line (mmdbinspect)
You can use the [mmdbinspect tool](https://github.com/maxmind/mmdbinspect) (in
beta), a command line interface, to look up one or more IPs from one or more
MMDB databases and receive output in a parsable JSON format.
# GeoIP Anonymous IP Databases
Source: https://dev.maxmind.com/geoip/docs/databases/anonymous-ip/
MaxMind's GeoIP Anonymous IP database helps protect your business by
identifying proxy, VPN, hosting, and other anonymous IP addresses.
To learn more about the GeoIP Anonymous IP database, please visit the
[GeoIP Anonymous IP Database page](https://www.maxmind.com/en/geoip-anonymous-ip-database).
If you are interested in purchasing the database, please
[contact our Enterprise Business team](https://www.maxmind.com/en/solutions/connect-with-a-geoip-expert)
for assistance.
## Binary Database
Binary databases make use of the
[MaxMind DB file format](https://maxmind.github.io/MaxMind-DB/). MaxMind
provides [official client APIs](/geoip/docs/databases/index.md#official-client-apis)
that are open source. We also provide a list of
[unsupported and unofficial client APIs](/geoip/docs/databases/index.md#unofficial-client-apis)
and
[unsupported and unofficial integrations](/geoip/docs/databases/index.md#integrations)
with various applications.
You can also use the [mmdbinspect tool](https://github.com/maxmind/mmdbinspect)
(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.
[Learn about the fields in the binary version of this database on our binary
database field reference page.](/geoip/docs/databases/anonymous-ip/binary/index.md)
## CSV Database
In addition to our MaxMind DB binary format, we also offer GeoIP and GeoLite
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-Anonymous-IP-CSV_{YYYYMMDD}.zip`.
The downloaded zip file contains a single directory which in turn
contains several files. That directory is named
`GeoIP2-Anonymous-IP-CSV_{YYYYMMDD}`.
The files in this zip archive are:
| Filename | Description |
|----------|-------------|
| `LICENSE.txt` | End user license |
| `COPYRIGHT.txt` | Copyright statement |
| `GeoIP2-Anonymous-IP-Blocks-IPv4.csv` | CSV file containing data on IPv4 addresses |
| `GeoIP2-Anonymous-IP-Blocks-IPv6.csv` | CSV file containing data on IPv6 addresses |
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 are named `GeoIP2-Anonymous-IP-Blocks-IPv4.csv` and
`GeoIP2-Anonymous-IP-Blocks-IPv6.csv` respectively.
| Data field name | Type | Data field 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::/64”. We offer a utility to convert this column to start/end IPs or start/end integers. See [the conversion utility section](/geoip/docs/databases/anonymous-ip/index.md#conversion-utility) for details. |
| is_anonymous | boolean | 1 if the IP address belongs to any sort of anonymous network. Blank if not.
[Learn more about anonymizer and proxy detection on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#anon-detection) |
| is_anonymous_vpn | boolean | 1 if the IP address is registered to an anonymous VPN provider. Blank if not. If a VPN provider does not register subnets under names associated with them, we will likely only flag their IP ranges using the `is_hosting_provider` flag.
[Learn more about VPNs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#VPN) |
| is_hosting_provider | boolean | 1 if the IP address belongs to a hosting provider. Blank if not.
[Learn more about hosting providers used for anonymizing on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#hosting-provider) |
| is_public_proxy | boolean | 1 if the IP address belongs to a public proxy. Blank if not.
[Learn more about public proxies on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#public-proxies) |
| is_tor_exit_node | boolean | 1 if the IP address is a Tor exit node. Blank if not.
[Learn more about Tor exit nodes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#tor-exit-nodes) |
| is_residential_proxy | boolean | 1 if the IP address is on a suspected anonymizing network and belongs to a residential ISP (does not include peer-to-peer proxy IPs). Blank if not.
[Learn more about residential proxies on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#residential-proxies) |
### Conversion Utility
We've created a
[small utility program](https://github.com/maxmind/geoip2-csv-converter) to
allow you to convert a GeoIP 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.](https://github.com/maxmind/geoip2-csv-converter/releases)
## 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:
- [GeoIP2-Anonymous-IP-CSV_Example.zip](/examples/GeoIP2-Anonymous-IP-CSV_Example.zip)
### MMDB Example Files
We maintain test MMDB files on GitHub:
- [GeoIP2-Anonymous-IP-Test.mmdb](https://github.com/maxmind/MaxMind-DB/blob/main/test-data/GeoIP2-Anonymous-IP-Test.mmdb)
Alternatively, you can [view all of our MMDB test data on GitHub](https://github.com/maxmind/MaxMind-DB/tree/main/test-data).
## 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 May to August 2026, 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 Anonymous IP | 4.05 MB - 5.09 MB | 2.42 MB - 2.77 MB | 133,000 - 166,000 | 30,000 - 38,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 Anonymous IP 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 [GeoIP release notes](/geoip/release-notes/index.md) 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](/geoip/docs/databases/index.md#client-apis).
# GeoIP Anonymous IP binary database fields
Source: https://dev.maxmind.com/geoip/docs/databases/anonymous-ip/binary/
The GeoIP Anonymous IP binary database contains the following fields for each
network.
| Data field name | Type | Data field description |
| --- | --- | --- |
| is_anonymous | boolean | This is `true` if the IP address belongs to any sort of anonymous network. This key is only present when the value is `true`.
[Learn more about anonymizer and proxy detection on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#anon-detection) |
| is_anonymous_vpn | boolean | This is `true` if the IP address is registered to an anonymous VPN provider. If a VPN provider does not register subnets under names associated with them, we will likely only flag their IP ranges using the `is_hosting_provider` flag. This key is only present when the value is `true`.
[Learn more about VPNs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#VPN) |
| is_hosting_provider | boolean | This is `true` if the IP address belongs to a hosting provider. This key is only present when the value is `true`.
[Learn more about hosting providers used for anonymizing on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#hosting-provider) |
| is_public_proxy | boolean | This is `true` if the IP address belongs to a public proxy. This key is only present when the value is `true`.
[Learn more about public proxies on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#public-proxies) |
| is_residential_proxy | boolean | This is `true` if the IP address is on a suspected anonymizing network and belongs to a residential ISP (does not include peer-to-peer proxy IPs). This key is only present when the value is `true`.
[Learn more about residential proxies on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#residential-proxies) |
| is_tor_exit_node | boolean | This is `true` if the IP address is a Tor exit node. This key is only present when the value is `true`.
[Learn more about Tor exit nodes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#tor-exit-nodes) |
# GeoIP Anonymous Plus Databases
Source: https://dev.maxmind.com/geoip/docs/databases/anonymous-plus/
> **⚠️ Warning**
>
> The GeoIP Anonymous Plus database is under active
> development. New fields are expected to be added. Please design your
> integrations to expect new fields, and ensure you monitor updates to our
> [GeoIP release notes](/geoip/release-notes/index.md) to get notifications about new
> fields and changes to existing ones.
MaxMind's GeoIP Anonymous Plus database helps protect your business by
identifying anonymized proxy traffic and reducing false positives based on
confidence scores, timestamps, and VPN provider names.
A license for the GeoIP Anonymous Plus database also provides access to the
[GeoIP Residential Proxy database](/geoip/docs/databases/residential-proxy/index.md).
To learn more about the GeoIP Anonymous Plus database, please visit the
[GeoIP Anonymous Plus Database page](https://www.maxmind.com/en/geoip-anonymous-plus-database).
If you are interested in purchasing the database, please
[contact our Enterprise Business team](https://www.maxmind.com/en/solutions/connect-with-a-geoip-expert)
for assistance.
## Binary Database
Binary databases make use of the
[MaxMind DB file format](https://maxmind.github.io/MaxMind-DB/). MaxMind
provides [official client APIs](/geoip/docs/databases/index.md#official-client-apis)
that are open source. We also provide a list of
[unsupported and unofficial client APIs](/geoip/docs/databases/index.md#unofficial-client-apis)
and
[unsupported and unofficial integrations](/geoip/docs/databases/index.md#integrations)
with various applications.
You can also use the [mmdbinspect tool](https://github.com/maxmind/mmdbinspect)
(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.
[Learn about the fields in the binary version of this database on our binary
database field reference page.](/geoip/docs/databases/anonymous-plus/binary/index.md)
## CSV Database
In addition to our MaxMind DB binary format, we also offer GeoIP and GeoLite
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 `GeoIP-Anonymous-Plus-CSV_{YYYYMMDD}.zip`.
The downloaded zip file contains a single directory which in turn
contains several files. That directory is named
`GeoIP-Anonymous-Plus-CSV_{YYYYMMDD}`.
The files in this zip archive are:
| Filename | Description |
|----------|-------------|
| `LICENSE.txt` | End user license |
| `COPYRIGHT.txt` | Copyright statement |
| `GeoIP-Anonymous-Plus-Blocks-IPv4.csv` | CSV file containing data on IPv4 addresses |
| `GeoIP-Anonymous-Plus-Blocks-IPv6.csv` | CSV file containing data on IPv6 addresses |
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 are named `GeoIP-Anonymous-Plus-Blocks-IPv4.csv` and
`GeoIP-Anonymous-Plus-Blocks-IPv6.csv` respectively.
| Data field name | Type | Data field 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::/64”. We offer a utility to convert this column to start/end IPs or start/end integers. See [the conversion utility section](/geoip/docs/databases/anonymous-plus/index.md#conversion-utility) for details. |
| is_anonymous | boolean | 1 if the IP address belongs to any sort of anonymous network. Blank if not.
[Learn more about anonymizer and proxy detection on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#anon-detection) |
| is_anonymous_vpn | boolean | 1 if the IP address is registered to an anonymous VPN provider. Blank if not. If a VPN provider does not register subnets under names associated with them, we will likely only flag their IP ranges using the `is_hosting_provider` flag.
[Learn more about VPNs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#VPN) |
| is_hosting_provider | boolean | 1 if the IP address belongs to a hosting provider. Blank if not.
[Learn more about hosting providers used for anonymizing on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#hosting-provider) |
| is_public_proxy | boolean | 1 if the IP address belongs to a public proxy. Blank if not.
[Learn more about public proxies on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#public-proxies) |
| is_tor_exit_node | boolean | 1 if the IP address is a Tor exit node. Blank if not.
[Learn more about Tor exit nodes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#tor-exit-nodes) |
| is_residential_proxy | boolean | 1 if the IP address is on a suspected anonymizing network and belongs to a residential ISP. Blank if not.
[Learn more about residential proxies on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#residential-proxies) |
| provider_name | string | The name of the VPN provider (e.g., `nordvpn`, `surfshark`) associated with the network.
Please note that MaxMind identifies a subset of VPN providers. A current list of VPN providers identified in the Anonymous Plus database is available on request. |
| anonymizer_confidence | integer | A score ranging from 1 to 99 that is our percent confidence that the network is currently part of an actively used VPN service.
Currently, we will only provide values of 30, 50, and 99, but the number of values will increase as we improve our confidence ratings.
[Learn more about anonymizer confidence on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind) |
| network_last_seen | string | The last day that the network was sighted in our analysis of anonymized networks. This is in the ISO 8601 date format (YYYY-MM-DD).
[Learn more about anonymizer and proxy detection on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind) |
### Conversion Utility
We've created a
[small utility program](https://github.com/maxmind/geoip2-csv-converter) to
allow you to convert a GeoIP 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.](https://github.com/maxmind/geoip2-csv-converter/releases)
## 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:
- [GeoIP-Anonymous-Plus-CSV_Example.zip](/examples/GeoIP-Anonymous-Plus-CSV_Example.zip)
### MMDB Example Files
We maintain test MMDB files on GitHub:
- [GeoIP-Anonymous-Plus-Test.mmdb](https://github.com/maxmind/MaxMind-DB/blob/main/test-data/GeoIP-Anonymous-Plus-Test.mmdb)
Alternatively, you can [view all of our MMDB test data on GitHub](https://github.com/maxmind/MaxMind-DB/tree/main/test-data).
## 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 May to August 2026, 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 Anonymous Plus | 509 MB - 751 MB | 348 MB - 471 MB | 13,928,000 - 20,465,000 | 210,000 - 311,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 Anonymous Plus 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 [GeoIP release notes](/geoip/release-notes/index.md) 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](/geoip/docs/databases/index.md#client-apis).
# GeoIP Anonymous Plus binary database fields
Source: https://dev.maxmind.com/geoip/docs/databases/anonymous-plus/binary/
The GeoIP Anonymous Plus binary database contains the following fields for each
network.
| Data field name | Type | Data field description |
| --- | --- | --- |
| anonymizer_confidence | uint16 | A score ranging from 1 to 99 that represents our percent confidence that the network is currently part of an actively used VPN service.
Currently, we will only provide values of 30, 50, and 99, but the number of values will increase as we improve our confidence ratings.
[Learn more about anonymizer confidence on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind) |
| is_anonymous | boolean | This is `true` if the IP address belongs to any sort of anonymous network. This key is only present when the value is `true`.
[Learn more about anonymizer and proxy detection on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#anon-detection) |
| is_anonymous_vpn | boolean | This is `true` if the IP address is registered to an anonymous VPN provider. If a VPN provider does not register subnets under names associated with them, we will likely only flag their IP ranges using the `is_hosting_provider` flag. This key is only present when the value is `true`.
[Learn more about VPNs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#VPN) |
| is_hosting_provider | boolean | This is `true` if the IP address belongs to a hosting provider. This key is only present when the value is `true`.
[Learn more about hosting providers used for anonymizing on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#hosting-provider) |
| is_public_proxy | boolean | This is `true` if the IP address belongs to a public proxy. This key is only present when the value is `true`.
[Learn more about public proxies on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#public-proxies) |
| is_residential_proxy | boolean | This is `true` if the IP address is on a suspected anonymizing network and belongs to a residential ISP. This key is only present when the value is `true`.
[Learn more about residential proxies on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#residential-proxies) |
| is_tor_exit_node | boolean | This is `true` if the IP address is a Tor exit node. This key is only present when the value is `true`.
[Learn more about Tor exit nodes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#tor-exit-nodes) |
| network_last_seen | string | The last day that the network was sighted in our analysis of anonymized networks. This is in the ISO 8601 date format (YYYY-MM-DD).
[Learn more about anonymizer and proxy detection on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind) |
| provider_name | string | The name of the VPN provider (e.g., `nordvpn`, `surfshark`) associated with the network.
Please note that MaxMind identifies a subset of VPN providers. A current list of VPN providers identified in the Anonymous Plus database is available on request.
[Learn more about VPN provider detection on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind) |
# GeoLite ASN Databases
Source: https://dev.maxmind.com/geoip/docs/databases/asn/
Look up the autonomous system number and autonomous system organization
associated with IPv4 and IPv6 addresses.
> **⚠️ Warning**
>
> **Data Privacy**
>
> To comply with data privacy regulations, please monitor our
> [Do Not Sell My Personal Information Requests](https://www.maxmind.com/en/accounts/current/do-not-sell-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](/geoip/privacy-exclusions-api/index.md).
## Binary Database
Binary databases make use of the
[MaxMind DB file format](https://maxmind.github.io/MaxMind-DB/). MaxMind
provides [official client APIs](/geoip/docs/databases/index.md#official-client-apis)
that are open source. We also provide a list of
[unsupported and unofficial client APIs](/geoip/docs/databases/index.md#unofficial-client-apis)
and
[unsupported and unofficial integrations](/geoip/docs/databases/index.md#integrations)
with various applications.
You can also use the [mmdbinspect tool](https://github.com/maxmind/mmdbinspect)
(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.
[Learn about the fields in the binary version of this database on our binary
database field reference page.](/geoip/docs/databases/asn/binary/index.md)
## CSV Database
In addition to our MaxMind DB binary format, we also offer GeoIP and GeoLite
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 `GeoLite2-ASN-CSV_{YYYYMMDD}.zip`.
The downloaded zip file contains a single directory which in turn
contains several files. That directory is named
`GeoLite2-ASN-CSV_{YYYYMMDD}`.
The files in this zip archive are:
| Filename | Description |
|----------|-------------|
| `LICENSE.txt` | End user license |
| `COPYRIGHT.txt` | Copyright statement |
| `GeoLite2-ASN-Blocks-IPv4.csv` | CSV file containing data on IPv4 addresses |
| `GeoLite2-ASN-Blocks-IPv6.csv` | CSV file containing data on IPv6 addresses |
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 are named `GeoLite2-ASN-Blocks-IPv4.csv` and
`GeoLite2-ASN-Blocks-IPv6.csv` respectively.
| Data field name | Type | Data field 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::/64”. We offer a utility to convert this column to start/end IPs or start/end integers. See [the conversion utility section](/geoip/docs/databases/asn/index.md#conversion-utility) for details. |
| autonomous_system_number | integer | The [autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_%28Internet%29) number associated with the IP address.
[Learn more about autonomous system data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#autonomous-system-data) |
| autonomous_system_organization | string | The organization associated with the registered autonomous system number for the IP address.
[Learn more about autonomous system data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#autonomous-system-data) |
### Conversion Utility
We've created a
[small utility program](https://github.com/maxmind/geoip2-csv-converter) to
allow you to convert a GeoIP 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.](https://github.com/maxmind/geoip2-csv-converter/releases)
## 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:
- [GeoLite2-ASN-CSV_Example.zip](/examples/GeoLite2-ASN-CSV_Example.zip)
### MMDB Example Files
We maintain test MMDB files on GitHub:
- [GeoLite2-ASN-Test.mmdb](https://github.com/maxmind/MaxMind-DB/blob/main/test-data/GeoLite2-ASN-Test.mmdb)
Alternatively, you can [view all of our MMDB test data on GitHub](https://github.com/maxmind/MaxMind-DB/tree/main/test-data).
## 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 May to August 2026, the database files varied in file size and number of networks as
follows:
| Database | CSV File Size | MMDB File Size | IPv4 Networks | IPv6 Networks |
|----------|---------------|----------------|---------------|---------------|
| GeoLite ASN | 55.7 MB - 58.8 MB | 12.0 MB - 12.4 MB | 660,000 - 676,000 | 425,000 - 468,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 ASN 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 [GeoIP release notes](/geoip/release-notes/index.md) 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](/geoip/docs/databases/index.md#client-apis).
# GeoLite ASN binary database fields
Source: https://dev.maxmind.com/geoip/docs/databases/asn/binary/
The GeoLite ASN binary database contains the following fields for each network.
| Data field name | Type | Data field description |
| --- | --- | --- |
| autonomous_system_number | uint32 | The [autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_%28Internet%29) number associated with the IP address.
[Learn more about autonomous system data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#autonomous-system-data) |
| autonomous_system_organization | string | The organization associated with the registered autonomous system number for the IP address.
[Learn more about autonomous system data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#autonomous-system-data) |
# GeoIP and GeoLite City and Country Databases
Source: https://dev.maxmind.com/geoip/docs/databases/city-and-country/
Determine the country, subdivisions (regions), city, and postal code associated
with IPv4 and IPv6 addresses worldwide.
Terms and pricing for the GeoIP City and GeoIP Country databases may be found on
our product pages:
- [GeoIP City](https://www.maxmind.com/en/geoip-databases)
- [GeoIP Country](https://www.maxmind.com/en/geoip-databases)
> **⚠️ Warning**
>
> **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.
> **⚠️ Warning**
>
> **Data Privacy**
>
> To comply with data privacy regulations, please monitor our
> [Do Not Sell My Personal Information Requests](https://www.maxmind.com/en/accounts/current/do-not-sell-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](/geoip/privacy-exclusions-api/index.md).
## Binary Databases
Binary databases make use of the
[MaxMind DB file format](https://maxmind.github.io/MaxMind-DB/). MaxMind
provides [official client APIs](/geoip/docs/databases/index.md#official-client-apis)
that are open source. We also provide a list of
[unsupported and unofficial client APIs](/geoip/docs/databases/index.md#unofficial-client-apis)
and
[unsupported and unofficial integrations](/geoip/docs/databases/index.md#integrations)
with various applications.
You can also use the [mmdbinspect tool](https://github.com/maxmind/mmdbinspect)
(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.
- [GeoIP City binary database fields](/geoip/docs/databases/city-and-country/city-binary/index.md)
- [GeoIP Country binary database fields](/geoip/docs/databases/city-and-country/country-binary/index.md)
## CSV Databases
In addition to our MaxMind DB binary format, we also offer GeoIP and GeoLite
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,GeoLite2}-{City,Country}-CSV_{YYYYMMDD}.zip`.
The downloaded zip file contains a single directory which in turn
contains several files. That directory is named
`{GeoIP2,GeoLite2}-{City,Country}-CSV_{YYYYMMDD}`.
The downloaded .zip file contains a single directory which in turn contains 13
files:
| Filename | Description |
| --- | --- |
| `COPYRIGHT.txt` | Copyright statement |
| `LICENSE.txt` | End user license |
| `README.txt` | Information file |
| `{GeoIP2,GeoLite2}-{City,Country}-Blocks-IPv4.csv` | CSV file containing data on IPv4 addresses |
| `{GeoIP2,GeoLite2}-{City,Country}-Blocks-IPv6.csv` | CSV file containing data on IPv6 addresses |
| `{GeoIP2,GeoLite2}-{City,Country}-Locations-{locale}.csv` | Eight CSV files containing data on locations for each locale code, where `{locale}` can be “de”, "en", “es”, “fr”, “ja”, “pt-BR”, “ru”, and “zh-CN”. |
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,GeoLite2}-{City,Country}-Blocks-IPv4.csv` and
`{GeoIP2,GeoLite2}-{City,Country}-Blocks-IPv6.csv` respectively. An example name
would be `GeoIP2-City-Blocks-IPv4.csv`.
[City subset by continent databases](https://www.maxmind.com/en/geoip-databases)
blocks files have the same columns as the City database.
| Data field name | Type | Data field description | Included in... |
|------|------|-------------|-------------|
| 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::/64". We offer a utility to convert this column to start/end IPs or start/end integers. See the conversion utility section for details. | Country, City |
| geoname_id | integer | A unique identifier for the network's location as specified by [GeoNames](https://www.geonames.org/). This ID can be used to look up the location information in the Location file. [Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) | Country, City |
| 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](https://www.geonames.org/). This ID can be used to look up the location information in the Location file. [Learn more about registered countries on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/country-level-and-city-level-geolocation-maxmind) | Country, City |
| 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](https://www.geonames.org/). This ID can be used to look up the location information in the Location file. [Learn more about represented countries on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/country-level-and-city-level-geolocation-maxmind) | Country, City |
| is_anonymous_proxy | boolean | **Deprecated.** Please see our [GeoIP Anonymous IP database](https://www.maxmind.com/en/geoip-anonymous-ip-database) to determine whether the IP address is used by an anonymizing service. | Country, City |
| is_satellite_provider | boolean | **Deprecated.** | Country, City |
| 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: United States: 5, Canada: 3, United Kingdom: 2-4, Brazil: 5, Ireland: 3, Japan: 7 (specified for the first 6. The last digit defaults to 1), Netherlands: 4, Portugal: 7 (accurate for the first 4. The last 3 often defaults to `-001`), Singapore: 2 | City only |
| latitude* | decimal | The approximate [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System) latitude of the location associated with the network. [Learn about the geolocation area defined by latitude, longitude, and accuracy radius, on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area) | City only |
| longitude* | decimal | The approximate [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System) longitude of the location associated with the network. [Learn about the geolocation area defined by latitude, longitude, and accuracy radius, on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area) | City only |
| 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.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area) | City only |
| is_anycast | boolean | This is `1` if the network is an [anycast network](https://en.wikipedia.org/wiki/Anycast). This column will be empty in GeoLite2-Country and GeoLite2-City. | Country, City |
> **⚠️ Warning**
>
> _\* 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._
### 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,GeoLite2}-{City,Country}-Locations-{locale}.csv`.
An example name would be `GeoIP2-City-Locations-en.csv`.
[City subset by continent databases](https://www.maxmind.com/en/geoip-databases)
locations files have the same columns as the City database.
| Data field name | Type | Data field description | Included in... |
|------|------|-------------|-------------|
| geoname_id | integer | A unique identifier for the location as specified by [GeoNames](https://www.geonames.org/). This ID can be used as a key for the Location file. [Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) | Country, City |
| locale_code | string | The locale that the names in this row are in. This will always correspond to the locale name of the file. | Country, City |
| continent_code | string (2) | The continent code for this location. Possible codes are: **AF** - Africa, **AN** - Antarctica, **AS** - Asia, **EU** - Europe, **NA** - North America, **OC** - Oceania, **SA** - South America | Country, City |
| continent_name | string | The continent name for this location in the file's locale. [Learn more about localized names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) | Country, City |
| country_iso_code | string (2) | A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with the location. | Country, City |
| country_name | string | The country name for this location in the file's locale. [Learn more about localized names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) | Country, City |
| subdivision_1_iso_code | string (1-3) | A string of up to three characters containing the region-portion of the [ISO 3166-2](https://en.wikipedia.org/wiki/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". | City only |
| 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.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) | City only |
| subdivision_2_iso_code | string (1-3) | A string of up to three characters containing the region-portion of the [ISO 3166-2](https://en.wikipedia.org/wiki/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". | City only |
| 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.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) | City only |
| city_name | string | The city name for this location in the file's locale. [Learn more about localized names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) | City only |
| metro_code | integer | **Deprecated.** This is a no-longer-maintained code for targeting advertisements in Google. | City only |
| time_zone | string | The time zone associated with location, as specified by the [IANA Time Zone Database](https://www.iana.org/time-zones), e.g., "America/New_York". | City only |
| 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. | Country, City |
### 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](https://github.com/maxmind/geoip2-csv-converter) to
allow you to convert a GeoIP 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.](https://github.com/maxmind/geoip2-csv-converter/releases)
## 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:
- [GeoIP2-City-CSV_Example.zip](/examples/GeoIP2-City-CSV_Example.zip)
- [GeoIP2-Country-CSV_Example.zip](/examples/GeoIP2-Country-CSV_Example.zip)
### MMDB Example Files
We maintain test MMDB files on GitHub:
- [GeoIP2-City-Test.mmdb](https://github.com/maxmind/MaxMind-DB/blob/main/test-data/GeoIP2-City-Test.mmdb)
- [GeoIP2-Country-Test.mmdb](https://github.com/maxmind/MaxMind-DB/blob/main/test-data/GeoIP2-Country-Test.mmdb)
Alternatively, you can [view all of our MMDB test data on GitHub](https://github.com/maxmind/MaxMind-DB/tree/main/test-data).
## 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 May to August 2026, 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 City | 672 MB - 767 MB | 112 MB - 127 MB | 6,176,000 - 7,635,000 | 3,914,000 - 4,077,000 |
| GeoIP Country | 43.6 MB - 48.0 MB | 8.60 MB - 9.23 MB | 559,000 - 585,000 | 522,000 - 600,000 |
| GeoLite City | 308 MB - 385 MB | 43.9 MB - 66.9 MB | 3,102,000 - 3,797,000 | 1,674,000 - 2,095,000 |
| GeoLite Country | 44.0 MB - 52.2 MB | 8.61 MB - 9.69 MB | 561,000 - 592,000 | 530,000 - 684,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 City and Country 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 [GeoIP release notes](/geoip/release-notes/index.md) 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](/geoip/docs/databases/index.md#client-apis).
# GeoIP City binary database fields
Source: https://dev.maxmind.com/geoip/docs/databases/city-and-country/city-binary/
The GeoIP City binary database contains the following fields for each network.
The top-level record for each network is a map containing the keys listed below.
Each key maps to a map or an array of maps. If a key maps to an undefined or
empty value, it is not included in the record.
| Data field name | Type | Data field description |
| --- | --- | --- |
| [city](/geoip/docs/databases/city-and-country/city-binary/index.md#city) | map | A map containing details about the city associated with the IP address. |
| [continent](/geoip/docs/databases/city-and-country/city-binary/index.md#continent) | map | A map containing details about the continent associated with the IP address. |
| [country](/geoip/docs/databases/city-and-country/city-binary/index.md#country) | map | A map containing details about the country where MaxMind believes the IP address is located. |
| [location](/geoip/docs/databases/city-and-country/city-binary/index.md#location) | map | A map containing details about the location associated with the IP address, including coordinates and time zone. |
| [postal](/geoip/docs/databases/city-and-country/city-binary/index.md#postal) | map | A map containing details about the postal code associated with the IP address. |
| [registered_country](/geoip/docs/databases/city-and-country/city-binary/index.md#registered_country) | map | A map containing details about the country where the ISP has registered the IP block. This may differ from the country where the IP is located. |
| [represented_country](/geoip/docs/databases/city-and-country/city-binary/index.md#represented_country) | map | A map containing details about the country represented by users of the IP address, such as a military base or embassy. |
| [subdivisions](/geoip/docs/databases/city-and-country/city-binary/index.md#subdivisions) | array of maps | An array of maps containing data for the subdivisions associated with the IP address, ordered from largest to smallest. |
| [traits](/geoip/docs/databases/city-and-country/city-binary/index.md#traits) | map | A map containing general traits associated with the IP address. |
## city
| Data field name | Type | Data field description |
| --- | --- | --- |
| geoname_id | uint32 | A unique identifier for the city as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) |
| names | map | A map from locale codes (e.g., `en`, `de`, `ja`) to localized names.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) |
## continent
| Data field name | Type | Data field description |
| --- | --- | --- |
| code | string | A two-character continent code like `NA` (North America) or `OC` (Oceania).
[Learn more about continent codes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#codes) |
| geoname_id | uint32 | A unique identifier for the continent as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) |
| names | map | A map from locale codes (e.g., `en`, `de`, `ja`) to localized names.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) |
## country
| Data field name | Type | Data field description |
| --- | --- | --- |
| geoname_id | uint32 | A unique identifier for the country as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) |
| is_in_european_union | boolean | This is `true` if the country is a member state of the European Union. This key is only present when the value is `true`.
[Learn more about the EU flag on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#eu-flag) |
| iso_code | string | The two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) alpha code for the country.
[Learn more about country codes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#codes) |
| names | map | A map from locale codes (e.g., `en`, `de`, `ja`) to localized names.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) |
## location
| Data field name | Type | Data field description |
| --- | --- | --- |
| accuracy_radius | uint16 | The approximate accuracy radius in kilometers around the latitude and longitude for the IP address. This is the radius where we have a 67% confidence that the device using the IP address resides within the circle centered at the latitude and longitude with the provided radius.
[Learn about the geolocation area on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area) |
| latitude | double | The approximate latitude of the location associated with the IP address. This value is not precise and should not be used to identify a particular address or household.
[Learn about the geolocation area on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area) |
| longitude | double | The approximate longitude of the location associated with the IP address. This value is not precise and should not be used to identify a particular address or household.
[Learn about the geolocation area on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area) |
| metro_code | uint16 | **Deprecated.** Metro codes are no longer maintained. |
| time_zone | string | The time zone associated with the location, as specified by the [IANA Time Zone Database](https://www.iana.org/time-zones) (e.g., `America/New_York`).
[Learn more about time zone data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#time-zone) |
## postal
| Data field name | Type | Data field description |
| --- | --- | --- |
| code | string | The postal code of the location. Postal codes are not available for all countries. In some countries, this will only contain part of the postal code.
[Learn more about postal code data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#codes) |
## registered_country
| Data field name | Type | Data field description |
| --- | --- | --- |
| geoname_id | uint32 | A unique identifier for the registered country as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) |
| is_in_european_union | boolean | This is `true` if the registered country is a member state of the European Union. This key is only present when the value is `true`.
[Learn more about the EU flag on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#eu-flag) |
| iso_code | string | The two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) alpha code for the registered country. |
| names | map | A map from locale codes (e.g., `en`, `de`, `ja`) to localized names.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) |
## represented_country
| Data field name | Type | Data field description |
| --- | --- | --- |
| geoname_id | uint32 | A unique identifier for the represented country as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) |
| is_in_european_union | boolean | This is `true` if the represented country is a member state of the European Union. This key is only present when the value is `true`.
[Learn more about the EU flag on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#eu-flag) |
| iso_code | string | The two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) alpha code for the represented country. |
| names | map | A map from locale codes (e.g., `en`, `de`, `ja`) to localized names.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) |
| type | string | A string indicating the type of entity that is representing the country. Currently this is only `military` but may expand to include other types in the future. |
## subdivisions
| Data field name | Type | Data field description |
| --- | --- | --- |
| geoname_id | uint32 | A unique identifier for the subdivision as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) |
| iso_code | string | A string up to three characters long containing the subdivision portion of the [ISO 3166-2 code](https://en.wikipedia.org/wiki/ISO_3166-2).
[Learn more about ISO code data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#codes) |
| names | map | A map from locale codes (e.g., `en`, `de`, `ja`) to localized names.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) |
## traits
| Data field name | Type | Data field description |
| --- | --- | --- |
| is_anycast | boolean | This is `true` if the IP address belongs to an [anycast network](https://en.wikipedia.org/wiki/Anycast). This key is only present when the value is `true`.
[Learn more about anycast data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#anycast) |
# GeoIP Country binary database fields
Source: https://dev.maxmind.com/geoip/docs/databases/city-and-country/country-binary/
The GeoIP Country binary database contains the following fields for each network.
The top-level record for each network is a map containing the keys listed below.
Each key maps to a map. If a key maps to an undefined or empty value, it is not
included in the record.
| Data field name | Type | Data field description |
| --- | --- | --- |
| [continent](/geoip/docs/databases/city-and-country/country-binary/index.md#continent) | map | A map containing details about the continent associated with the IP address. |
| [country](/geoip/docs/databases/city-and-country/country-binary/index.md#country) | map | A map containing details about the country where MaxMind believes the IP address is located. |
| [registered_country](/geoip/docs/databases/city-and-country/country-binary/index.md#registered_country) | map | A map containing details about the country where the ISP has registered the IP block. This may differ from the country where the IP is located. |
| [represented_country](/geoip/docs/databases/city-and-country/country-binary/index.md#represented_country) | map | A map containing details about the country represented by users of the IP address, such as a military base or embassy. |
| [traits](/geoip/docs/databases/city-and-country/country-binary/index.md#traits) | map | A map containing general traits associated with the IP address. |
## continent
| Data field name | Type | Data field description |
| --- | --- | --- |
| code | string | A two-character continent code like `NA` (North America) or `OC` (Oceania).
[Learn more about continent codes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#codes) |
| geoname_id | uint32 | A unique identifier for the continent as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) |
| names | map | A map from locale codes (e.g., `en`, `de`, `ja`) to localized names.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) |
## country
| Data field name | Type | Data field description |
| --- | --- | --- |
| geoname_id | uint32 | A unique identifier for the country as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) |
| is_in_european_union | boolean | This is `true` if the country is a member state of the European Union. This key is only present when the value is `true`.
[Learn more about the EU flag on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#eu-flag) |
| iso_code | string | The two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) alpha code for the country.
[Learn more about country codes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#codes) |
| names | map | A map from locale codes (e.g., `en`, `de`, `ja`) to localized names.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) |
## registered_country
| Data field name | Type | Data field description |
| --- | --- | --- |
| geoname_id | uint32 | A unique identifier for the registered country as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) |
| is_in_european_union | boolean | This is `true` if the registered country is a member state of the European Union. This key is only present when the value is `true`.
[Learn more about the EU flag on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#eu-flag) |
| iso_code | string | The two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) alpha code for the registered country. |
| names | map | A map from locale codes (e.g., `en`, `de`, `ja`) to localized names.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) |
## represented_country
| Data field name | Type | Data field description |
| --- | --- | --- |
| geoname_id | uint32 | A unique identifier for the represented country as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) |
| is_in_european_union | boolean | This is `true` if the represented country is a member state of the European Union. This key is only present when the value is `true`.
[Learn more about the EU flag on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#eu-flag) |
| iso_code | string | The two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) alpha code for the represented country. |
| names | map | A map from locale codes (e.g., `en`, `de`, `ja`) to localized names.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) |
| type | string | A string indicating the type of entity that is representing the country. Currently this is only `military` but may expand to include other types in the future. |
## traits
| Data field name | Type | Data field description |
| --- | --- | --- |
| is_anycast | boolean | This is `true` if the IP address belongs to an [anycast network](https://en.wikipedia.org/wiki/Anycast). This key is only present when the value is `true`.
[Learn more about anycast data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#anycast) |
# GeoIP Connection Type Databases
Source: https://dev.maxmind.com/geoip/docs/databases/connection-type/
Determine the connection type of your visitors based on their IP address. The
database identifies cellular, cable/DSL, corporate, and satellite connection types.
To learn more about the GeoIP Connection Type database, including terms and
pricing, please
[visit the GeoIP Connection Type Database page](https://www.maxmind.com/en/geoip-databases).
> **⚠️ Warning**
>
> **Data Privacy**
>
> To comply with data privacy regulations, please monitor our
> [Do Not Sell My Personal Information Requests](https://www.maxmind.com/en/accounts/current/do-not-sell-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](/geoip/privacy-exclusions-api/index.md).
## Binary Database
Binary databases make use of the
[MaxMind DB file format](https://maxmind.github.io/MaxMind-DB/). MaxMind
provides [official client APIs](/geoip/docs/databases/index.md#official-client-apis)
that are open source. We also provide a list of
[unsupported and unofficial client APIs](/geoip/docs/databases/index.md#unofficial-client-apis)
and
[unsupported and unofficial integrations](/geoip/docs/databases/index.md#integrations)
with various applications.
You can also use the [mmdbinspect tool](https://github.com/maxmind/mmdbinspect)
(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.
[Learn about the fields in the binary version of this database on our binary
database field reference page.](/geoip/docs/databases/connection-type/binary/index.md)
## CSV Database
In addition to our MaxMind DB binary format, we also offer GeoIP and GeoLite
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-Connection-Type-CSV_{YYYYMMDD}.zip`.
The downloaded zip file contains a single directory which in turn
contains several files. That directory is named
`GeoIP2-Connection-Type-CSV_{YYYYMMDD}`.
The files in this zip archive are:
| Filename | Description |
|----------|-------------|
| `LICENSE.txt` | End user license |
| `COPYRIGHT.txt` | Copyright statement |
| `GeoIP2-Connection-Type-Blocks-IPv4.csv` | CSV file containing data on IPv4 addresses |
| `GeoIP2-Connection-Type-Blocks-IPv6.csv` | CSV file containing data on IPv6 addresses |
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 are named `GeoIP2-Connection-Type-Blocks-IPv4.csv` and
`GeoIP2-Connection-Type-Blocks-IPv6.csv` respectively.
| Data field name | Type | Data field 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::/64”. We offer a utility to convert this column to start/end IPs or start/end integers. See [the conversion utility section](/geoip/docs/databases/connection-type/index.md#conversion-utility) for details. |
| connection_type | string | One of the following values: `Cable/DSL`, `Cellular`, `Corporate`, or `Satellite`. Additional values may be added in the future.
[Learn more about connection type data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#connection-type-data) |
### Conversion Utility
We've created a
[small utility program](https://github.com/maxmind/geoip2-csv-converter) to
allow you to convert a GeoIP 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.](https://github.com/maxmind/geoip2-csv-converter/releases)
## 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:
- [GeoIP2-Connection-Type-CSV_Example.zip](/examples/GeoIP2-Connection-Type-CSV_Example.zip)
### MMDB Example Files
We maintain test MMDB files on GitHub:
- [GeoIP2-Connection-Type-Test.mmdb](https://github.com/maxmind/MaxMind-DB/blob/main/test-data/GeoIP2-Connection-Type-Test.mmdb)
Alternatively, you can [view all of our MMDB test data on GitHub](https://github.com/maxmind/MaxMind-DB/tree/main/test-data).
## 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 May to August 2026, 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 Connection Type | 47.6 MB - 62.3 MB | 12.8 MB - 16.1 MB | 1,106,000 - 1,667,000 | 556,000 - 582,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 Connection Type 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 [GeoIP release notes](/geoip/release-notes/index.md) 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](/geoip/docs/databases/index.md#client-apis).
# GeoIP Connection Type binary database fields
Source: https://dev.maxmind.com/geoip/docs/databases/connection-type/binary/
The GeoIP Connection Type binary database contains the following fields for each
network.
| Data field name | Type | Data field description |
| --- | --- | --- |
| connection_type | string | One of the following values: `Cable/DSL`, `Cellular`, `Corporate`, or `Satellite`. Additional values may be added in the future.
[Learn more about connection type data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#connection-type-data) |
# GeoIP Domain Databases
Source: https://dev.maxmind.com/geoip/docs/databases/domain/
Look up the second-level domain names associated with IPv4 and IPv6 addresses.
To learn more about the GeoIP Domain database, including terms and pricing,
please
[visit the GeoIP Domain Database page](https://www.maxmind.com/en/geoip-databases).
> **⚠️ Warning**
>
> **Data Privacy**
>
> To comply with data privacy regulations, please monitor our
> [Do Not Sell My Personal Information Requests](https://www.maxmind.com/en/accounts/current/do-not-sell-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](/geoip/privacy-exclusions-api/index.md).
## Binary Database
Binary databases make use of the
[MaxMind DB file format](https://maxmind.github.io/MaxMind-DB/). MaxMind
provides [official client APIs](/geoip/docs/databases/index.md#official-client-apis)
that are open source. We also provide a list of
[unsupported and unofficial client APIs](/geoip/docs/databases/index.md#unofficial-client-apis)
and
[unsupported and unofficial integrations](/geoip/docs/databases/index.md#integrations)
with various applications.
You can also use the [mmdbinspect tool](https://github.com/maxmind/mmdbinspect)
(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.
[Learn about the fields in the binary version of this database on our binary
database field reference page.](/geoip/docs/databases/domain/binary/index.md)
## CSV Database
In addition to our MaxMind DB binary format, we also offer GeoIP and GeoLite
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-Domain-CSV_{YYYYMMDD}.zip`.
The downloaded zip file contains a single directory which in turn
contains several files. That directory is named
`GeoIP2-Domain-CSV_{YYYYMMDD}`.
The files in this zip archive are:
| Filename | Description |
|----------|-------------|
| `LICENSE.txt` | End user license |
| `COPYRIGHT.txt` | Copyright statement |
| `GeoIP2-Domain-Blocks-IPv4.csv` | CSV file containing data on IPv4 addresses |
| `GeoIP2-Domain-Blocks-IPv6.csv` | CSV file containing data on IPv6 addresses |
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 are named `GeoIP2-Domain-Blocks-IPv4.csv` and
`GeoIP2-Domain-Blocks-IPv6.csv` respectively.
| Data field name | Type | Data field 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::/64”. We offer a utility to convert this column to start/end IPs or start/end integers. See [the conversion utility section](/geoip/docs/databases/domain/index.md#conversion-utility) for details. |
| domain | string | The domain associated with the IP address.
[Learn more about domain name data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#domain-name-data) |
### Conversion Utility
We've created a
[small utility program](https://github.com/maxmind/geoip2-csv-converter) to
allow you to convert a GeoIP 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.](https://github.com/maxmind/geoip2-csv-converter/releases)
## 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:
- [GeoIP2-Domain-CSV_Example.zip](/examples/GeoIP2-Domain-CSV_Example.zip)
### MMDB Example Files
We maintain test MMDB files on GitHub:
- [GeoIP2-Domain-Test.mmdb](https://github.com/maxmind/MaxMind-DB/blob/main/test-data/GeoIP2-Domain-Test.mmdb)
Alternatively, you can [view all of our MMDB test data on GitHub](https://github.com/maxmind/MaxMind-DB/tree/main/test-data).
## 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 May to August 2026, 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 Domain | 21.1 MB - 22.6 MB | 11.7 MB - 13.0 MB | 554,000 - 598,000 | 156,000 - 170,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 Domain 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 [GeoIP release notes](/geoip/release-notes/index.md) 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](/geoip/docs/databases/index.md#client-apis).
# GeoIP Domain binary database fields
Source: https://dev.maxmind.com/geoip/docs/databases/domain/binary/
The GeoIP Domain binary database contains the following fields for each network.
| Data field name | Type | Data field description |
| --- | --- | --- |
| domain | string | The second-level domain associated with the IP address. This will be something like `example.com` or `example.co.uk`, not `foo.example.com`.
[Learn more about domain name data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#domain-name-data) |
# GeoIP Enterprise Databases
Source: https://dev.maxmind.com/geoip/docs/databases/enterprise/
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 GeoIP Enterprise database, please visit the
[GeoIP Enterprise Database page](https://www.maxmind.com/en/geoip-enterprise-database).
If you are interested in purchasing the database, please
[contact our Enterprise Business team](https://www.maxmind.com/en/solutions/connect-with-a-geoip-expert)
for assistance.
> **⚠️ Warning**
>
> **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.
> **⚠️ Warning**
>
> **Data Privacy**
>
> To comply with data privacy regulations, please monitor our
> [Do Not Sell My Personal Information Requests](https://www.maxmind.com/en/accounts/current/do-not-sell-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](/geoip/privacy-exclusions-api/index.md).
## Binary Database
Binary databases make use of the
[MaxMind DB file format](https://maxmind.github.io/MaxMind-DB/). MaxMind
provides [official client APIs](/geoip/docs/databases/index.md#official-client-apis)
that are open source. We also provide a list of
[unsupported and unofficial client APIs](/geoip/docs/databases/index.md#unofficial-client-apis)
and
[unsupported and unofficial integrations](/geoip/docs/databases/index.md#integrations)
with various applications.
You can also use the [mmdbinspect tool](https://github.com/maxmind/mmdbinspect)
(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.
[Learn about the fields in the binary version of this database on our binary
database field reference page.](/geoip/docs/databases/enterprise/binary/index.md)
## CSV Database
In addition to our MaxMind DB binary format, we also offer GeoIP and GeoLite
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 the zip archive are:
| Filename | Description |
| --- | --- |
| `COPYRIGHT.txt` | Copyright statement |
| `LICENSE.txt` | End user license |
| `GeoIP2-Enterprise-Blocks-IPv4.csv` | CSV file containing data on IPv4 addresses |
| `GeoIP2-Enterprise-Blocks-IPv6.csv` | CSV file containing data on IPv6 addresses |
| `GeoIP2-Enterprise-ISP.csv` | CSV file containing data on ISPs. This may be cross referenced with the various blocks files using the shared `isp_id` key. |
| `GeoIP2-Enterprise-Locations-{locale}.csv` | CSV files containing data on locations. This may be cross referenced with the various blocks files using the shared `geoname_id` key. |
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.
| Data field name | Type | Data field 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::/64". 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](https://www.geonames.org/). This ID can be used to look up the location information in the Location file. [Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) | |
| 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](https://www.geonames.org/). This ID can be used to look up the location information in the Location file. [Learn more about registered countries on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/country-level-and-city-level-geolocation-maxmind) | |
| 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](https://www.geonames.org/). This ID can be used to look up the location information in the Location file. [Learn more about represented countries on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/country-level-and-city-level-geolocation-maxmind) | |
| is_anonymous_proxy | boolean | **Deprecated.** Please see our [GeoIP Anonymous IP database](https://www.maxmind.com/en/geoip-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: United States: 5, Canada: 3, United Kingdom: 2-4, Brazil: 5, Ireland: 3, Japan: 7 (specified for the first 6. The last digit defaults to 1), Netherlands: 4, Portugal: 7 (accurate for the first 4. The last 3 often defaults to `-001`), Singapore: 2 | |
| latitude* | decimal | The approximate [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System) latitude of the location associated with the network. [Learn about the geolocation area defined by latitude, longitude, and accuracy radius, on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area) | |
| longitude* | decimal | The approximate [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System) longitude of the location associated with the network. [Learn about the geolocation area defined by latitude, longitude, and accuracy radius, on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area) | |
| 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.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area) | |
| 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.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#isp-org-data) |
| domain | string | The domain associated with the network. [Learn more about domain name data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#domain-name-data) |
| country_confidence | decimal (1-100) | The confidence that the country was correctly geolocated. [Learn more about confidence factors on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#confidence-factors) |
| subdivision_confidence | decimal (1-100) | The confidence that the most specific subdivision was correctly geolocated. Confidence levels for both the first and second subdivisions are exclusively available in the MMDB files. [Learn more about confidence factors on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#confidence-factors) |
| city_confidence | decimal (1-100) | The confidence that the city was correctly geolocated. [Learn more about confidence factors on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#confidence-factors) |
| postal_confidence | decimal (1-100) | The confidence that the postal code was correctly geolocated. [Learn more about confidence factors on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#confidence-factors) |
| 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](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#user-types). To identify anonymous proxies, you can learn more about the GeoIP Anonymous IP database in [the developer portal](/geoip/docs/databases/anonymous-ip/index.md) or [our main website](https://www.maxmind.com/en/geoip-anonymous-ip-database). |
| is_anycast | boolean | This is `1` if the network is an [anycast network](https://en.wikipedia.org/wiki/Anycast). | |
> **⚠️ Warning**
>
> _\* 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.
| Data field name |
Type |
Data field description |
| isp_id |
integer |
The identifier for the ISP. This key can be cross referenced with the
isp_id in the Blocks files.
|
| 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:
Cable/DSL
Cellular
Corporate
Satellite
|
| user_type |
string |
The user type associated with the IP address. This will be one of the
following values:
business
cafe
cellular
college
consumer_privacy_network
content_delivery_network
government
hosting
library
military
residential
router
school
search_engine_spider
traveler
|
| 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-Enterprise-Locations-en.csv`.
| Data field name | Type | Data field description |
|------|------|-------------|
| geoname_id | integer | A unique identifier for the location as specified by [GeoNames](https://www.geonames.org/). This ID can be used as a key for the Location file. [Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) | |
| 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: **AF** - Africa, **AN** - Antarctica, **AS** - Asia, **EU** - Europe, **NA** - North America, **OC** - Oceania, **SA** - South America | |
| continent_name | string | The continent name for this location in the file's locale. [Learn more about localized names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) | |
| country_iso_code | string (2) | A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/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.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) | |
| subdivision_1_iso_code | string (1-3) | A string of up to three characters containing the region-portion of the [ISO 3166-2](https://en.wikipedia.org/wiki/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.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) | |
| subdivision_2_iso_code | string (1-3) | A string of up to three characters containing the region-portion of the [ISO 3166-2](https://en.wikipedia.org/wiki/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.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) | |
| city_name | string | The city name for this location in the file's locale. [Learn more about localized names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) | |
| metro_code | integer | **Deprecated.** This is a no-longer-maintained code for targeting advertisements in Google. | |
| time_zone | string | The time zone associated with location, as specified by the [IANA Time Zone Database](https://www.iana.org/time-zones), 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](https://github.com/maxmind/geoip2-csv-converter) to
allow you to convert a GeoIP 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.](https://github.com/maxmind/geoip2-csv-converter/releases)
## 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:
- [GeoIP2-Enterprise-CSV_Example.zip](/examples/GeoIP2-Enterprise-CSV_Example.zip)
### MMDB Example Files
We maintain test MMDB files on GitHub:
- [GeoIP2-Enterprise-Test.mmdb](https://github.com/maxmind/MaxMind-DB/blob/main/test-data/GeoIP2-Enterprise-Test.mmdb)
Alternatively, you can [view all of our MMDB test data on GitHub](https://github.com/maxmind/MaxMind-DB/tree/main/test-data).
## 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 [GeoIP release notes](/geoip/release-notes/index.md) to be notified when new
data is added to our databases.
## 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 May to August 2026, 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 | 1.12 GB - 1.27 GB | 339 MB - 401 MB | 7,877,000 - 9,470,000 | 4,699,000 - 4,888,000 |
The listed file sizes are for unpacked databases. Databases are
downloaded in a compressed format.
## 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](/geoip/docs/databases/index.md#client-apis).
# GeoIP Enterprise binary database fields
Source: https://dev.maxmind.com/geoip/docs/databases/enterprise/binary/
The GeoIP Enterprise binary database contains the following fields for each
network. The top-level record for each network is a map containing the keys
listed below. Each key maps to a map or an array of maps. If a key maps to an
undefined or empty value, it is not included in the record.
| Data field name | Type | Data field description |
| --- | --- | --- |
| [city](/geoip/docs/databases/enterprise/binary/index.md#city) | map | A map containing details about the city associated with the IP address. |
| [continent](/geoip/docs/databases/enterprise/binary/index.md#continent) | map | A map containing details about the continent associated with the IP address. |
| [country](/geoip/docs/databases/enterprise/binary/index.md#country) | map | A map containing details about the country where MaxMind believes the IP address is located. |
| [location](/geoip/docs/databases/enterprise/binary/index.md#location) | map | A map containing details about the location associated with the IP address, including coordinates and time zone. |
| [postal](/geoip/docs/databases/enterprise/binary/index.md#postal) | map | A map containing details about the postal code associated with the IP address. |
| [registered_country](/geoip/docs/databases/enterprise/binary/index.md#registered_country) | map | A map containing details about the country where the ISP has registered the IP block. This may differ from the country where the IP is located. |
| [represented_country](/geoip/docs/databases/enterprise/binary/index.md#represented_country) | map | A map containing details about the country represented by users of the IP address, such as a military base or embassy. |
| [subdivisions](/geoip/docs/databases/enterprise/binary/index.md#subdivisions) | array of maps | An array of maps containing data for the subdivisions associated with the IP address, ordered from largest to smallest. |
| [traits](/geoip/docs/databases/enterprise/binary/index.md#traits) | map | A map containing general traits associated with the IP address. |
## city
| Data field name | Type | Data field description |
| --- | --- | --- |
| confidence | uint16 | A value from 0-100 indicating MaxMind's confidence that the city is correct.
[Learn more about confidence factors on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#confidence-factors) |
| geoname_id | uint32 | A unique identifier for the city as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) |
| names | map | A map from locale codes (e.g., `en`, `de`, `ja`) to localized names.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) |
## continent
| Data field name | Type | Data field description |
| --- | --- | --- |
| code | string | A two-character continent code like `NA` (North America) or `OC` (Oceania).
[Learn more about continent codes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#codes) |
| geoname_id | uint32 | A unique identifier for the continent as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) |
| names | map | A map from locale codes (e.g., `en`, `de`, `ja`) to localized names.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) |
## country
| Data field name | Type | Data field description |
| --- | --- | --- |
| confidence | uint16 | A value from 0-100 indicating MaxMind's confidence that the country is correct.
[Learn more about confidence factors on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#confidence-factors) |
| geoname_id | uint32 | A unique identifier for the country as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) |
| is_in_european_union | boolean | This is `true` if the country is a member state of the European Union. This key is only present when the value is `true`.
[Learn more about the EU flag on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#eu-flag) |
| iso_code | string | The two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) alpha code for the country.
[Learn more about country codes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#codes) |
| names | map | A map from locale codes (e.g., `en`, `de`, `ja`) to localized names.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) |
## location
| Data field name | Type | Data field description |
| --- | --- | --- |
| accuracy_radius | uint16 | The approximate accuracy radius in kilometers around the latitude and longitude for the IP address. This is the radius where we have a 67% confidence that the device using the IP address resides within the circle centered at the latitude and longitude with the provided radius.
[Learn about the geolocation area on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area) |
| latitude | double | The approximate latitude of the location associated with the IP address. This value is not precise and should not be used to identify a particular address or household.
[Learn about the geolocation area on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area) |
| longitude | double | The approximate longitude of the location associated with the IP address. This value is not precise and should not be used to identify a particular address or household.
[Learn about the geolocation area on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area) |
| metro_code | uint16 | **Deprecated.** Metro codes are no longer maintained. |
| time_zone | string | The time zone associated with the location, as specified by the [IANA Time Zone Database](https://www.iana.org/time-zones) (e.g., `America/New_York`).
[Learn more about time zone data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#time-zone) |
## postal
| Data field name | Type | Data field description |
| --- | --- | --- |
| code | string | The postal code of the location. Postal codes are not available for all countries. In some countries, this will only contain part of the postal code.
[Learn more about postal code data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#codes) |
| confidence | uint16 | A value from 0-100 indicating MaxMind's confidence that the postal code is correct.
[Learn more about confidence factors on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#confidence-factors) |
## registered_country
| Data field name | Type | Data field description |
| --- | --- | --- |
| geoname_id | uint32 | A unique identifier for the registered country as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) |
| is_in_european_union | boolean | This is `true` if the registered country is a member state of the European Union. This key is only present when the value is `true`.
[Learn more about the EU flag on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#eu-flag) |
| iso_code | string | The two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) alpha code for the registered country. |
| names | map | A map from locale codes (e.g., `en`, `de`, `ja`) to localized names.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) |
## represented_country
| Data field name | Type | Data field description |
| --- | --- | --- |
| geoname_id | uint32 | A unique identifier for the represented country as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) |
| is_in_european_union | boolean | This is `true` if the represented country is a member state of the European Union. This key is only present when the value is `true`.
[Learn more about the EU flag on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#eu-flag) |
| iso_code | string | The two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) alpha code for the represented country. |
| names | map | A map from locale codes (e.g., `en`, `de`, `ja`) to localized names.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) |
| type | string | A string indicating the type of entity that is representing the country. Currently this is only `military` but may expand to include other types in the future. |
## subdivisions
| Data field name | Type | Data field description |
| --- | --- | --- |
| confidence | uint16 | A value from 0-100 indicating MaxMind's confidence that the subdivision is correct.
[Learn more about confidence factors on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#confidence-factors) |
| geoname_id | uint32 | A unique identifier for the subdivision as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) |
| iso_code | string | A string up to three characters long containing the subdivision portion of the [ISO 3166-2 code](https://en.wikipedia.org/wiki/ISO_3166-2).
[Learn more about ISO code data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#codes) |
| names | map | A map from locale codes (e.g., `en`, `de`, `ja`) to localized names.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) |
## traits
| Data field name | Type | Data field description |
| --- | --- | --- |
| autonomous_system_number | uint32 | The [autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_%28Internet%29) number associated with the IP address.
[Learn more about autonomous system data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#autonomous-system-data) |
| autonomous_system_organization | string | The organization associated with the registered autonomous system number for the IP address.
[Learn more about autonomous system data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#autonomous-system-data) |
| connection_type | string | One of the following values: `Cable/DSL`, `Cellular`, `Corporate`, or `Satellite`. Additional values may be added in the future.
[Learn more about connection type data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#connection-type-data) |
| domain | string | The second-level domain associated with the IP address. This will be something like `example.com` or `example.co.uk`, not `foo.example.com`.
[Learn more about domain name data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#domain-name-data) |
| is_anycast | boolean | This is `true` if the IP address belongs to an [anycast network](https://en.wikipedia.org/wiki/Anycast). This key is only present when the value is `true`.
[Learn more about anycast data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#anycast) |
| isp | string | The name of the ISP associated with the IP address.
[Learn more about ISP data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#isp-org-data) |
| mobile_country_code | string | The [mobile country code (MCC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with the IP address and ISP.
[Learn more about mobile country codes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#mobile-codes) |
| mobile_network_code | string | The [mobile network code (MNC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with the IP address and ISP.
[Learn more about mobile network codes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#mobile-codes) |
| organization | string | The name of the organization associated with the IP address.
[Learn more about organization data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#isp-org-data) |
| user_type | string | The user type associated with the IP address. This can be one of the following values: `business`, `cafe`, `cellular`, `college`, `consumer_privacy_network`, `content_delivery_network`, `government`, `hosting`, `library`, `military`, `residential`, `router`, `school`, `search_engine_spider`, or `traveler`.
[Learn more about user type data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#user-types) |
# GeoIP ISP Databases
Source: https://dev.maxmind.com/geoip/docs/databases/isp/
Determine the Internet Service Provider, organization name, and autonomous
system number and organization associated with an IP address.
To learn more about the GeoIP ISP database, including terms and pricing, please
[visit the GeoIP ISP Database page](https://www.maxmind.com/en/geoip-databases).
> **⚠️ Warning**
>
> **Data Privacy**
>
> To comply with data privacy regulations, please monitor our
> [Do Not Sell My Personal Information Requests](https://www.maxmind.com/en/accounts/current/do-not-sell-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](/geoip/privacy-exclusions-api/index.md).
## Binary Database
Binary databases make use of the
[MaxMind DB file format](https://maxmind.github.io/MaxMind-DB/). MaxMind
provides [official client APIs](/geoip/docs/databases/index.md#official-client-apis)
that are open source. We also provide a list of
[unsupported and unofficial client APIs](/geoip/docs/databases/index.md#unofficial-client-apis)
and
[unsupported and unofficial integrations](/geoip/docs/databases/index.md#integrations)
with various applications.
You can also use the [mmdbinspect tool](https://github.com/maxmind/mmdbinspect)
(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.
[Learn about the fields in the binary version of this database on our binary
database field reference page.](/geoip/docs/databases/isp/binary/index.md)
## CSV Database
In addition to our MaxMind DB binary format, we also offer GeoIP and GeoLite
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-ISP-CSV_{YYYYMMDD}.zip`.
The downloaded zip file contains a single directory which in turn
contains several files. That directory is named
`GeoIP2-ISP-CSV_{YYYYMMDD}`.
The files in this zip archive are:
| Filename | Description |
|----------|-------------|
| `LICENSE.txt` | End user license |
| `COPYRIGHT.txt` | Copyright statement |
| `GeoIP2-ISP-Blocks-IPv4.csv` | CSV file containing data on IPv4 addresses |
| `GeoIP2-ISP-Blocks-IPv6.csv` | CSV file containing data on IPv6 addresses |
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 are named `GeoIP2-ISP-Blocks-IPv4.csv` and `GeoIP2-ISP-Blocks-IPv6.csv`
respectively.
| Data field name | Type | Data field 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::/64”. We offer a utility to convert this column to start/end IPs or start/end integers. See [the conversion utility section](/geoip/docs/databases/isp/index.md#conversion-utility) for details. |
| isp | string | The name of the ISP associated with the IP address.
[Learn more about ISP data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#isp-org-data) |
| organization | string | The name of the organization associated with the IP address.
[Learn more about organization data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#isp-org-data) |
| autonomous_system_number | integer | The [autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_%28Internet%29) number associated with the IP address.
[Learn more about autonomous system data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#autonomous-system-data) |
| autonomous_system_organization | string | The organization associated with the registered autonomous system number for the IP address.
[Learn more about autonomous system data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#autonomous-system-data) |
| mobile_country_code | string | The [mobile country code (MCC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with the IP address and ISP.
[Learn more about mobile country codes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#mobile-codes) |
| mobile_network_code | string | The [mobile network code (MNC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with the IP address and ISP.
[Learn more about mobile network codes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#mobile-codes) |
### Conversion Utility
We've created a
[small utility program](https://github.com/maxmind/geoip2-csv-converter) to
allow you to convert a GeoIP 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.](https://github.com/maxmind/geoip2-csv-converter/releases)
## 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:
- [GeoIP2-ISP-CSV_Example.zip](/examples/GeoIP2-ISP-CSV_Example.zip)
### MMDB Example Files
We maintain test MMDB files on GitHub:
- [GeoIP2-ISP-Test.mmdb](https://github.com/maxmind/MaxMind-DB/blob/main/test-data/GeoIP2-ISP-Test.mmdb)
Alternatively, you can [view all of our MMDB test data on GitHub](https://github.com/maxmind/MaxMind-DB/tree/main/test-data).
## 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 May to August 2026, 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 ISP | 135 MB - 142 MB | 19.8 MB - 20.3 MB | 944,000 - 969,000 | 593,000 - 656,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 ISP 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 [GeoIP release notes](/geoip/release-notes/index.md) 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](/geoip/docs/databases/index.md#client-apis).
# GeoIP ISP binary database fields
Source: https://dev.maxmind.com/geoip/docs/databases/isp/binary/
The GeoIP ISP binary database contains the following fields for each network.
| Data field name | Type | Data field description |
| --- | --- | --- |
| autonomous_system_number | uint32 | The [autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_%28Internet%29) number associated with the IP address.
[Learn more about autonomous system data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#autonomous-system-data) |
| autonomous_system_organization | string | The organization associated with the registered autonomous system number for the IP address.
[Learn more about autonomous system data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#autonomous-system-data) |
| isp | string | The name of the ISP associated with the IP address.
[Learn more about ISP data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#isp-org-data) |
| mobile_country_code | string | The [mobile country code (MCC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with the IP address and ISP.
[Learn more about mobile country codes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#mobile-codes) |
| mobile_network_code | string | The [mobile network code (MNC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with the IP address and ISP.
[Learn more about mobile network codes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#mobile-codes) |
| organization | string | The name of the organization associated with the IP address.
[Learn more about organization data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#isp-org-data) |
# GeoIP Residential Proxy Databases
Source: https://dev.maxmind.com/geoip/docs/databases/residential-proxy/
> **⚠️ Warning**
>
> The GeoIP Residential Proxy database is under active
> development. New fields are expected to be added. Please design your
> integrations to expect new fields, and ensure you monitor updates to our
> [GeoIP release notes](/geoip/release-notes/index.md) to get notifications about new
> fields and changes to existing ones.
MaxMind's GeoIP Residential Proxy database helps protect your business by
identifying IP addresses sighted in a residential proxy network. Residential
proxy networks use IP addresses commonly assigned to homes, small businesses,
and other end users of the internet to provide proxy access via compromised
devices. This feed includes confidence scores, timestamps, and residential
proxy provider names.
The GeoIP Residential Proxy database is included with a license for the
[GeoIP Anonymous Plus database](/geoip/docs/databases/anonymous-plus/index.md). If you
are interested in purchasing the database, please
[contact our Enterprise Business team](https://www.maxmind.com/en/solutions/connect-with-a-geoip-expert)
for assistance.
## Binary Database
Binary databases make use of the
[MaxMind DB file format](https://maxmind.github.io/MaxMind-DB/). MaxMind
provides [official client APIs](/geoip/docs/databases/index.md#official-client-apis)
that are open source. We also provide a list of
[unsupported and unofficial client APIs](/geoip/docs/databases/index.md#unofficial-client-apis)
and
[unsupported and unofficial integrations](/geoip/docs/databases/index.md#integrations)
with various applications.
You can also use the [mmdbinspect tool](https://github.com/maxmind/mmdbinspect)
(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.
[Learn about the fields in the binary version of this database on our binary
database field reference page.](/geoip/docs/databases/residential-proxy/binary/index.md)
### Looking up an IP
The `geoip2` Python client library does not yet ship model classes for this
database. Use the lower-level
[`maxminddb`](https://github.com/maxmind/MaxMind-DB-Reader-python) reader to
read records directly:
```python
import maxminddb
with maxminddb.open_database("GeoIP-Residential-Proxy.mmdb") as reader:
record = reader.get("1.2.3.4")
if record is not None:
print(record["provider_name"])
print(record["anonymizer_confidence"])
print(record["network_last_seen"])
```
## CSV Database
In addition to our MaxMind DB binary format, we also offer GeoIP and GeoLite
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 `GeoIP-Residential-Proxy-CSV_{YYYYMMDD}.zip`.
The downloaded zip file contains a single directory which in turn
contains several files. That directory is named
`GeoIP-Residential-Proxy-CSV_{YYYYMMDD}`.
The files in this zip archive are:
| Filename | Description |
|----------|-------------|
| `LICENSE.txt` | End user license |
| `COPYRIGHT.txt` | Copyright statement |
| `GeoIP-Residential-Proxy-Blocks-IPv4.csv` | CSV file containing data on IPv4 addresses |
| `GeoIP-Residential-Proxy-Blocks-IPv6.csv` | CSV file containing data on IPv6 addresses |
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 are named `GeoIP-Residential-Proxy-Blocks-IPv4.csv` and
`GeoIP-Residential-Proxy-Blocks-IPv6.csv` respectively.
| Data field name | Type | Data field description |
| --- | --- | --- |
| network | IP network as a string | This is the IPv4 or IPv6 network in CIDR format such as "2.21.92.0/32" or "2001:4b0::/64". Due to the nature of residential proxies, this database contains mostly IPv4 /32s and IPv6 /64s. We offer a utility to convert this column to start/end IPs or start/end integers. See [the conversion utility section](/geoip/docs/databases/residential-proxy/index.md#conversion-utility) for details. |
| provider_name | string | The name of the residential proxy provider (e.g., `oxylabs`, `smartproxy`) associated with the network.
Please note that MaxMind identifies a subset of residential proxy providers. A current list of providers identified in the Residential Proxy database is available on request.
[Learn more about residential proxy provider detection on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind) |
| anonymizer_confidence | integer | A score ranging from 1 to 99 that is our percent confidence that the network is currently part of an actively used residential proxy service. These scores are bucketed in 5% buckets, but 1 and 99 are also possible (1, 5, 10, 15, 20, 25, ... 99).
[Learn more about anonymizer confidence on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind) |
| network_last_seen | string | The last day that the network was sighted in our analysis of anonymized networks. This is in the ISO 8601 date format (YYYY-MM-DD).
[Learn more about anonymizer and proxy detection on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind) |
### Conversion Utility
We've created a
[small utility program](https://github.com/maxmind/geoip2-csv-converter) to
allow you to convert a GeoIP 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.](https://github.com/maxmind/geoip2-csv-converter/releases)
## 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:
- [GeoIP-Residential-Proxy-CSV_Example.zip](/examples/GeoIP-Residential-Proxy-CSV_Example.zip)
### MMDB Example Files
We maintain test MMDB files on GitHub:
- [GeoIP-Residential-Proxy-Test.mmdb](https://github.com/maxmind/MaxMind-DB/blob/main/test-data/GeoIP-Residential-Proxy-Test.mmdb)
Alternatively, you can [view all of our MMDB test data on GitHub](https://github.com/maxmind/MaxMind-DB/tree/main/test-data).
## 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 May to August 2026, 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 Residential Proxy | 3.71 GB - 3.91 GB | 3.15 GB - 3.41 GB | 61,942,000 - 67,626,000 | 24,877,000 - 29,297,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 Residential Proxy 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 [GeoIP release notes](/geoip/release-notes/index.md) 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](/geoip/docs/databases/index.md#client-apis).
# GeoIP Residential Proxy binary database fields
Source: https://dev.maxmind.com/geoip/docs/databases/residential-proxy/binary/
The GeoIP Residential Proxy binary database contains the following fields for each
network.
| Data field name | Type | Data field description |
| --- | --- | --- |
| anonymizer_confidence | uint16 | A score ranging from 1 to 99 that is our percent confidence that the network is currently part of an actively used residential proxy service. These scores are bucketed in 5% buckets, but 1 and 99 are also possible (1, 5, 10, 15, 20, 25, ... 99).
[Learn more about anonymizer confidence on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind) |
| network_last_seen | string | The last day that the network was sighted in our analysis of anonymized networks. This is in the ISO 8601 date format (YYYY-MM-DD).
[Learn more about anonymizer and proxy detection on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind) |
| provider_name | string | The name of the residential proxy provider (e.g., `oxylabs`, `smartproxy`) associated with the network.
Please note that MaxMind identifies a subset of residential proxy providers. A current list of providers identified in the Residential Proxy database is available on request.
[Learn more about residential proxy provider detection on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind) |
# GeoIP Static IP Score Databases
Source: https://dev.maxmind.com/geoip/docs/databases/static-ip-score/
This database indicates how static or dynamic an IP address is, which can be
useful for deciding whether an IP address represents the same user over time.
To learn more about the GeoIP Static IP Score database, including terms and
pricing, please
[contact our Enterprise Business team](https://www.maxmind.com/en/solutions/connect-with-a-geoip-expert)
for assistance.
> **⚠️ Warning**
>
> **Data Privacy**
>
> To comply with data privacy regulations, please monitor our
> [Do Not Sell My Personal Information Requests](https://www.maxmind.com/en/accounts/current/do-not-sell-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](/geoip/privacy-exclusions-api/index.md).
## Binary Database
Binary databases make use of the
[MaxMind DB file format](https://maxmind.github.io/MaxMind-DB/).
You can use the [mmdbinspect tool](https://github.com/maxmind/mmdbinspect) (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.
[Learn about the fields in the binary version of this database on our binary
database field reference page.](/geoip/docs/databases/static-ip-score/binary/index.md)
## CSV Database
In addition to our MaxMind DB binary format, we also offer GeoIP and GeoLite
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-Static-IP-Score-CSV_{YYYYMMDD}.zip`.
The downloaded zip file contains a single directory which in turn
contains several files. That directory is named
`GeoIP2-Static-IP-Score-CSV_{YYYYMMDD}`.
The files in this zip archive are:
| Filename | Description |
|----------|-------------|
| `LICENSE.txt` | End user license |
| `COPYRIGHT.txt` | Copyright statement |
| `GeoIP2-Static-IP-Score-Blocks-IPv4.csv` | CSV file containing data on IPv4 addresses |
| `GeoIP2-Static-IP-Score-Blocks-IPv6.csv` | CSV file containing data on IPv6 addresses |
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 are named `GeoIP2-Static-IP-Score-Blocks-IPv4.csv` and
`GeoIP2-Static-IP-Score-Blocks-IPv6.csv` respectively.
| Data field name | Type | Data field description |
| --- | --- | --- |
| network | IP network as a string | This is the IPv4 or IPv6 network in CIDR format such as "2.125.160.216/29" or "2001:c50::/32". We offer a utility to convert this column to start/end IPs or start/end integers. See [the conversion utility section](/geoip/docs/databases/static-ip-score/index.md#conversion-utility) for details. |
| static_ip_score | decimal | An indicator of how static or dynamic an IP address is. The value ranges from 0 to 99.99 with higher values meaning a greater static association. For example, many IP addresses with a user_type of cellular have a score under 1. Broadband IPs that don't change very often typically have a score above 30.
This indicator can be useful for deciding whether an IP address represents the same user over time.
[Learn more about the static IP score on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#static-ip-scoring)
min: 0, max: 99.99 |
### Conversion Utility
We've created a
[small utility program](https://github.com/maxmind/geoip2-csv-converter) to
allow you to convert a GeoIP 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.](https://github.com/maxmind/geoip2-csv-converter/releases)
## 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:
- [GeoIP2-Static-IP-Score-CSV_Example.zip](/examples/GeoIP2-Static-IP-Score-CSV_Example.zip)
### MMDB Example Files
We maintain test MMDB files on GitHub:
- [GeoIP2-Static-IP-Score-Test.mmdb](https://github.com/maxmind/MaxMind-DB/blob/main/test-data/GeoIP2-Static-IP-Score-Test.mmdb)
Alternatively, you can [view all of our MMDB test data on GitHub](https://github.com/maxmind/MaxMind-DB/tree/main/test-data).
## 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 May to August 2026, 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 Static IP Score | 47.5 MB - 53.8 MB | 14.2 MB - 16.0 MB | 1,425,000 - 1,719,000 | 545,000 - 563,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 Static IP Score 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 [GeoIP release notes](/geoip/release-notes/index.md) to be notified when new
data is added to our databases.
# GeoIP Static IP Score binary database fields
Source: https://dev.maxmind.com/geoip/docs/databases/static-ip-score/binary/
The GeoIP Static IP Score binary database contains the following fields for each
network.
| Data field name | Type | Data field description |
| --- | --- | --- |
| score | double | An indicator of how static or dynamic an IP address is. The value ranges from 0 to 99.99 with higher values meaning a greater static association. For example, many IP addresses with a `user_type` of `cellular` have a score under 1. Broadband IPs that don't change very often typically have a score above 30.
This indicator can be useful for deciding whether an IP address represents the same user over time.
[Learn more about the static IP score on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#static-ip-scoring) |
# GeoIP User Count Databases
Source: https://dev.maxmind.com/geoip/docs/databases/user-count/
The GeoIP User Count database provides insight into the number of expected users
on an IP address and on the associated subnet during the past 24 hours, helping
identify a variety of fraud including unauthorized access to content and click
fraud.
To learn more about the GeoIP User Count database, including terms and pricing,
please
[contact our Enterprise Business team](https://www.maxmind.com/en/solutions/connect-with-a-geoip-expert)
for assistance.
> **⚠️ Warning**
>
> **Data Privacy**
>
> To comply with data privacy regulations, please monitor our
> [Do Not Sell My Personal Information Requests](https://www.maxmind.com/en/accounts/current/do-not-sell-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](/geoip/privacy-exclusions-api/index.md).
## Binary Database
Binary databases make use of the
[MaxMind DB file format](https://maxmind.github.io/MaxMind-DB/).
You can use the [mmdbinspect tool](https://github.com/maxmind/mmdbinspect) (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.
[Learn about the fields in the binary version of this database on our binary
database field reference page.](/geoip/docs/databases/user-count/binary/index.md)
## CSV Database
In addition to our MaxMind DB binary format, we also offer GeoIP and GeoLite
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-User-Count-CSV_{YYYYMMDD}.zip`.
The downloaded zip file contains a single directory which in turn
contains several files. That directory is named
`GeoIP2-User-Count-CSV_{YYYYMMDD}`.
The files in this zip archive are:
| Filename | Description |
|----------|-------------|
| `LICENSE.txt` | End user license |
| `COPYRIGHT.txt` | Copyright statement |
| `GeoIP2-User-Count-Blocks-IPv4.csv` | CSV file containing data on IPv4 addresses |
| `GeoIP2-User-Count-Blocks-IPv6.csv` | CSV file containing data on IPv6 addresses |
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 are named `GeoIP2-User-Count-Blocks-IPv4.csv` and
`GeoIP2-User-Count-Blocks-IPv6.csv` respectively.
> **⚠️ Warning**
>
> Please note that the CSV version of the GeoIP User Count
> database contains separate CSV files covering the IPv4 and IPv6 space. All the
> fields listed below are present as columns in both CSV files, but the values
> associated with IPv6 fields in the IPv4 file will be `null`, and the IPv4 fields
> in the IPv6 file will be `null`.
| Data field name | Type | Data field description |
| --- | --- | --- |
| network | IP network as a string | This is the IPv4 or IPv6 network in CIDR format such as "2.125.160.216/29" or "2001:c50::/32". We offer a utility to convert this column to start/end IPs or start/end integers. See [the conversion utility section](/geoip/docs/databases/user-count/index.md#conversion-utility) for details. |
| ipv4_32 | integer | The estimated number of users sharing the IPv4 address during the past 24 hours. This is not an exact count of individual users but rather a normalized value.
[Learn more about the normalization and values of the user count on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#user-counts) |
| ipv6_64 | integer | The estimated number of users sharing the IPv6 /64 network during the past 24 hours. IPv6 /64 networks are usually assigned to individual households and can be considered similar from a user perspective to an individual IPv4 address. This is not an exact count of individual users but rather a normalized value.
[Learn more about the normalization and values of the user count on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#user-counts) |
| ipv4_24 | integer | The estimated number of users sharing the IPv4 /24 network that the IP address is contained within during the past 24 hours. This is not an exact count of individual users but rather a normalized value.
These values should be greater than the values provided in `ipv4_32` because they are representative of the number of users across a larger number of IP addresses.
[Learn more about the normalization and values of the user count on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#user-counts) |
| ipv6_48 | integer | The estimated number of users sharing the IPv6 /48 network that the IP address is contained within during the past 24 hours. This is not an exact count of individual users but rather a normalized value.
These values should be greater than the values provided in `ipv6_64` because they are representative of the number of users across a larger number of IP addresses.
[Learn more about the normalization and values of the user count on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#user-counts) |
### Conversion Utility
We've created a
[small utility program](https://github.com/maxmind/geoip2-csv-converter) to
allow you to convert a GeoIP 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.](https://github.com/maxmind/geoip2-csv-converter/releases)
## 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:
- [GeoIP2-User-Count-CSV_Example.zip](/examples/GeoIP2-User-Count-CSV_Example.zip)
### MMDB Example Files
We maintain test MMDB files on GitHub:
- [GeoIP2-User-Count-Test.mmdb](https://github.com/maxmind/MaxMind-DB/blob/main/test-data/GeoIP2-User-Count-Test.mmdb)
Alternatively, you can [view all of our MMDB test data on GitHub](https://github.com/maxmind/MaxMind-DB/tree/main/test-data).
## 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 May to August 2026, 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 User Count | 5.60 GB - 6.91 GB | 1.65 GB - 1.99 GB | 146,984,000 - 166,267,000 | 57,738,000 - 86,092,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 User Count 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 [GeoIP release notes](/geoip/release-notes/index.md) to be notified when new
data is added to our databases.
# GeoIP User Count binary database fields
Source: https://dev.maxmind.com/geoip/docs/databases/user-count/binary/
The GeoIP User Count binary database contains the following fields for each
network.
| Data field name | Type | Data field description |
| --- | --- | --- |
| ipv4_24 | uint32 | The estimated number of users sharing the IPv4 /24 network that the IP address is contained within during the past 24 hours. This is not an exact count of individual users but rather a normalized value.
These values should be greater than the values provided in `ipv4_32` because they are representative of the number of users across a larger number of IP addresses.
[Learn more about the normalization and values of the user count on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#user-counts) |
| ipv4_32 | uint32 | The estimated number of users sharing the IPv4 address during the past 24 hours. This is not an exact count of individual users but rather a normalized value.
[Learn more about the normalization and values of the user count on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#user-counts) |
| ipv6_32 | uint32 | The estimated number of users sharing the IPv6 /32 network that the IP address is contained within during the past 24 hours. This is not an exact count of individual users but rather a normalized value.
These values should be greater than the values provided in `ipv6_48` because they are representative of the number of users across a larger number of IP addresses.
[Learn more about the normalization and values of the user count on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#user-counts) |
| ipv6_48 | uint32 | The estimated number of users sharing the IPv6 /48 network that the IP address is contained within during the past 24 hours. This is not an exact count of individual users but rather a normalized value.
These values should be greater than the values provided in `ipv6_64` because they are representative of the number of users across a larger number of IP addresses.
[Learn more about the normalization and values of the user count on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#user-counts) |
| ipv6_64 | uint32 | The estimated number of users sharing the IPv6 /64 network during the past 24 hours. IPv6 /64 networks are usually assigned to individual households and can be considered similar from a user perspective to an individual IPv4 address. This is not an exact count of individual users but rather a normalized value.
[Learn more about the normalization and values of the user count on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#user-counts) |
# GeoIP and GeoLite Web Services Documentation
Source: https://dev.maxmind.com/geoip/docs/web-services/
## Overview
To learn more about the GeoIP web services and to purchase credits, please view
our
[GeoIP web services page](https://www.maxmind.com/en/geoip-api-web-services).
If you are interested in minFraud Insights or minFraud Factors web services,
which also contain GeoIP Insights data, please
[contact our Enterprise Business team](https://www.maxmind.com/en/sales-contact?comments=I+am+interested+in+minFraud+Factors.&interested_in=minfraud)
for assistance. To better understand the differences between each minFraud
service, review our
[minFraud Service Plans and Pricing page](https://www.maxmind.com/en/solutions/fraud-and-risk/plans-pricing)
and the [Response Body section](/geoip/docs/web-services/responses/index.md#response).
## OpenAPI Specification
The
[GeoIP and GeoLite OpenAPI specification](https://github.com/maxmind/openapi/blob/main/bundled/geoip.yaml)
([raw file](https://raw.githubusercontent.com/maxmind/openapi/main/bundled/geoip.yaml))
describes the web services. Use the raw file with API tools and code generators.
## Client APIs
### Official Client APIs
| Language or Framework | Package Repository | Documentation | Version Control |
| --- | --- | --- | --- |
| .NET (C#) | [NuGet](https://www.nuget.org/packages/MaxMind.GeoIP2/) | [GitHub Pages](https://maxmind.github.io/GeoIP2-dotnet/) | [GitHub](https://github.com/maxmind/GeoIP2-dotnet) |
| Java | [Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.maxmind.geoip2%22%20AND%20a%3A%22geoip2%22) | [GitHub Pages](https://maxmind.github.io/GeoIP2-java/) | [GitHub](https://github.com/maxmind/GeoIP2-java) |
| JavaScript (browser) | | [API Docs](/geoip/geolocate-an-ip/client-side-javascript/index.md) | |
| Node.js | [NPM](https://www.npmjs.com/package/@maxmind/geoip2-node) | [GitHub Pages](https://maxmind.github.io/GeoIP2-node/) | [GitHub](https://github.com/maxmind/GeoIP2-node) |
| Perl (deprecated) | [CPAN](https://metacpan.org/dist/GeoIP2) | [MetaCPAN](https://metacpan.org/dist/GeoIP2) | [GitHub](https://github.com/maxmind/GeoIP2-perl) |
| PHP | [Packagist](https://packagist.org/packages/geoip2/geoip2) | [GitHub Pages](https://maxmind.github.io/GeoIP2-php/) | [GitHub](https://github.com/maxmind/GeoIP2-php) |
| Python | [PyPI](https://pypi.org/project/geoip2/) | [Read the Docs](https://geoip2.readthedocs.io/en/latest/) | [GitHub](https://github.com/maxmind/GeoIP2-python) |
| Ruby | [RubyGems](https://rubygems.org/gems/maxmind-geoip2) | [RubyDoc](https://www.rubydoc.info/gems/maxmind-geoip2) | [GitHub](https://github.com/maxmind/GeoIP2-ruby) |
### Third-Party Client APIs
> **⚠️ Warning**
>
> **_Use at your own risk._** MaxMind does not offer support
> for these APIs and has not reviewed the code.
| Language or Framework | Package Repository | Documentation | Version Control |
| --- | --- | --- | --- |
| Go | | [GoDoc](https://pkg.go.dev/github.com/savaki/geoip2?utm_source=godoc) | [GitHub](https://github.com/savaki/geoip2) |
## Timeout Errors
If you get timeout errors, first confirm if we experienced a service disruption
on our [status page](https://status.maxmind.com/) or on
[Pingdom](https://stats.pingdom.com/datuqzybqg5z).
If there has not been a service disruption, we may be able to help you diagnose
your connection issues. Please use our
[`mm-network-analyzer` program](https://github.com/maxmind/mm-network-analyzer),
which is designed to aid in diagnosing networking issues. It creates a zip file
containing various network checks like traceroute, DNS, etc. You can download
the latest version, run it, and send the resulting zip file to our support team
for review.
Please note, `mm-network-analyzer` is not compatible with Windows, but you can
reach out to support with the following information (if available to you) to
help us investigate an issue:
- Your requesting server’s IP address
- Which web service demonstrates the issue
- What integration method you’re using for that web service
- Any full error messages you’re receiving
- Date and time frame (including time zone) that you experienced the issue
- Your traceroute to `geoip.maxmind.com`
[You can submit your support request on our Knowledge Base.](https://support.maxmind.com/knowledge-base)
## Command Line (curl) Examples
The web service may be accessed using `curl`, a simple command-line HTTP client.
The `-u` flag is used to pass the
[HTTP basic authentication header](https://en.wikipedia.org/wiki/Basic_access_authentication#Client_side)
that provides the web service with your credentials.
For the following examples, replace `{account_id}` and `{license_key}`
(including the brackets) with your
[account ID and license key](https://www.maxmind.com/en/accounts/current/license-key),
and replace `{ip_address}` with the IP address you wish to look up.
### GeoIP Country
```bash
# Retrieve data for your IP address.
curl -u "{account_id}:{license_key}" \
"https://geoip.maxmind.com/geoip/v2.1/country/me?pretty"
# Retrieve data for an arbitrary IP address.
curl -u "{account_id}:{license_key}" \
"https://geoip.maxmind.com/geoip/v2.1/country/{ip_address}?pretty"
```
### GeoIP City Plus
```bash
# Retrieve data for your IP address.
curl -u "{account_id}:{license_key}" \
"https://geoip.maxmind.com/geoip/v2.1/city/me?pretty"
# Retrieve data for an arbitrary IP address.
curl -u "{account_id}:{license_key}" \
"https://geoip.maxmind.com/geoip/v2.1/city/{ip_address}?pretty"
```
### GeoIP Insights
```bash
# Retrieve data for your IP address.
curl -u "{account_id}:{license_key}" \
"https://geoip.maxmind.com/geoip/v2.1/insights/me?pretty"
# Retrieve data for an arbitrary IP address.
curl -u "{account_id}:{license_key}" \
"https://geoip.maxmind.com/geoip/v2.1/insights/{ip_address}?pretty"
```
### GeoLite Country
```bash
# Retrieve data for your IP address.
curl -u "{account_id}:{license_key}" \
"https://geolite.info/geoip/v2.1/country/me?pretty"
# Retrieve data for an arbitrary IP address.
curl -u "{account_id}:{license_key}" \
"https://geolite.info/geoip/v2.1/country/{ip_address}?pretty"
```
### GeoLite City
```bash
# Retrieve data for your IP address.
curl -u "{account_id}:{license_key}" \
"https://geolite.info/geoip/v2.1/city/me?pretty"
# Retrieve data for an arbitrary IP address.
curl -u "{account_id}:{license_key}" \
"https://geolite.info/geoip/v2.1/city/{ip_address}?pretty"
```
## IP Geolocation Accuracy
> **⚠️ Warning**
>
> **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.
Use the Accuracy Radius as an indication of geolocation accuracy for the
latitude and longitude coordinates we return for an IP address. The actual
location of the IP address is likely within the area defined by this radius and
the latitude and longitude coordinates.
## Versioning
The GeoIP web services use two-part versions. Our current release is version
2.1. The major version number will remain at 2 for the foreseeable future and
will not change unless we are releasing an entirely new product ("GeoIP3").
The minor version will only change if there are breaking changes in the web
service. A breaking change is one that breaks client code that follows the
documentation on this page. Breaking changes include changing the type of an
existing field, deleting a field entirely, or changing URIs.
All changes to the web services will be documented in the
[GeoIP release notes](/geoip/release-notes/index.md), whether or not the version number
is changed.
The following changes are not considered to be breaking changes and will not be
accompanied by a version number change:
- Adding a new field, either at the top level of the structure or in one
particular object such as the country or city. Client code should be written
to allow for new fields to appear.
- Adding new values to enum fields such as `user_type`. Note that this also
applies to fields such as country codes, country subdivision codes, time
zones, etc.
- Adding a new language for localized names. We may add additional locale codes
in the future.
- Adding or removing error codes, and/or changing the body type for an error.
Client code should always check the `Content-Type` header for any error
response. Client code should also be prepared to handle any valid HTTP 4xx or
5xx status code.
- Adding a new service. If we add a GeoIP Inter-Galactic service, we will use a
new path such as `/geoip/v2.1/inter-galactic`. This should not break any
existing client code.
# GeoIP Legacy Web Services
Source: https://dev.maxmind.com/geoip/docs/web-services/legacy/
> **ℹ️ Info**
>
> We have implemented recent changes to our GeoIP Legacy web
> services in line with the retirement of GeoIP Legacy Databases. Please see our
> [blog post](https://blog.maxmind.com/data-changes-to-geoip-legacy-and-minfraud-legacy-web-services-in-may-2022/)
> for more information.
> **⚠️ Warning**
>
> **Note:** This documentation is for the GeoIP legacy
> services. New customers do not have access to these services. Please use the
> [GeoIP web services](/geoip/docs/web-services/index.md).
The GeoIP web services allow you to look up information about a given IP address
using an HTTP-based API.
## 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.
## HTTP-based API
The HTTP API requires you to pass a set of parameters as an HTTP GET or POST.
Results are returned in a simple text format documented below.
We offer several different services, each providing a different amount of
information about the IP address.
All of the services take the same parameters as inputs. The only difference
between them is the URI they use and the data they return. The two parameters
that each service takes are the IP address to look up and
[your MaxMind license key](https://www.maxmind.com/en/accounts/current/license-key).
The parameters should be passed in a query string or as a form post
(application/x-www-form-urlencoded). The IP address parameter should be named
**i** (lower case "I") and the license key should be named **l** (lower case
"L").
The IP address should be passed as a string like "44.55.66.77" or
"2001:db8::2:1".
### Per-Service URIs
The URIs for each service are as follows:
| Service | URI |
| ------------------------ | --------------------------------------------------- |
| Country | `https://geoip.maxmind.com/geoip/v1.0/country` |
| City | `https://geoip.maxmind.com/geoip/v1.0/city` |
| City/ISP/Org | `https://geoip.maxmind.com/geoip/v1.0/city-isp-org` |
| Insights (formerly Omni) | `https://geoip.maxmind.com/geoip/v1.0/insights` |
You might also be using the original GeoIP Legacy URIs:
| Service | URI |
| ------------------------ | ----------------------------- |
| Country | `https://geoip.maxmind.com/a` |
| City | `https://geoip.maxmind.com/b` |
| City/ISP/Org | `https://geoip.maxmind.com/f` |
| Insights (formerly Omni) | `https://geoip.maxmind.com/e` |
The `geoip.maxmind.com` hostname automatically picks the data center
geographically closest to you.
### Security
You must access this service via HTTPS. We require TLS 1.2 or greater for HTTPS
requests to our servers to keep your data secure.
### HTTP status codes
In addition to the error code returned in the response body, this service uses
the HTTP status code to indicate certain error conditions. This lets you act on
these conditions from the HTTP status code, for example in your monitoring or an
internal proxy, without parsing the response body.
| HTTP status | Condition |
| ---------------------- | ---------------------------------------------------------------------------------------- |
| `200 OK` | The request was processed. This includes successful lookups and the `IP_NOT_FOUND` case. |
| `400 Bad Request` | The request was malformed. |
| `401 Unauthorized` | The license key is missing or invalid (`LICENSE_REQUIRED` or `INVALID_LICENSE_KEY`). |
| `402 Payment Required` | Your account has run out of queries. |
| `403 Forbidden` | Your account does not have permission to use this service (`PERMISSION_REQUIRED`). |
| `5xx` | A server error occurred. |
The error code returned in the response body does not always match the HTTP
status code. When your account has run out of queries, the response body returns
the `INVALID_LICENSE_KEY` error code even though the HTTP status is `402 Payment
Required`. The `IP_NOT_FOUND` case returns a `200 OK` status.
### Output
All services return data as a set of comma-separated fields. The ISP name,
Organization name, and AS number fields are quoted, since they may contain a
comma. The other fields are not escaped or quoted, but they will never contain a
comma.
All strings are returned in the
[ISO-8859-1 encoding](https://en.wikipedia.org/wiki/ISO/IEC_8859-1). This
encoding is also referred to as latin1.
|
Included in … |
| Name |
Type (length) |
Description |
Country? |
City? |
City/ISP/Org? |
Insights (formerly Omni)? |
| Accuracy radius |
integer |
The radius in kilometers around the specified location where the IP
address is likely to be.
|
|
|
|
YES |
| City name |
string |
The city or town name as defined by
GeoNames associated with the
IP address.
|
|
YES |
YES |
YES |
| Region code |
string |
The
ISO-3166-2
code for the state/region associated with the IP address.
We previously returned a
FIPS 10-4 code
for all countries other than the United States and Canada. See our
blog post detailing changes to our legacy web services.
|
|
YES |
YES |
YES |
| Region name |
string |
The region name as defined by
GeoNames associated with the
IP address.
|
|
|
|
YES |
| Postal code |
string |
The postal code associated with the IP address. These are available
for some IP addresses in Australia, Canada, France, Germany, Italy,
Spain, Switzerland, United Kingdom, and the US. We return the first 3
characters for Canadian postal codes. We return the first 2-4
characters (outward code) for postal codes in the United Kingdom.
|
|
|
YES |
YES |
| Metro code |
integer |
Deprecated. This is a no-longer-maintained code for
targeting advertisements in Google.
|
|
|
YES |
YES |
| Area code |
string |
Deprecated. This field will be empty in the updated legacy web
service. See our
blog post detailing changes to our legacy web services.
|
|
|
YES |
YES |
| Country code |
string (2) |
A
ISO 3166-1
country code for the country associated with the IP address. In
addition to the standard codes, we may also return one of the
following:
- A1 – an anonymous proxy.
- A2 – a satellite provider.
-
EU – an IP in a block used by multiple European
countries.
-
AP – an IP in a block used by multiple
Asia/Pacific region countries.
The US country code is returned for IP addresses
associated with overseas US military bases.
|
YES |
YES |
YES |
YES |
| Country name |
string |
The country name as defined by
GeoNames associated with the
IP address.
|
|
|
|
YES |
| Continent code |
string (2) |
A two-character code for the continent associated with the IP
address. The possible codes are:
- AF – Africa
- AN – Antarctica
- AS – Asia
- EU – Europe
- NA – North America
- OC – Oceania
- SA – South America
|
|
|
|
YES |
| Latitude |
decimal |
The approximate latitude of the location associated with the network.
This value is not precise and should not be used to identify a
particular address or household.
|
|
YES |
YES |
YES |
| Longitude |
decimal |
The approximate longitude of the location associated with the network.
Latitude and Longitude are often near the center of population. These
values are not precise and should not be used to identify a particular
address or household.
|
|
YES |
YES |
YES |
| Time zone |
string |
The time zone associated with the IP address, as specified by the
IANA time zone database,
e.g., America/New_York.
|
|
|
|
YES |
| AS number |
string |
The
autonomous system number
associated with the IP address.
|
|
|
|
YES |
| User type |
enum |
The user type associated with the IP address. This will be one of
the following values.
- business
- cafe
- cellular
- college
- contentDeliveryNetwork
- government
- hosting
- library
- military
- residential
- router
- school
- searchEngineSpider
- traveler
|
|
|
|
YES |
| Netspeed |
enum |
The network speed associated with the IP address. This can be one of
the following values:
- Dialup
- Cable/DSL
- Corporate
- Cellular
|
|
|
|
YES |
| Domain |
string |
The second level domain associated with the IP address. This will be
something like example.com or example.co.uk,
not foo.example.com.
|
|
|
|
YES |
| ISP name |
string |
The name of the ISP associated with the IP address. |
|
|
YES |
YES |
| Organization name |
string |
The name of the organization associated with the IP address. |
|
|
YES |
YES |
| City confidence factor |
string |
A value from 0-100 representing our confidence that the city is
correct.
|
|
|
|
YES |
| Region confidence factor |
string |
A value from 0-100 representing our confidence that the region is
correct.
|
|
|
|
YES |
| Postal confidence factor |
string |
A value from 0-100 representing our confidence that the postal code is
correct.
|
|
|
|
YES |
| Country confidence factor |
string |
A value from 0-100 representing our confidence that the country is
correct.
|
|
|
|
YES |
| Error code |
string |
If there was an error or warning with this request, this field
contains an error code string.
The possible error codes are:
-
PERMISSION_REQUIRED – This is returned if you do
not have permission to use the service. Please
contact our support team
for more information.
-
INVALID_LICENSE_KEY – This error will be returned
when the license key you pass is not a valid license key or when
your account has run out of queries.
-
LICENSE_REQUIRED – The Insight service returns
this instead of INVALID_LICENSE_KEY.
-
IP_NOT_FOUND – This error will be returned if the
IP address it not valid, if it is not public, or if it is not in
our GeoIP database. It will also be returned if you do not pass an
IP address at all.
|
YES |
YES |
YES |
YES |
### Output field order
Since all output is returned as a comma separated string, the order in which
fields are returned must be known in order to parse the result. If the request
is successful, the error field may be omitted entirely, since it always comes
last.
| Service |
Field Order |
| Country |
|
| City |
- Country code
- Region code
- City name
- Latitude
- Longitude
- Error
|
| City/ISP/Org |
- Country code
- Region code
- City name
- Postal code
- Latitude
- Longitude
- Metro code
- Area code
- ISP name
- Organization name
- Error
|
| Insights |
- Country code
- Country name
- Region code
- Region name
- City name
- Latitude
- Longitude
- Metro code
- Area code
- Time zone
- Continent code
- Postal code
- ISP name
- Organization name
- Domain
- AS number
- Netspeed
- User type
- Accuracy radius
- Country confidence factor
- City confidence factor
- Region confidence factor
- Postal confidence factor
- Error
|
### Client Code Examples
The examples below are all for the Insights or City/ISP/Org web services. Client
code for other services will be very similar. The only differences are the URI
path and the fields which are returned.
#### Perl
This is an example for the Insights web service.
```perl
#!/usr/bin/env perl
use strict;
use warnings;
use Encode qw( decode );
use Getopt::Long;
use LWP::UserAgent;
use Text::CSV_XS;
use URI;
use URI::QueryParam;
my @fields = qw(
country_code
country_name
region_code
region_name
city_name
latitude
longitude
metro_code
area_code
time_zone
continent_code
postal_code
isp_name
organization_name
domain
as_number
netspeed
user_type
accuracy_radius
country_confidence
city_confidence
region_confidence
postal_confidence
error
);
my $license_key = 'YOUR_LICENSE_KEY';
my $ip_address = '24.24.24.24';
GetOptions(
'license:s' => \$license_key,
'ip:s' => \$ip_address,
);
my $uri = URI->new('https://geoip.maxmind.com/v1.0/insights');
$uri->query_param( l => $license_key );
$uri->query_param( i => $ip_address );
my $ua = LWP::UserAgent->new( timeout => 5 );
my $response = $ua->get($uri);
die 'Request failed with status ' . $response->code()
unless $response->is_success();
my $csv = Text::CSV_XS->new( { binary => 1 } );
$csv->parse( decode( 'ISO-8859-1', $response->content() ) );
my %insights;
@insights{@fields} = $csv->fields();
binmode STDOUT, ':encoding(UTF-8)';
if ( defined $insights{error} && length $insights{error} ) {
die "MaxMind returned an error code for the request: $insights{error}\n";
}
else {
print "\nMaxMind Insights data for $ip_address\n\n";
for my $field (@fields) {
print sprintf( " %-20s %s\n", $field, $insights{$field} );
}
print "\n";
}
```
#### PHP
This is an example for the Insights web service.
```php
#!/usr/bin/env php
$query,
CURLOPT_USERAGENT => 'MaxMind PHP Sample',
CURLOPT_RETURNTRANSFER => true
)
);
$resp = curl_exec($curl);
if (curl_errno($curl)) {
throw new Exception(
'GeoIP request failed with a curl_errno of '
. curl_errno($curl)
);
}
$insights_values = str_getcsv($resp);
$insights_values = array_pad($insights_values, sizeof($insights_keys), '');
$insights = array_combine($insights_keys, $insights_values);
print_r($insights);
```
#### Python 2
This is an example for the Insights web service.
```python
#!/usr/bin/env python
import argparse
import csv
import requests
import sys
fields = ['country_code',
'country_name',
'region_code',
'region_name',
'city_name',
'latitude',
'longitude',
'metro_code',
'area_code',
'time_zone',
'continent_code',
'postal_code',
'isp_name',
'organization_name',
'domain',
'as_number',
'netspeed',
'user_type',
'accuracy_radius',
'country_confidence',
'city_confidence',
'region_confidence',
'postal_confidence',
'error']
parser = argparse.ArgumentParser(description='MaxMind Insights web service client')
parser.add_argument('--license', default='YOUR_LICENSE_KEY')
parser.add_argument('--ip', default='24.24.24.24')
args = parser.parse_args()
payload = {'l': args.license, 'i': args.ip};
response = requests.get('https://geoip.maxmind.com/v1.0/insights', params=payload)
if response.status_code != requests.codes.ok:
sys.stderr.write("Request failed with status %s\n" % response.status_code)
sys.exit(1)
reader = csv.reader([response.content])
insights = dict(zip(fields, [unicode(s, 'latin_1') for s in reader.next()]))
if len(insights['error']):
sys.stderr.write("MaxMind returned an error code for the request: %s\n" % insights['error'])
sys.exit(1)
else:
print "\nMaxMind Insights data for %s\n\n" % args.ip
for (key, val) in insights.items():
print " %-20s %s" % (key, val)
print "\n"
```
#### Python 3
This is an example for the Insights web service.
```python
#!/usr/bin/env python
import argparse
import csv
import requests
import sys
fields = ['country_code',
'country_name',
'region_code',
'region_name',
'city_name',
'latitude',
'longitude',
'metro_code',
'area_code',
'time_zone',
'continent_code',
'postal_code',
'isp_name',
'organization_name',
'domain',
'as_number',
'netspeed',
'user_type',
'accuracy_radius',
'country_confidence',
'city_confidence',
'region_confidence',
'postal_confidence',
'error']
parser = argparse.ArgumentParser(description='MaxMind Insights web service client')
parser.add_argument('--license', default='YOUR_LICENSE_KEY')
parser.add_argument('--ip', default='24.24.24.24')
args = parser.parse_args()
payload = {'l': args.license, 'i': args.ip};
response = requests.get('https://geoip.maxmind.com/v1.0/insights', params=payload)
if response.status_code != requests.codes.ok:
sys.stderr.write("Request failed with status %s\n" % response.status_code)
sys.exit(1)
reader = csv.reader([response.text])
insights = dict(zip(fields, next(reader)))
if len(insights['error']):
sys.stderr.write("MaxMind returned an error code for the request: %s\n" % insights['error'])
sys.exit(1)
else:
print("\nMaxMind Insights data for %s\n\n" % args.ip)
for (key, val) in insights.items():
print(" %-20s %s" % (key, val))
print("\n")
```
#### Ruby 1.9
This is an example for the Insights web service.
```ruby
#!/usr/bin/env ruby
require 'csv'
require 'net/http'
require 'open-uri'
require 'optparse'
require 'uri'
fields = [:country_code,
:country_name,
:region_code,
:region_name,
:city_name,
:latitude,
:longitude,
:metro_code,
:area_code,
:time_zone,
:continent_code,
:postal_code,
:isp_name,
:organization_name,
:domain,
:as_number,
:netspeed,
:user_type,
:accuracy_radius,
:country_confidence,
:city_confidence,
:region_confidence,
:postal_confidence,
:error]
options = { :license => "YOUR_LICENSE_KEY", :ip => "24.24.24.24" }
OptionParser.new { |opts|
opts.banner = "Usage: insights-geoip-ws.rb [options]"
opts.on("-l", "--license LICENSE", "MaxMind license key") do |l|
options[:license] = l
end
opts.on("-i", "--ip IPADDRESS", "IP address to look up") do |i|
options[:ip] = i
end
}.parse!
uri = URI::HTTP.build(:scheme => 'https',
:host => 'geoip.maxmind.com',
:path => '/v1.0/insights',
:query => URI.encode_www_form(:l => options[:license],
:i => options[:ip]))
response = Net::HTTP.get_response(uri)
unless response.is_a?(Net::HTTPSuccess)
abort "Request failed with status #{response.code}"
end
insights = Hash[fields.zip(response.body.encode('utf-8', 'iso-8859-1').parse_csv)]
if insights[:error]
abort "MaxMind returned an error code for the request: #{insights[:error]}"
else
puts
puts "MaxMind Insights data for #{options[:ip]}";
puts
insights.each { |key, val| printf " %-20s %s\n", key, val }
puts
end
```
#### Java
This is an example for the Insights web service.
```java
import java.net.MalformedURLException;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
public class InsightsReader {
public static void main(String[] args) throws Exception {
String license_key = "YOUR_LICENSE_KEY";
String ip_address = "24.24.24.24";
String url_str = "https://geoip.maxmind.com/v1.0/insights?l=" + license_key + "&i=" + ip_address;
URL url = new URL(url_str);
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String inLine;
while ((inLine = in.readLine()) != null) {
// Alternatively use a CSV parser here.
Pattern p = Pattern.compile("\"([^\"]*)\"|(?<=,|^)([^,]*)(?:,|$)");
Matcher m = p.matcher(inLine);
List fields = new ArrayList();
String f;
while (m.find()) {
f = m.group(1);
if (f!=null) {
fields.add(f);
}
else {
fields.add(m.group(2));
}
}
String countrycode = fields.get(0);
String countryname = fields.get(1);
String regioncode = fields.get(2);
String regionname = fields.get(3);
String city = fields.get(4);
String lat = fields.get(5);
String lon = fields.get(6);
String metrocode = fields.get(7);
String areacode = fields.get(8);
String timezone = fields.get(9);
String continent = fields.get(10);
String postalcode = fields.get(11);
String isp = fields.get(12);
String org = fields.get(13);
String domain = fields.get(14);
String asnum = fields.get(15);
String netspeed = fields.get(16);
String usertype = fields.get(17);
String accuracyradius = fields.get(18);
String countryconf = fields.get(19);
String cityconf = fields.get(20);
String regionconf = fields.get(21);
String postalconf = fields.get(22);
String error = fields.get(23);
}
in.close();
}
}
```
#### C#
This is an example for the Insights web service.
```csharp
// Contributed by Gokhan Saltik
private string GetMaxMindInsightsData(string IP) {
System.Uri objUrl = new System.Uri("https://geoip.maxmind.com/v1.0/insights?l=YOUR_LICENSE_KEY&i=" + IP);
System.Net.WebRequest objWebReq;
System.Net.WebResponse objResp;
System.IO.StreamReader sReader;
string strReturn = string.Empty;
try
{
objWebReq = System.Net.WebRequest.Create(objUrl);
objResp = objWebReq.GetResponse();
sReader = new System.IO.StreamReader(objResp.GetResponseStream());
strReturn = sReader.ReadToEnd();
sReader.Close();
objResp.Close();
}
catch (Exception ex)
{
}
finally
{
objWebReq = null;
}
return strReturn;
}
```
#### VB.Net
This is an example for the City/ISP/Org web service.
```vbnet
' Contributed by Rubens A. Lucca
Private Function ReturnData(ByVal IP As String) As String
Dim objUrl As New System.Uri("https://geoip.maxmind.com/v1.0/city-isp-org?l=YOUR_LICENSE_KEY&i=" & IP)
Dim objWebReq As System.Net.WebRequest
Dim objResp As System.Net.WebResponse
Dim sReader As System.IO.StreamReader
Dim strReturn As String
'Try to connect to the server and retrieve data.
Try
objWebReq = System.Net.WebRequest.Create(objUrl)
objResp = objWebReq.GetResponse
'Get the data and store in a return string.
sReader = New System.IO.StreamReader(objResp.GetResponseStream)
strReturn = sReader.ReadToEnd
'Close the objects.
sReader.Close()
objResp.Close()
Catch ex As Exception
Finally
objWebReq = Nothing
End Try
Return strReturn
End Function
```
#### Cold Fusion
This is an example for the City/ISP/Org web service.
```xml
#qMaxMindByID[3]#
#qMaxMindByName['city']#
```
#### ASP
This is an example for the City/ISP/Org web service.
```vbnet
Dim objHttp, strQuery
strQuery = "https://geoip.maxmind.com/v1.0/city-isp-org?l=" & license_key & "&i=" & ipaddress
set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objHttp.open "GET", strQuery, false
objHttp.send
Response.Write objHttp.ResponseText
Set objHttp = Nothing
```
#### VBScript
This is an example for the City/ISP/Org web service.
```basic
Set request = Server.CreateObject("AspHTTP.Conn")
request.Url = "https://geoip.maxmind.com/v1.0/city-isp-org?l=" & license_key & "&i=" & ip_address
request.RequestMethod = "GET"
string = request.GetURL
data = Split(string, ",")
country = arr(0)
region = arr(1)
city = arr(2)
postal = arr(3)
latitude = arr(4)
longitude = arr(5)
metro_code = arr(6)
area_code = arr(7)
isp = arr(8)
organization = arr(9)
error = arr(10)
```
# GeoIP and GeoLite API Requests
Source: https://dev.maxmind.com/geoip/docs/web-services/requests/
## Authorization and Security
The HTTP `Authorization` header is required for authorization. The username is
your
[MaxMind account ID](https://www.maxmind.com/en/accounts/current/license-key).
The password is your
[MaxMind license key](https://www.maxmind.com/en/accounts/current/license-key).
> **⚠️ Warning**
>
> You must be approved for a
> [GeoIP web service trial](https://www.maxmind.com/en/create-account?service_geoip=1),
> [purchase service credit](https://www.maxmind.com/en/geoip-api-web-services) for
> use with our web services, or have a
> [GeoLite account](https://www.maxmind.com/en/create-account), in order to
> receive an account ID and license key.
We use
[basic HTTP authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).
The APIs which require authentication are only available via HTTPS. Always use
HTTPS, so that your credentials are never transmitted unencrypted. If you
attempt to access this service via HTTP, you will receive a `403 Forbidden` HTTP
response.
We require TLS 1.2 or greater for all requests to our servers to keep your data
secure.
## Service Endpoints
The endpoint for each service is as specified below. Each endpoint expects an IP
address to be defined as a path parameter (`{ip_address}`).
The IP address can be either an IPv4 or an IPv6 address. IPv4 addresses should
be passed in the standard dotted quad form, for example `1.2.3.4`. IPv6
addresses should be passed as strings as well. We recommend using the canonical
form as described in [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952),
for example `2001:db8::1:0:0:1`, but we will handle any valid IPv6 string
representation. We do not accept an IPv6 address with a zone ID, for example
`fe80::1%eth0`. If you send one, percent-encoded in the URL path as
`fe80::1%25eth0`, we return `IP_ADDRESS_INVALID`.
You can also use the string `me` as the IP address. In this case, the record for
the IP address you are querying from will be returned. This is useful when your
application does not have easy access to its public IP address, e.g., when the
system making the query is behind a NAT.
### GeoIP Endpoints
| Service | HTTP Method | Endpoint |
| --------- | ----------- | ------------------------------------------------------------ |
| Country | `GET` | `https://geoip.maxmind.com/geoip/v2.1/country/{ip_address}` |
| City Plus | `GET` | `https://geoip.maxmind.com/geoip/v2.1/city/{ip_address}` |
| Insights | `GET` | `https://geoip.maxmind.com/geoip/v2.1/insights/{ip_address}` |
The `geoip.maxmind.com` hostname automatically picks the data center
geographically closest to you.
### GeoLite Endpoints
| Service | HTTP Method | Endpoint |
| ------- | ----------- | ------------------------------------------------------ |
| Country | `GET` | `https://geolite.info/geoip/v2.1/country/{ip_address}` |
| City | `GET` | `https://geolite.info/geoip/v2.1/city/{ip_address}` |
The `geolite.info` hostname automatically picks the data center geographically
closest to you.
## Headers
The `Authorization` header is always required. See
[Authorization and Security](/geoip/docs/web-services/requests/index.md#authorization-and-security) for more details.
The `Accept` and `Accept-Charset` headers are optional. The service ignores them
and always returns JSON encoded as UTF-8.
## Troubleshooting IP Lookups
[Learn about common troubleshooting steps to make sure that you're querying the correct IP addresses, and making efficient use of your queries, on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/optimize-your-maxmind-web-service-integration)
# GeoIP and GeoLite API Responses
Source: https://dev.maxmind.com/geoip/docs/web-services/responses/
## Headers
The `Content-Type` for a successful response varies based on the service as
outlined below:
| Service | Content-Type |
| --------------- | ----------------------------------------------------------------------- |
| GeoIP Country | `application/vnd.maxmind.com-country+json; charset=UTF-8; version=2.1` |
| GeoIP City Plus | `application/vnd.maxmind.com-city+json; charset=UTF-8; version=2.1` |
| GeoIP Insights | `application/vnd.maxmind.com-insights+json; charset=UTF-8; version=2.1` |
| GeoLite Country | `application/vnd.maxmind.com-country+json; charset=UTF-8; version=2.1` |
| GeoLite City | `application/vnd.maxmind.com-city+json; charset=UTF-8; version=2.1` |
Errors may be returned with the `Content-Type` set to
`application/vnd.maxmind.com-error+json; charset=UTF-8; version=2.1`. If this is
the case, then the body of the response contains a JSON document with two keys,
`code` and `error`. See the [Errors](/geoip/docs/web-services/responses/index.md#errors) section for more details.
The response will always include a `Content-Length` header as well.
## Errors
When the server returns an error (`4xx` or `5xx`), the response may include a
JSON document in the body. This document is a single object with the keys `code`
and `error`. The `code` field is a static error code for machine use. The value
of any given code will never change, though codes can be added or removed. The
`error` field is a human-readable description of the error and may change at any
time.
Not all errors include a JSON body. Some `4xx` errors, such as a `403` for a
plain HTTP request, and many `5xx` errors, which typically happen outside of our
web service request handling code, do not include one. You
should check the `Content-Type` header of an error response before attempting
to decode the body as JSON.
In addition to the errors documented below, client code should also be prepared
to handle any valid HTTP `4xx` or `5xx` status code.
| Code | HTTP Status | Description |
| --- | --- | --- |
| `IP_ADDRESS_INVALID` | 400 Bad Request | You have not supplied a valid IPv4 or IPv6 address. |
| `IP_ADDRESS_REQUIRED` | 400 Bad Request | You have not supplied an IP address, which is a required field. |
| `IP_ADDRESS_RESERVED` | 400 Bad Request | You have supplied an IP address which belongs to a reserved or private range. |
| `SERVICE_INVALID` | 400 Bad Request | The requested service is not available on this host. Only Country and City are available on `geolite.info`. |
| `AUTHORIZATION_INVALID` | 401 Unauthorized | You have supplied an invalid [MaxMind account ID and/or license key](https://www.maxmind.com/en/accounts/current/license-key) in the [Authorization](/geoip/docs/web-services/requests/index.md#authorization-and-security) header. |
| `LICENSE_KEY_REQUIRED` | 401 Unauthorized | You have not supplied a [MaxMind license key](https://www.maxmind.com/en/accounts/current/license-key) in the [Authorization](/geoip/docs/web-services/requests/index.md#authorization-and-security) header. |
| `ACCOUNT_ID_REQUIRED` | 401 Unauthorized | You have not supplied a [MaxMind account ID](https://support.maxmind.com/knowledge-base/articles/find-your-maxmind-account-id) in the [Authorization](/geoip/docs/web-services/requests/index.md#authorization-and-security) header. |
| `INSUFFICIENT_FUNDS` | 402 Payment Required | The license key you have provided does not have sufficient funds to use this service. Please [purchase more service credits](https://www.maxmind.com/en/geoip-api-web-services). |
| `PERMISSION_REQUIRED` | 403 Forbidden | You do not have permission to use the service. Please [contact our support team](https://support.maxmind.com/knowledge-base) for more information. |
| `IP_ADDRESS_NOT_FOUND` | 404 Not Found | The supplied IP address is not in the database. |
| (none) | 429 Too Many Requests | Your request has been denied due to rate-limiting imposed by MaxMind. This is likely due to excessive previous requests resulting in error responses. |
| `SERVER_ERROR` | 500 Internal Server Error | There was an error when processing this request. |
| (none) | 503 Service Unavailable | There is a problem with the web service server. You can try this request again later. |
For GeoLite Country and GeoLite City, `INSUFFICIENT_FUNDS` (HTTP 402) means
that the account has reached its daily query limit.
### Rate-limiting
If customer requests result in excessive errors, MaxMind may impose rate limits
for a period of time.
## Response
All services return data as a JSON document. The document that is returned
always consists of an object (aka map or hash). Each key in the object in turn
maps to an object or an array of objects.
```json
{
"anonymizer": { ... },
"city": { ... },
"continent": { ... },
"country": { ... },
"location": { ... },
"postal": { ... },
"registered_country": { ... },
"represented_country": { ... },
"subdivisions": [{ ... }, ... ],
"traits": { ... },
"maxmind": { ... }
}
```
The exact set of top-level keys varies based on the particular GeoIP web service
you are using. If a key maps to an undefined or empty value, it is not included
in the JSON object. This applies both to top-level keys and the objects they map
to.
Successful GeoIP and GeoLite responses always include the `traits` object with
`ip_address` and `network`. Other fields may be omitted as described above.
The data returned in the document will be in UTF-8 encoding.
The examples show available fields using illustrative values. They do not
describe a single real lookup.
For full examples of response bodies, select one of the following:
- [GeoIP Country Body Example](/geoip/docs/web-services/responses/index.md#geoip-country-body-example)
- [GeoIP City Plus Body Example](/geoip/docs/web-services/responses/index.md#geoip-city-plus-body-example)
- [GeoIP Insights Body Example](/geoip/docs/web-services/responses/index.md#geoip-insights-body-example)
### Anonymizer
`anonymizer` is a JSON object that indicates whether the IP address is part of
an anonymizing service or network. This data is available for GeoIP Insights
only.
The `residential` sub-object may be present even when none of the other
`anonymizer` fields are populated.
```json
{
"confidence": 99,
"is_anonymous": true,
"is_anonymous_vpn": true,
"is_hosting_provider": true,
"is_public_proxy": true,
"is_residential_proxy": true,
"is_tor_exit_node": true,
"network_last_seen": "2025-01-15",
"provider_name": "nordvpn",
"residential": {
"confidence": 82,
"network_last_seen": "2026-05-11",
"provider_name": "quickshift"
}
}
```
#### `anonymizer.confidence`
Type: integer (min: 1, max: 99). Available in: GeoIP Insights.
A score ranging from 1 to 99 that represents our percent confidence that the network is currently part of an actively used VPN service.
Currently, we will only provide values of 30 and 99, but the number of values will increase as we improve our confidence ratings.
[Learn more about anonymizer confidence on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind)
#### `anonymizer.is_anonymous`
Type: boolean. Available in: GeoIP Insights.
This is `true` if the IP address belongs to any sort of anonymous network. Otherwise, the key is not included in the `anonymizer` object.
**Note:** This field has been moved from the `traits` object to the `anonymizer` object. It is still returned in the `traits` object for backwards compatibility but is deprecated there.
[Learn more about anonymizer and proxy detection on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#anon-detection)
#### `anonymizer.is_anonymous_vpn`
Type: boolean. Available in: GeoIP Insights.
This is `true` if the IP address is registered to an anonymous VPN provider. Otherwise, the key is not included in the `anonymizer` object.
If a VPN provider does not register subnets under names associated with them, we will likely only flag their IP ranges using the `is_hosting_provider` flag.
**Note:** This field has been moved from the `traits` object to the `anonymizer` object. It is still returned in the `traits` object for backwards compatibility but is deprecated there.
[Learn more about VPNs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#VPN)
#### `anonymizer.is_hosting_provider`
Type: boolean. Available in: GeoIP Insights.
This is `true` if the IP address belongs to a hosting provider. Otherwise, the key is not included in the `anonymizer` object.
**Note:** This field has been moved from the `traits` object to the `anonymizer` object. It is still returned in the `traits` object for backwards compatibility but is deprecated there.
[Learn more about hosting providers used for anonymizing on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#hosting-provider)
#### `anonymizer.is_public_proxy`
Type: boolean. Available in: GeoIP Insights.
This is `true` if the IP address belongs to a public proxy. Otherwise, the key is not included in the `anonymizer` object.
**Note:** This field has been moved from the `traits` object to the `anonymizer` object. It is still returned in the `traits` object for backwards compatibility but is deprecated there.
[Learn more about public proxies on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#public-proxies)
#### `anonymizer.is_residential_proxy`
Type: boolean. Available in: GeoIP Insights.
This is `true` if the IP address is on a suspected anonymizing network and belongs to a residential ISP. Otherwise, the key is not included in the `anonymizer` object.
**Note:** This field has been moved from the `traits` object to the `anonymizer` object. It is still returned in the `traits` object for backwards compatibility but is deprecated there.
[Learn more about residential proxies on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#residential-proxies)
#### `anonymizer.is_tor_exit_node`
Type: boolean. Available in: GeoIP Insights.
This is `true` if the IP address is a Tor exit node. Otherwise, the key is not included in the `anonymizer` object.
**Note:** This field has been moved from the `traits` object to the `anonymizer` object. It is still returned in the `traits` object for backwards compatibility but is deprecated there.
[Learn more about Tor exit nodes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#tor-exit-nodes)
#### `anonymizer.network_last_seen`
Type: string. Available in: GeoIP Insights.
The last day that the network was sighted in our analysis of anonymized networks. This is in the ISO 8601 date format (YYYY-MM-DD).
[Learn more about anonymizer and proxy detection on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind)
#### `anonymizer.provider_name`
Type: string. Available in: GeoIP Insights.
The name of the VPN provider (e.g., `nordvpn`, `surfshark`) associated with the network.
Please note that MaxMind identifies a subset of VPN providers. A current list of VPN providers identified in the Anonymous Plus database is available on request.
[Learn more about VPN provider detection on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind)
#### `anonymizer.residential`
Type: object. Available in: GeoIP Insights.
This object contains data about the residential proxy network associated
with the IP address.
See the [Anonymizer > Residential](/geoip/docs/web-services/responses/index.md#schema--response--anonymizer--residential)
section below for details.
### Anonymizer > Residential
`residential` is a JSON object that contains data about the residential proxy
network associated with the IP address. This data is available for GeoIP
Insights only.
The `residential` object may be present even when none of the other
`anonymizer` fields are populated.
```json
{
"confidence": 82,
"network_last_seen": "2026-05-11",
"provider_name": "quickshift"
}
```
#### `anonymizer.residential.confidence`
Type: integer (min: 1, max: 99). Available in: GeoIP Insights.
A score ranging from 1 to 99 that represents our percent confidence that the network is an actively used residential proxy.
[Learn more about anonymizer confidence on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind)
#### `anonymizer.residential.network_last_seen`
Type: string. Available in: GeoIP Insights.
The last day that the network was sighted in our analysis of residential proxies. This is in the ISO 8601 date format (YYYY-MM-DD).
[Learn more about anonymizer and proxy detection on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind)
#### `anonymizer.residential.provider_name`
Type: string. Available in: GeoIP Insights.
The name of the residential proxy provider (e.g., `oxylabs`, `smartproxy`) associated with the network.
Please note that MaxMind identifies a subset of residential proxy providers. A current list of identified providers is available on request.
[Learn more about residential proxy provider detection on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind)
### City
`city` is a JSON object that contains details about the city associated with the
IP address.
```json
{
"confidence": 25,
"geoname_id": 54321,
"names": {
"de": "Los Angeles",
"en": "Los Angeles",
"es": "Los Ángeles",
"fr": "Los Angeles",
"ja": "ロサンゼルス市",
"pt-BR": "Los Angeles",
"ru": "Лос-Анджелес",
"zh-CN": "洛杉矶"
}
}
```
#### `city.confidence`
Type: integer (min: 0, max: 100). Available in: GeoIP Insights.
A value from 0-100 representing our confidence that the city is correct.
[Learn more about confidence factors on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#confidence-factors)
#### `city.geoname_id`
Type: integer. Available in: GeoIP City Plus, GeoIP Insights.
A unique identifier for the city as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids)
#### `city.names`
Type: object. Available in: GeoIP City Plus, GeoIP Insights.
A map from locale codes, such as `en`, to the localized names for the feature.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names)
### Continent
`continent` is a JSON object that contains information about the continent
associated with the IP address.
```json
{
"code": "NA",
"geoname_id": 123456,
"names": {
"de": "Nordamerika",
"en": "North America",
"es": "América del Norte",
"fr": "Amérique du Nord",
"ja": "北アメリカ",
"pt-BR": "América do Norte",
"ru": "Северная Америка",
"zh-CN": "北美洲"
}
}
```
#### `continent.code`
Type: string. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
A two-character code for the continent associated with the IP address. The possible codes are:
* `AF` – Africa
* `AN` – Antarctica
* `AS` – Asia
* `EU` – Europe
* `NA` – North America
* `OC` – Oceania
* `SA` – South America
[Learn more about continent codes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#codes)
#### `continent.geoname_id`
Type: integer. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
A unique identifier for the continent as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids)
#### `continent.names`
Type: object. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
A map from locale codes, such as `en`, to the localized names for the feature.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names)
### Country
`country` is a JSON object that contains details about the country where MaxMind
believes the end user is located.
```json
{
"confidence": 75,
"geoname_id": 6252001,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
}
}
```
#### `country.confidence`
Type: integer (min: 0, max: 100). Available in: GeoIP Insights.
A value from 0-100 representing our confidence that the country is correct.
[Learn more about confidence factors on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#confidence-factors)
#### `country.geoname_id`
Type: integer. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
A unique identifier for the country as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids)
#### `country.is_in_european_union`
Type: boolean. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
This is `true` if the country is a member state of the European Union. Otherwise, the key is not included in the `country` object.
[Learn more about the European Union flag on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#eu-flag)
#### `country.iso_code`
Type: string. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with the IP address.
[Learn more about country codes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#codes)
#### `country.names`
Type: object. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
A map from locale codes, such as `en`, to the localized names for the feature.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names)
### Location
`location` is a JSON object that contains specific details about the location
associated with the IP address.
```json
{
"accuracy_radius": 20,
"average_income": 128321,
"latitude": 37.6293,
"longitude": -122.1163,
"metro_code": 807,
"population_density": 1234,
"time_zone": "America/Los_Angeles"
}
```
#### `location.accuracy_radius`
Type: integer. Available in: GeoIP City Plus, GeoIP Insights.
The approximate accuracy radius, in kilometers, around the latitude and longitude for the geographical entity (country, subdivision, city or postal code) associated with the IP address. We have a 67% confidence that the location of the end-user falls within the area defined by the accuracy radius and the latitude and longitude coordinates.
[Learn about the geolocation area defined by latitude, longitude, and accuracy radius, on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area)
#### `location.average_income`
Type: integer. Available in: GeoIP Insights.
The average annual income associated with the IP address in US dollars. This is only available for IP addresses in the US.
[Learn more about average income data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#income-pop-density)
#### `location.latitude`
Type: decimal. Available in: GeoIP City Plus, GeoIP Insights.
The approximate [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System) latitude of the postal code, city, subdivision or country associated with the IP address.
**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.**
[Learn about the geolocation area defined by latitude, longitude, and accuracy radius, on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area)
#### `location.longitude`
Type: decimal. Available in: GeoIP City Plus, GeoIP Insights.
The approximate [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System) longitude of the postal code, city, subdivision or country associated with the IP address.
**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.**
[Learn about the geolocation area defined by latitude, longitude, and accuracy radius, on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area)
#### `location.metro_code`
Type: integer. Available in: GeoIP City Plus, GeoIP Insights.
**Deprecated**. This is a no-longer-maintained code for targeting advertisements in Google.
#### `location.population_density`
Type: integer. Available in: GeoIP Insights.
The estimated number of people per square kilometer. This is only available for IP addresses in the US.
[Learn more about population density data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#income-pop-density)
#### `location.time_zone`
Type: string. Available in: GeoIP City Plus, GeoIP Insights.
The time zone associated with the location, as specified by the [IANA Time Zone Database](https://www.iana.org/time-zones), e.g., `America/New_York`.
[Learn more about time zone data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#time-zone)
### Postal
`postal` is a JSON object that contains details about the postal code associated
with the IP address.
```json
{
"code": "90001",
"confidence": 10
}
```
#### `postal.code`
Type: string. Available in: GeoIP City Plus, GeoIP Insights.
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:
* United States: 5
* Canada: 3
* United Kingdom: 2-4
* Brazil: 5
* Ireland: 3
* Japan: 7 (accurate for the first 6 digits. The last digit defaults to 1)
* Netherlands: 4
* Portugal: 7 (accurate for the first 4 digits. The last 3 often default to `-001`)
* Singapore: 2
[Learn more about postal code data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#codes)
#### `postal.confidence`
Type: integer (min: 0, max: 100). Available in: GeoIP Insights.
A value from 0-100 representing our confidence that the postal code is correct.
[Learn more about confidence factors on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#confidence-factors)
### Registered Country
`registered_country` is a JSON object that contains details about the country in
which the ISP has registered the IP address.
[Learn about registered countries on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/country-level-and-city-level-geolocation-maxmind)
```json
{
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
}
}
```
#### `registered_country.geoname_id`
Type: integer. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
A unique identifier for the country as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids)
#### `registered_country.is_in_european_union`
Type: boolean. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
This is `true` if the country is a member state of the European Union. Otherwise, the key is not included in the `registered_country` object.
[Learn more about the European Union flag on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#eu-flag)
#### `registered_country.iso_code`
Type: string. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with the IP address.
[Learn more about country codes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#codes)
#### `registered_country.names`
Type: object. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
A map from locale codes, such as `en`, to the localized names for the feature.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names)
### Represented Country
`represented_country` is a JSON object that contains details about the country
which is represented by users of the IP address. For instance, the country
represented by an overseas military base.
[Learn about represented countries on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/country-level-and-city-level-geolocation-maxmind)
```json
{
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
},
"type": "military"
}
```
#### `represented_country.geoname_id`
Type: integer. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
A unique identifier for the country as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids)
#### `represented_country.is_in_european_union`
Type: boolean. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
This is `true` if the country is a member state of the European Union. Otherwise, the key is not included in the `represented_country` object.
[Learn more about the European Union flag on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#eu-flag)
#### `represented_country.iso_code`
Type: string. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with the IP address.
[Learn more about country codes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#codes)
#### `represented_country.names`
Type: object. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
A map from locale codes, such as `en`, to the localized names for the feature.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names)
#### `represented_country.type`
Type: string. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
The type of represented country. Currently limited to `military`, but may include other types in the future.
[Learn more about represented countries on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/country-level-and-city-level-geolocation-maxmind)
### Subdivisions
`subdivisions` is an array of JSON objects. Each of these objects contains
details about a subdivision of the country in which the IP address resides.
Subdivisions are arranged from largest to smallest.
```json
[
{
"confidence": 50,
"geoname_id": 5332921,
"iso_code": "CA",
"names": {
"de": "Kalifornien",
"en": "California",
"es": "California",
"fr": "Californie",
"ja": "カリフォルニア",
"ru": "Калифорния",
"zh-CN": "加州"
}
}
]
```
#### `subdivisions.confidence`
Type: integer (min: 0, max: 100). Available in: GeoIP Insights.
A value from 0-100 representing our confidence that the region is correct.
[Learn more about confidence factors on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#confidence-factors)
#### `subdivisions.geoname_id`
Type: integer. Available in: GeoIP City Plus, GeoIP Insights.
A unique identifier for the region as specified by [GeoNames](https://www.geonames.org/).
[Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids)
#### `subdivisions.iso_code`
Type: string. Available in: GeoIP City Plus, GeoIP Insights.
A string of up to three characters containing the region-portion of the [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) code for the region associated with the IP address.
[Learn more about ISO code data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#codes)
#### `subdivisions.names`
Type: object. Available in: GeoIP City Plus, GeoIP Insights.
A map from locale codes, such as `en`, to the localized names for the feature.
[Learn more about localized geolocation names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names)
### Traits
`traits` is a JSON object that contains general traits associated with the IP
address.
```json
{
"autonomous_system_number": 1239,
"autonomous_system_organization": "Linkem IR WiMax Network",
"connection_type": "Cable/DSL",
"domain": "example.com",
"ip_address": "1.2.3.4",
"ip_risk_snapshot": 45.5,
"is_anonymous": true,
"is_anonymous_vpn": true,
"is_anycast": true,
"is_hosting_provider": true,
"is_public_proxy": true,
"is_residential_proxy": true,
"is_tor_exit_node": true,
"isp": "Linkem spa",
"mobile_country_code": "310",
"mobile_network_code": "004",
"organization": "Linkem IR WiMax Network",
"network": "1.2.3.0/24",
"static_ip_score": 1.5,
"user_count": 1,
"user_type": "traveler"
}
```
#### `traits.autonomous_system_number`
Type: integer. Available in: GeoIP City Plus, GeoIP Insights.
The [autonomous system number](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) associated with the IP address.
[Learn more about autonomous system data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#autonomous-system-data)
#### `traits.autonomous_system_organization`
Type: string. Available in: GeoIP City Plus, GeoIP Insights.
The organization associated with the registered [autonomous system number](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) for the IP address.
[Learn more about autonomous system data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#autonomous-system-data)
#### `traits.connection_type`
Type: string. Available in: GeoIP City Plus, GeoIP Insights.
One of the following values: `Cable/DSL`, `Cellular`, `Corporate`, or `Satellite`. Additional values may be added in the future.
**This field is not present in the GeoLite City web service.**
[Learn more about connection type data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#connection-type-data)
#### `traits.domain`
Type: string. Available in: GeoIP City Plus, GeoIP Insights.
The second-level domain associated with the IP address. This will be something like “example.com” or “example.co.uk”, not “foo.example.com”.
**This field is not present in the GeoLite City web service.**
[Learn more about domain name data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#domain-name-data)
#### `traits.ip_address`
Type: string. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
The requested IP address.
#### `traits.ip_risk_snapshot`
Type: decimal (min: 0.01, max: 99). Available in: GeoIP Insights.
This field contains the risk associated with the IP address. The value ranges from 0.01 to 99. A higher score indicates a higher risk.
Please note that the IP risk score provided in GeoIP products and services is more static than the IP risk score provided in minFraud and is not responsive to traffic on your network. If you need real-time IP risk scoring based on behavioral signals on your own network, please use minFraud.
We do not provide an IP risk snapshot for low-risk networks. If this field is not populated, we either do not have signals for the network or the signals we have show that the network is low-risk. If you would like to get signals for low-risk networks, please use the minFraud web services.
#### `traits.is_anonymous`
Type: boolean. Available in: GeoIP Insights.
**Deprecated.** This field has been moved to the [`anonymizer`](/geoip/docs/web-services/responses/index.md#anonymizer) object. It is still returned here for backwards compatibility.
This is `true` if the IP address belongs to any sort of anonymous network. Otherwise, the key is not included in the `traits` object.
[Learn more about anonymizer and proxy detection on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#anon-detection)
#### `traits.is_anonymous_vpn`
Type: boolean. Available in: GeoIP Insights.
**Deprecated.** This field has been moved to the [`anonymizer`](/geoip/docs/web-services/responses/index.md#anonymizer) object. It is still returned here for backwards compatibility.
This is `true` if the IP address is registered to an anonymous VPN provider. Otherwise, the key is not included in the `traits` object.
If a VPN provider does not register subnets under names associated with them, we will likely only flag their IP ranges using the `is_hosting_provider` flag.
[Learn more about VPNs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#VPN)
#### `traits.is_anycast`
Type: boolean. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
This is `true` if the IP address belongs to an [anycast network](https://en.wikipedia.org/wiki/Anycast).
#### `traits.is_hosting_provider`
Type: boolean. Available in: GeoIP Insights.
**Deprecated.** This field has been moved to the [`anonymizer`](/geoip/docs/web-services/responses/index.md#anonymizer) object. It is still returned here for backwards compatibility.
This is `true` if the IP address belongs to a hosting provider. Otherwise, the key is not included in the `traits` object.
[Learn more about hosting providers used for anonymizing on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#hosting-provider)
#### `traits.is_public_proxy`
Type: boolean. Available in: GeoIP Insights.
**Deprecated.** This field has been moved to the [`anonymizer`](/geoip/docs/web-services/responses/index.md#anonymizer) object. It is still returned here for backwards compatibility.
This is `true` if the IP address belongs to a public proxy. Otherwise, the key is not included in the `traits` object.
[Learn more about public proxies on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#public-proxies)
#### `traits.is_residential_proxy`
Type: boolean. Available in: GeoIP Insights.
**Deprecated.** This field has been moved to the [`anonymizer`](/geoip/docs/web-services/responses/index.md#anonymizer) object. It is still returned here for backwards compatibility.
This is `true` if the IP address is on a suspected anonymizing network and belongs to a residential ISP. Otherwise, the key is not included in the `traits` object.
[Learn more about residential proxies on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#residential-proxies)
#### `traits.is_tor_exit_node`
Type: boolean. Available in: GeoIP Insights.
**Deprecated.** This field has been moved to the [`anonymizer`](/geoip/docs/web-services/responses/index.md#anonymizer) object. It is still returned here for backwards compatibility.
This is `true` if the IP address is a Tor exit node. Otherwise, the key is not included in the `traits` object.
[Learn more about Tor exit nodes on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/anonymizer-and-proxy-data-maxmind#tor-exit-nodes)
#### `traits.isp`
Type: string. Available in: GeoIP City Plus, GeoIP Insights.
The name of the ISP associated with the IP address.
**This field is not present in the GeoLite City web service.**
[Learn more about ISP data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#isp-org-data)
#### `traits.mobile_country_code`
Type: string. Available in: GeoIP City Plus, GeoIP Insights.
The [mobile country code (MCC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with the IP address and ISP.
**This field is not present in the GeoLite City web service.**
[Learn more about mobile country code data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#mobile-codes)
#### `traits.mobile_network_code`
Type: string. Available in: GeoIP City Plus, GeoIP Insights.
The [mobile network code (MNC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with the IP address and ISP.
**This field is not present in the GeoLite City web service.**
[Learn more about mobile network code data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#mobile-codes)
#### `traits.network`
Type: string. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
The network in [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation) associated with the record. In particular, this is the largest network where all of the fields besides `ip_address` have the same value.
#### `traits.organization`
Type: string. Available in: GeoIP City Plus, GeoIP Insights.
The name of the organization associated with the IP address.
**This field is not present in the GeoLite City web service.**
[Learn more about organization data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#isp-org-data)
#### `traits.static_ip_score`
Type: decimal (min: 0, max: 99.99). Available in: GeoIP Insights.
An indicator of how static or dynamic an IP address is. The value ranges from 0 to 99.99 with higher values meaning a greater static association. For example, many IP addresses with a `user_type` of `cellular` have a score under one. Broadband IPs that don’t change very often typically have a score above thirty.
This indicator can be useful for deciding whether an IP address represents the same user over time.
[Learn more about the static IP score on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#static-ip-scoring)
#### `traits.user_count`
Type: integer. Available in: GeoIP Insights.
The estimated number of users sharing the IP/network during the past 24 hours. For IPv4, the count is for the individual IP. For IPv6, the count is for the /64 network.
[Learn more about the user count on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#user-counts)
#### `traits.user_type`
Type: string. Available in: GeoIP Insights.
The user type associated with the IP address. This will be one of the following values:
* `business`
* `cafe`
* `cellular`
* `college`
* `consumer_privacy_network`
* `content_delivery_network`
* `government`
* `hosting`
* `library`
* `military`
* `residential`
* `router`
* `school`
* `search_engine_spider`
* `traveler`
[Learn more about the user type on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-user-context-data#user-types)
### MaxMind
`maxmind` is a JSON object that contains information related to your MaxMind
account.
```json
{
"queries_remaining": 54321
}
```
#### `maxmind.queries_remaining`
Type: integer. Available in: GeoIP Country, GeoIP City Plus, GeoIP Insights.
The approximate number of remaining queries available for the endpoint that is being called.
**This field is not present in the GeoLite City web service.**
## Miscellaneous Notes
### Languages
Many of the objects listed above include a `names` key. The value of that key is
in turn an object which maps locale codes to a name in the appropriate language
and script.
Currently, this web service may return the following locale codes:
| Code | Language | Notes |
| --- | --- | --- |
| de | German | |
| en | English | English names may still include accented characters if that is the accepted spelling in English. In other words, English does not mean ASCII. |
| es | Spanish | |
| fr | French | |
| ja | Japanese | |
| pt-BR | Brazilian Portuguese | |
| ru | Russian | |
| zh-CN | Chinese (Simplified) | |
If an object has any name data, then `en` will be one of the keys in the `names`
object. No other language is guaranteed. However, it is possible that we might
not have any name data at all for a given object.
### Returned Values as Database, Map, Dict, or Hash Keys
> **⚠️ Warning**
>
> We strongly discourage you from using a value from any
> `names` 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` | `code` or `geoname_id` |
| `country`, `registered_country`, and `represented_country` | `iso_code` or `geoname_id` |
| `postal` | `code` |
| `subdivisions` | `iso_code` or `geoname_id` |
## Example Response Bodies
Each service returns data as a JSON document. The document that is returned
always consists of an object (aka map or hash). Below are full examples of each
service's response body.
### GeoIP Country Body Example
The following is an example of a full response to a GeoIP Country web service
request.
A GeoLite Country request follows the same structure, but the data returned will
be less accurate. In addition, GeoLite Country requests will not return the
`maxmind` object.
```json
{
"continent": {
"code": "NA",
"geoname_id": 123456,
"names": {
"de": "Nordamerika",
"en": "North America",
"es": "América del Norte",
"fr": "Amérique du Nord",
"ja": "北アメリカ",
"pt-BR": "América do Norte",
"ru": "Северная Америка",
"zh-CN": "北美洲"
}
},
"country": {
"geoname_id": 6252001,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
}
},
"maxmind": {
"queries_remaining": 54321
},
"registered_country": {
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
}
},
"represented_country": {
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
},
"type": "military"
},
"traits": {
"ip_address": "1.2.3.4",
"is_anycast": true,
"network": "1.2.3.0/24"
}
}
```
### GeoIP City Plus Body Example
The following is an example of a full response to a GeoIP City Plus web service
request.
A GeoLite City request follows the same structure, but the data returned will be
less accurate. In addition, GeoLite City requests will not return the
`connection_type`, `domain`, `isp`, `mobile_country_code`,
`mobile_network_code`, or `organization` values in the `traits` object, and it
will not return the `maxmind` object.
```json
{
"continent": {
"code": "NA",
"geoname_id": 123456,
"names": {
"de": "Nordamerika",
"en": "North America",
"es": "América del Norte",
"fr": "Amérique du Nord",
"ja": "北アメリカ",
"pt-BR": "América do Norte",
"ru": "Северная Америка",
"zh-CN": "北美洲"
}
},
"country": {
"geoname_id": 6252001,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
}
},
"maxmind": {
"queries_remaining": 54321
},
"registered_country": {
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
}
},
"represented_country": {
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
},
"type": "military"
},
"traits": {
"ip_address": "1.2.3.4",
"is_anycast": true,
"network": "1.2.3.0/24",
"autonomous_system_number": 1239,
"autonomous_system_organization": "Linkem IR WiMax Network",
"connection_type": "Cable/DSL",
"domain": "example.com",
"isp": "Linkem spa",
"mobile_country_code": "310",
"mobile_network_code": "004",
"organization": "Linkem IR WiMax Network"
},
"city": {
"geoname_id": 54321,
"names": {
"de": "Los Angeles",
"en": "Los Angeles",
"es": "Los Ángeles",
"fr": "Los Angeles",
"ja": "ロサンゼルス市",
"pt-BR": "Los Angeles",
"ru": "Лос-Анджелес",
"zh-CN": "洛杉矶"
}
},
"location": {
"accuracy_radius": 20,
"latitude": 37.6293,
"longitude": -122.1163,
"metro_code": 807,
"time_zone": "America/Los_Angeles"
},
"postal": {
"code": "90001"
},
"subdivisions": [
{
"geoname_id": 5332921,
"iso_code": "CA",
"names": {
"de": "Kalifornien",
"en": "California",
"es": "California",
"fr": "Californie",
"ja": "カリフォルニア",
"ru": "Калифорния",
"zh-CN": "加州"
}
}
]
}
```
### GeoIP Insights Body Example
The following is an example of a full response to a GeoIP Insights web service
request.
```json
{
"continent": {
"code": "NA",
"geoname_id": 123456,
"names": {
"de": "Nordamerika",
"en": "North America",
"es": "América del Norte",
"fr": "Amérique du Nord",
"ja": "北アメリカ",
"pt-BR": "América do Norte",
"ru": "Северная Америка",
"zh-CN": "北美洲"
}
},
"country": {
"geoname_id": 6252001,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
},
"confidence": 75
},
"maxmind": {
"queries_remaining": 54321
},
"registered_country": {
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
}
},
"represented_country": {
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
},
"type": "military"
},
"anonymizer": {
"confidence": 99,
"is_anonymous": true,
"is_anonymous_vpn": true,
"is_hosting_provider": true,
"is_public_proxy": true,
"is_residential_proxy": true,
"is_tor_exit_node": true,
"network_last_seen": "2025-01-15",
"provider_name": "nordvpn",
"residential": {
"confidence": 82,
"network_last_seen": "2026-05-11",
"provider_name": "quickshift"
}
},
"traits": {
"ip_address": "1.2.3.4",
"ip_risk_snapshot": 45.5,
"is_anycast": true,
"network": "1.2.3.0/24",
"autonomous_system_number": 1239,
"autonomous_system_organization": "Linkem IR WiMax Network",
"connection_type": "Cable/DSL",
"domain": "example.com",
"isp": "Linkem spa",
"mobile_country_code": "310",
"mobile_network_code": "004",
"organization": "Linkem IR WiMax Network",
"is_anonymous": true,
"is_anonymous_vpn": true,
"is_hosting_provider": true,
"is_public_proxy": true,
"is_residential_proxy": true,
"is_tor_exit_node": true,
"static_ip_score": 1.5,
"user_count": 1,
"user_type": "traveler"
},
"city": {
"confidence": 25,
"geoname_id": 54321,
"names": {
"de": "Los Angeles",
"en": "Los Angeles",
"es": "Los Ángeles",
"fr": "Los Angeles",
"ja": "ロサンゼルス市",
"pt-BR": "Los Angeles",
"ru": "Лос-Анджелес",
"zh-CN": "洛杉矶"
}
},
"location": {
"accuracy_radius": 20,
"latitude": 37.6293,
"longitude": -122.1163,
"metro_code": 807,
"time_zone": "America/Los_Angeles",
"average_income": 128321,
"population_density": 1234
},
"postal": {
"code": "90001",
"confidence": 10
},
"subdivisions": [
{
"geoname_id": 5332921,
"iso_code": "CA",
"names": {
"de": "Kalifornien",
"en": "California",
"es": "California",
"fr": "Californie",
"ja": "カリフォルニア",
"ru": "Калифорния",
"zh-CN": "加州"
},
"confidence": 50
}
]
}
```
# Testing GeoIP Web Services in the MaxMind Sandbox
Source: https://dev.maxmind.com/geoip/docs/web-services/sandbox-environment/
MaxMind maintains a Sandbox environment so that you can do basic integration
tests with the web services. In order to set up a Sandbox account you must
already have a paid account, and you must be an account administrator.
[Learn how to set up a Sandbox account on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/set-up-a-maxmind-sandbox-account)
Once you have your Sandbox account set up and activated, follow the steps below.
## Generate a License Key for the Sandbox
In order to test the web services in the Sandbox environment, you will need to
generate a license key from your Sandbox account.
[Learn how to generate a license key on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/generate-a-maxmind-license-key)
The process is the same for your Sandbox account, but you must login to your
Sandbox account
[[direct link](https://sandbox.maxmind.com/en/accounts/current/license-key),
Sandbox account login required] rather than your regular MaxMind account.
## Build your integration
Consult our [quick start guide](/geoip/geolocate-an-ip/web-services/index.md) or our
[list of client APIs](/geoip/geolocate-an-ip/web-services/index.md#client-apis) to
develop your integration.
## Point your integration to the Sandbox service endpoints
Use the service endpoints for the Sandbox version of the web services, as listed
in the table below:
| Sandbox Service | HTTP Method | Endpoint |
| --------------- | ----------- | -------------------------------------------------------------- |
| Country | `GET` | `https://sandbox.maxmind.com/geoip/v2.1/country/{ip_address}` |
| City Plus | `GET` | `https://sandbox.maxmind.com/geoip/v2.1/city/{ip_address}` |
| Insights | `GET` | `https://sandbox.maxmind.com/geoip/v2.1/insights/{ip_address}` |
Remember to use the license key generated by your Sandbox account to
authenticate your requests.
## Test Data for the GeoIP Sandbox
> **ℹ️ Info**
>
> The Sandbox will return geolocation and IP intelligence data,
> but this data is not accurate and should not be used to evaluate the accuracy of
> GeoIP geolocation or IP intelligence data. It is designed for testing purposes
> only.
There are a limited number of IP addresses in the test database for the GeoIP
web services on the Sandbox. The Sandbox versions of the GeoIP web services use
[special test data that is published to GitHub](https://github.com/maxmind/MaxMind-DB/tree/main/source-data).
If you attempt to submit an IP address that doesn't exist in the test data, you
will receive an error stating that the IP address does not exist in our
database.
The test data is displayed in JSON format, and would be the expected response
for a query using the listed IP address.
[Learn more about working with our GeoIP test data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/sandbox-for-the-geoip-web-services#test-expected)
The Sandbox environment imposes volume limits on API requests to prevent abuse.
The Sandbox should not be used to test the capacity of the production web
service in high volume situations.
If you are running into the request limit and need help, please
[reach out to our support team for assistance](https://support.maxmind.com/knowledge-base).
## Learn more about the MaxMind Sandbox
You can
[learn more about the MaxMind Sandbox on our Knowledge Base](https://support.maxmind.com/knowledge-base/account-and-purchasing#sandbox-environment).
# GeoIP Exchange documentation
Source: https://dev.maxmind.com/geoip/geoip-exchange/
## Overview
GeoIP Exchange is a platform for network operators to receive automated feedback
about how MaxMind codes their networks. To learn more and join, please
[sign up on our website](https://www.maxmind.com/en/geoip-exchange).
## Download GeoIP Exchange geofeed report
If you are a current GeoIP Exchange user, you can automate downloads of the
GeoIP Exchange geofeed report. In order to download the report from a script or
program, please use the permalinks found on the GeoIP Exchange page on your
account portal.
Please note that you will be redirected from these permalinks to the hostname
`storage.googleapis.com`.
The download service is only available via HTTPS. Always use HTTPS, so that your
credentials are never transmitted unencrypted. If you attempt to access it via
HTTP, you will receive a `403 Forbidden` HTTP response.
The
[Downloads OpenAPI specification](https://github.com/maxmind/openapi/blob/main/bundled/downloads.yaml)
([raw file](https://raw.githubusercontent.com/maxmind/openapi/main/bundled/downloads.yaml))
describes the geofeed report download endpoints and their parameters.
### Rate-limiting
A `GET` or `HEAD` request may receive a `429 Too Many Requests` response if
MaxMind rate-limits requests, usually because of excessive earlier error
responses. The response may not include a JSON body.
### Download best practices
At a high level, the best practice is to write an automated script that
periodically checks the `Last-Modified` header for the report's build date, and
downloads the resulting report when the `Last-Modified` time is later than the
`Last-Modified` time of the latest local copy of the report.
It is good to check periodically throughout the day for a new report so that you
do not rely on an update schedule, and so that you catch off-schedule reports.
### Checking for the latest release date
You can check the date of the GeoIP Exchange geofeed report's latest release by
issuing a HEAD request for that report's download permalink URL. The download
permalink can be found in the GeoIP Exchange section of your account portal.
The basic steps are:
1. In the “Report links” row for the geofeed, click “Get Permalinks”.
2. Copy the permalink provided in the modal window.
3. Provide your
[account ID](https://support.maxmind.com/knowledge-base/articles/find-your-maxmind-account-id)
and
[your license key](https://www.maxmind.com/en/accounts/current/license-key)
using
[Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)
to authenticate.
4. If you are using `wget` or `curl` from a shell script, please be sure to
quote the URL.
For example, you can issue a `curl` command like the following:
```bash
curl -I -L -u YOUR_ACCOUNT_ID:YOUR_LICENSE_KEY \
'https://download.maxmind.com/geofeed/reports/v1.0/YOUR_GEOFEED_ID/YOUR_REPORT_ID'
```
Or a `wget` command like the following:
```bash
wget -S \
--method HEAD \
--user=YOUR_ACCOUNT_ID \
--password=YOUR_LICENSE_KEY \
'https://download.maxmind.com/geofeed/reports/v1.0/YOUR_GEOFEED_ID/YOUR_REPORT_ID'
```
Where `YOUR_ACCOUNT_ID` is a placeholder for your account ID and
`YOUR_LICENSE_KEY` is a placeholder for your license key.
[Learn more about license keys on our knowledge base](https://support.maxmind.com/knowledge-base/articles/using-maxmind-license-keys).
Please note that the permalink copied from your account portal will replace
`YOUR_GEOFEED_ID` with a numeric ID for your geofeed and `YOUR_REPORT_ID` with
one of `free`, `geolocation`, or `intelligence`, identifying the kind of report
you're downloading.
In the response, you can check the `Last-Modified` header for the file’s build
date. These checks can be incorporated into your own script or program,
according to your needs.
### Automating downloads
The steps for automating downloads of the report are similar to the steps for
checking the latest release date. Instead of checking the file HEAD, you will
download the file.
1. In the “Report links” row for the geofeed, click “Get Permalinks”.
2. Copy the permalink provided in the modal window.
3. Provide your
[account ID](https://support.maxmind.com/knowledge-base/articles/find-your-maxmind-account-id)
and
[your license key](https://www.maxmind.com/en/accounts/current/license-key)
using
[Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)
to authenticate.
4. If you are using `wget` or `curl` from a shell script, please be sure to
quote the URL.
For example, you can issue a `curl` command like the following:
```bash
curl -O -J -L -u YOUR_ACCOUNT_ID:YOUR_LICENSE_KEY 'https://download.maxmind.com/geofeed/reports/v1.0/YOUR_GEOFEED_ID/YOUR_REPORT_ID'
```
Or a `wget` command like the following:
```bash
wget --user=YOUR_ACCOUNT_ID --password=YOUR_LICENSE_KEY 'https://download.maxmind.com/geofeed/reports/v1.0/YOUR_GEOFEED_ID/YOUR_REPORT_ID'
```
Where `YOUR_ACCOUNT_ID` is a placeholder for your account ID and
`YOUR_LICENSE_KEY` is a placeholder for your license key.
[Learn more about license keys on our knowledge base](https://support.maxmind.com/knowledge-base/articles/using-maxmind-license-keys).
Please note that the permalink copied from your account portal will replace
`YOUR_GEOFEED_ID` with a numeric ID for your geofeed and `YOUR_REPORT_ID` with
one of `free`, `geolocation`, or `intelligence`, identifying the kind of report
you're downloading.
This will save the report to a file called `YOUR_REPORT_ID.csv`. For example,
`https://download.maxmind.com/geofeed/reports/v1.0/YOUR_GEOFEED_ID/geolocation`
would download a file called `geolocation.csv`.
# GeoLite on Snowflake
Source: https://dev.maxmind.com/geoip/geolite-on-snowflake/
MaxMind offers our GeoLite data through the
[Snowflake Marketplace](https://app.snowflake.com/marketplace/providers/GZ2FTZ5POF7/MaxMind).
If you do not have an existing Snowflake account, you will need to create one
before requesting access to the GeoLite datasets. Once approved, you will be
able to query GeoLite data within Snowflake.
The GeoLite Country and City datasets are updated twice weekly, every Tuesday
and Friday. The GeoLite ASN dataset is updated daily.
## IP geolocation accuracy
> **⚠️ Warning**
>
> **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.
Use the Accuracy Radius as an indication of geolocation accuracy for the
latitude and longitude coordinates we return for an IP address. The actual
location of the IP address is likely within the area defined by this radius and
the latitude and longitude coordinates.
## GeoLite dataset
The GeoLite dataset contains geolocation and ASN data depending on the
particular dataset you are querying:
### Geolocation data
| Data field name | Type | Data field description | Included in... |
|------|------|-------------|-------------|
| 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::/64". | Country, City |
| geoname_id | integer | A unique identifier for the network's location as specified by [GeoNames](https://www.geonames.org/). This ID can be used to look up the location information in the Location file. [Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) | Country, City |
| 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](https://www.geonames.org/). This ID can be used to look up the location information in the Location file. [Learn more about registered countries on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/country-level-and-city-level-geolocation-maxmind) | Country, City |
| 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](https://www.geonames.org/). This ID can be used to look up the location information in the Location file. [Learn more about represented countries on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/country-level-and-city-level-geolocation-maxmind) | Country, City |
| is_anonymous_proxy | boolean | **Deprecated.** Please see our [GeoIP Anonymous IP database](https://www.maxmind.com/en/geoip-anonymous-ip-database) to determine whether the IP address is used by an anonymizing service. | Country, City |
| is_satellite_provider | boolean | **Deprecated.** | Country, City |
| 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: United States: 5, Canada: 3, United Kingdom: 2-4, Brazil: 5, Ireland: 3, Japan: 7 (specified for the first 6. The last digit defaults to 1), Netherlands: 4, Portugal: 7 (accurate for the first 4. The last 3 often defaults to `-001`), Singapore: 2 | City only |
| latitude* | decimal | The approximate [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System) latitude of the location associated with the network. [Learn about the geolocation area defined by latitude, longitude, and accuracy radius, on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area) | City only |
| longitude* | decimal | The approximate [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System) longitude of the location associated with the network. [Learn about the geolocation area defined by latitude, longitude, and accuracy radius, on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area) | City only |
| 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.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area) | City only |
| is_anycast | boolean | This is `1` if the network is an [anycast network](https://en.wikipedia.org/wiki/Anycast). This column will be empty in GeoLite2-Country and GeoLite2-City. | Country, City |
> **⚠️ Warning**
>
> _\* 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._
| Data field name | Type | Data field description | Included in... |
|------|------|-------------|-------------|
| geoname_id | integer | A unique identifier for the location as specified by [GeoNames](https://www.geonames.org/). This ID can be used as a key for the Location file. [Learn more about GeoNames IDs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geonames-ids) | Country, City |
| locale_code | string | The locale that the names in this row are in. This will always correspond to the locale name of the file. | Country, City |
| continent_code | string (2) | The continent code for this location. Possible codes are: **AF** - Africa, **AN** - Antarctica, **AS** - Asia, **EU** - Europe, **NA** - North America, **OC** - Oceania, **SA** - South America | Country, City |
| continent_name | string | The continent name for this location in the file's locale. [Learn more about localized names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) | Country, City |
| country_iso_code | string (2) | A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with the location. | Country, City |
| country_name | string | The country name for this location in the file's locale. [Learn more about localized names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) | Country, City |
| subdivision_1_iso_code | string (1-3) | A string of up to three characters containing the region-portion of the [ISO 3166-2](https://en.wikipedia.org/wiki/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". | City only |
| 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.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) | City only |
| subdivision_2_iso_code | string (1-3) | A string of up to three characters containing the region-portion of the [ISO 3166-2](https://en.wikipedia.org/wiki/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". | City only |
| 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.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) | City only |
| city_name | string | The city name for this location in the file's locale. [Learn more about localized names on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#names) | City only |
| metro_code | integer | **Deprecated.** This is a no-longer-maintained code for targeting advertisements in Google. | City only |
| time_zone | string | The time zone associated with location, as specified by the [IANA Time Zone Database](https://www.iana.org/time-zones), e.g., "America/New_York". | City only |
| 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. | Country, City |
### ASN data
| 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::/64”. |
| autonomous_system_number | integer | The [autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_%28Internet%29) number associated with the IP address.
[Learn more about autonomous system data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#autonomous-system-data) |
| autonomous_system_organization | string | The organization associated with the registered autonomous system number for the IP address.
[Learn more about autonomous system data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-network-data#autonomous-system-data) |
## License
GeoLite data offered through the Snowflake Marketplace is subject to the
[MaxMind Services Terms of Use for the Snowflake Platform](https://www.maxmind.com/en/snowflake-geolite-terms-of-use).
Please note that this is different from the GeoLite End User License Agreement,
which governs the use of GeoLite databases and web services served directly from
MaxMind.
## Support
MaxMind does not provide official support for our free GeoLite dataset, but the
documentation for our data on Snowflake includes sample queries and important
information about how to use GeoLite on Snowflake.
For general questions about how to interpret specific GeoLite data points beyond
what is documented in Snowflake, please consult
[the appropriate section of the MaxMind Knowledge Base](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data).
# GeoLite Databases and Web Services
Source: https://dev.maxmind.com/geoip/geolite2-free-geolocation-data/
MaxMind offers free geolocation and ASN data in downloadable database and web
service formats.
- [Sign Up for GeoLite](https://www.maxmind.com/en/create-account): Start building today with GeoLite databases and web services.
- [Explore GeoLite](https://www.maxmind.com/en/geolite-free-ip-geolocation-data): Learn more about what you can do with GeoLite, and view redistribution options.
Find what you need:
- [Understanding IP geolocation](/geoip/geolite2-free-geolocation-data/index.md#understanding-ip-geolocation)
- [Integration](/geoip/geolite2-free-geolocation-data/index.md#integrating-geolite-databases-and-web-services)
- [Generating a license key to authenticate GeoLite](/geoip/geolite2-free-geolocation-data/index.md#generate-a-license-key-to-authenticate-geolite-database-downloads-and-web-service-requests)
- [GeoLite database formats](/geoip/geolite2-free-geolocation-data/index.md#decide-how-you-want-to-use-geolite-databases)
- [Automate database downloads and updates](/geoip/geolite2-free-geolocation-data/index.md#automate-database-downloads-and-updates)
- [Look up IP addresses in the GeoLite databases and web services](/geoip/geolite2-free-geolocation-data/index.md#look-up-ip-addresses-in-the-geolite-databases)
- [Database fields](/geoip/geolite2-free-geolocation-data/index.md#geolite-database-fields)
- [Web service fields](/geoip/geolite2-free-geolocation-data/index.md#geolite-web-service-fields)
- [Resources for working with GeoLite](/geoip/geolite2-free-geolocation-data/index.md#resources-for-working-with-geolite)
## Understanding IP geolocation
IP geolocation is inherently imprecise. Locations in MaxMind’s data are often
near population centers. Any location provided by GeoLite or GeoIP® should not
be used to identify a particular address or household.
Some IP addresses cannot be geolocated as precisely as others. Almost all IP
addresses will have at least a country associated with them, but some will not
have a region or city, and many will not have a postal code.
GeoLite City and paid GeoIP City data return a geolocation area rather than a
point on a map. A geolocation area is a circle defined by latitude, longitude,
and an accuracy radius, which ranges from a few kilometers to 1000 kilometers.
You should build your applications with this accuracy radius in mind to avoid
confusing results. For example, an IP address which can only be geolocated to a
country will return a latitude and longitude near the center of that country,
with a very large accuracy radius. If you do not account for the accuracy
radius, it may appear as if many IP addresses are geolocated to a specific place
in the center of the country.
[Learn more about MaxMind’s geolocation area data on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/maxmind-ip-geolocation-data#geolocation-area)
## Integrating GeoLite databases and web services
GeoLite databases and web services use the same integration methods as our GeoIP
databases and web services. To quickly get started, follow these steps.
Want to work with GeoLite on Snowflake?
[Get GeoLite directly through the Snowflake marketplace](https://app.snowflake.com/marketplace/providers/GZ2FTZ5POF7/MaxMind)
(Snowflake account required).
### Sign up for a MaxMind account to get GeoLite
Read more about GeoLite, its attribution requirements and applicable use cases,
and how to sign up.
[Get started on our GeoLite page.](https://www.maxmind.com/en/geolite-free-ip-geolocation-data)
### Generate a license key to authenticate GeoLite database downloads and web service requests
A license key is like a password used to authenticate database downloads or web
service requests. After you have a MaxMind account, you should generate one or
more license keys. Some people use different license keys for different servers
or use cases.
[Learn how to generate license keys on our Knowledge Base](https://support.maxmind.com/knowledge-base/articles/generate-a-maxmind-license-key),
or
[go directly to your account portal to generate a new license key](https://www.maxmind.com/en/accounts/current/license-key).
> **⚠️ Warning**
>
> Working with the web services instead of the databases?
> Skip to the
> [instructions on using the web services below.](/geoip/geolite2-free-geolocation-data/index.md#look-up-ip-addresses-in-the-geolite-web-services)
### Decide how you want to use GeoLite databases
MaxMind provides databases in two formats:
- a binary (.mmdb) format optimized for fast lookups at scale
- a comma separated values (.csv) format that’s good for manipulating, joining,
and transforming the data
If you’re making a web application that needs to perform lookups quickly and at
high volume, you should use the binary mmdb format.
If you’re bringing GeoLite data into an existing database structure or
application, you should use the csv format.
If you’re working with an existing plugin or integration, check which format
that plugin uses.
### Automate database downloads and updates
> **⚠️ Warning**
>
> Please note that GeoLite users are limited to 30 database
> downloads per day. If you need to download more, please
> [upgrade to GeoIP](https://www.maxmind.com/en/geoip-databases).
The GeoLite End User License Agreement requires all GeoLite users to keep their
data up-to-date. This means you must delete GeoLite databases within 30 days of
a new release. The easiest way to keep your GeoLite data up-to-date is to
automate downloads and updates.
The method for updating the GeoLite databases depends on the database format
you’re using. To help you decide which database format to use,
[see the section above](/geoip/geolite2-free-geolocation-data/index.md#decide-how-you-want-to-use-geolite-databases).
- [Learn how to update the binary database format for fast lookups at scale.](/geoip/updating-databases/index.md#using-geoip-update)
- [Learn how to update the csv database format to join the data or import into SQL.](/geoip/updating-databases/index.md#directly-downloading-databases)
### Look up IP addresses in the GeoLite databases
The method you use to look up IP addresses in the GeoLite databases will depend
on the database format you’re using and what you’re using it for. To help you
decide which database format to use,
[see this section above](/geoip/geolite2-free-geolocation-data/index.md#decide-how-you-want-to-use-geolite-databases).
- [Use MaxMind’s client APIs to look up IP addresses in the binary databases for fast lookups at scale.](/geoip/geolocate-an-ip/databases/index.md)
- [Learn how to import the csv format databases into MySQL or PostgreSQL.](/geoip/importing-databases/index.md)
- If you’re using GeoLite in a plugin or application, check the installation
instructions for your plugin.
### Look up IP addresses in the GeoLite web services
> **⚠️ Warning**
>
> Please note that GeoLite web service users are limited to
> 1000 lookups per day per service. If you need to do more lookups, please
> [upgrade to GeoIP](https://www.maxmind.com/en/geoip-databases).
MaxMind maintains client APIs in many popular languages to help you look up IP
addresses in our web services quickly and easily.
[Learn how to look up IP addresses in our web services.](/geoip/geolocate-an-ip/web-services/index.md)
MaxMind web services do support a client-side JavaScript lookup, but only for
the paid GeoIP web services.
[Learn more about client-side JavaScript lookups using the GeoIP web services](/geoip/geolocate-an-ip/client-side-javascript/index.md),
and [upgrade to GeoIP](https://www.maxmind.com/en/geoip-api-web-services).
## GeoLite database fields
MaxMind provides three different GeoLite databases. Click each link for
documentation of all available database fields, client APIs, and sample files.
Fields marked as available in Country will be available in the GeoLite Country
database, except as noted in the field description. Fields marked as available
in City will be available in the GeoLite City database, except as noted in the
field description.
| Database | Use case |
| --- | --- |
| [GeoLite Country database](/geoip/docs/databases/city-and-country/index.md)
\* Some fields listed in this documentation are not present in GeoLite. Check the description of the fields. | Geolocation at the country-level for analytics, content customization, or compliance use cases in territories that are not disputed. |
| [GeoLite City database](/geoip/docs/databases/city-and-country/index.md)
\*
Some fields listed in this documentation are not present in GeoLite. Check the description of the fields. | Geolocation down to the city or postal code for analytics and content customization.
**Please note**: The free GeoLite City is considerably less accurate than the paid GeoIP City data, and is not recommended for commercial use cases. |
| [GeoLite ASN database](/geoip/docs/databases/asn/index.md) | Provides the autonomous system number and organization for IP addresses for analytics. |
## GeoLite web service fields
MaxMind provides two different GeoLite web services. Click each link for
documentation of all available data that can be returned in each service.
Fields marked as available in the GeoIP Country web service will be available in
GeoLite Country web service, except as noted in the field description. Fields
marked as available in the GeoIP City web service will be available in the
GeoLite City web service, except as noted in the field description.
| Web service | Use case |
| --- | --- |
| [GeoLite Country web service](/geoip/docs/web-services/index.md#geolite-country)
\* Some fields listed in this documentation are not present in GeoLite. Check the description of the fields. | Geolocation at the country-level for analytics, content customization, or compliance use cases in territories that are not disputed. |
| [GeoLite City web service](/geoip/docs/web-services/index.md#geolite-city)
\* Some fields listed in this documentation are not present in GeoLite. Check the description of the fields. | Geolocation down to the city or postal code for analytics and content customization. Also includes the autonomous system number and autonomous system organization.
**Please note**: The free GeoLite City is considerably less accurate than the paid GeoIP City data, and is not recommended for commercial use cases. |
## Resources for working with GeoLite
Please note that MaxMind does not provide support for our GeoLite databases and
web services. You can use the resources below to learn more about working with
IP geolocation data in general and GeoLite in particular.
### What are you permitted to do with GeoLite?
Get resources for licensing and partnership around GeoLite data:
- [Learn about the GeoLite End User License Agreement on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/who-is-covered-by-the-geolite-end-user-license-agreement)
- [Learn how you are permitted to use GeoLite data in products or services on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/sell-or-display-data-from-geolite-databases-and-web-services)
- [Learn more about MaxMind’s Affiliate Program for developers.](https://www.maxmind.com/en/affiliate-program)
### How does IP geolocation work?
Get resources for understanding the benefits and limitations of IP geolocation
and how MaxMind keeps its data safe and in line with privacy-by-design
principles:
- [“How accurate is IP geolocation?” on the MaxMind blog](https://blog.maxmind.com/how-accurate-is-ip-geolocation/)
- [“Using MaxMind’s accuracy radius” on the MaxMind blog](https://blog.maxmind.com/using-maxminds-accuracy-radius/)
- [“Safer IP geolocation with MaxMind” on the MaxMind blog](https://blog.maxmind.com/safer-ip-geolocation/)
### What can I do with paid MaxMind data?
In addition to more accurate IP geolocation data, MaxMind has paid products that
identify various attributes of an IP address, including:
- ISP name (e.g., AT&T Wireless, Amazon, etc.)
- connection type (e.g., Cellular, Satellite, etc.)
- domain name (e.g., google.com, microsoft.com, etc.)
- user type (e.g., business, residential, etc.)
- proxy identification (e.g., VPNs, Tor exit nodes, etc.)
[Learn more about MaxMind’s paid IP intelligence data.](https://www.maxmind.com/en/solutions/ip-geolocation-databases-api-services)
MaxMind also has a risk scoring web service for fraud prevention and security.
[Learn more about minFraud.](https://www.maxmind.com/en/solutions/fraud-and-risk)
# Geolocate an IP
Source: https://dev.maxmind.com/geoip/geolocate-an-ip/
Learn how to geolocate an IP address using GeoIP and GeoLite databases, or GeoIP
and GeoLite web services with server or client side API calls.
## Guides
- [Databases](/geoip/geolocate-an-ip/databases/index.md): Geolocate an IP address using GeoIP or GeoLite databases.
- [Web Services](/geoip/geolocate-an-ip/web-services/index.md): Geolocate an IP address using GeoIP or GeoLite web services using a server-side API call.
- [Client-side Javascript](/geoip/geolocate-an-ip/client-side-javascript/index.md): Geolocate an IP address using GeoIP or GeoLite web services using client-side JavaScript.
# Geolocate an IP address using Web Services with the client-side JavaScript
Source: https://dev.maxmind.com/geoip/geolocate-an-ip/client-side-javascript/
Our GeoIP JavaScript client allows you to use GeoIP web services client-side
without doing any server-side integration on your end. While it is convenient,
there are some caveats with its usage. Some browser settings and add-ons (such
as ad blockers) may prevent the GeoIP JavaScript API from successfully calling
the web services. Additionally, there may be unexpected usage spikes which you
may want to monitor, due to moments of high traffic to your website(s).
We highly recommend using a
[server-side integration](/geoip/geolocate-an-ip/web-services/index.md), as it is more
secure and more robust than a client-side integration.
## Implementation
Implementing the GeoIP JavaScript client involves registering your domain(s),
adding a JavaScript snippet to your web page, calling the desired API
method/service, and providing callbacks for all scenarios.
### 1. Register your domain(s)
All domains using the service must be registered. New users may
[request a free trial](https://www.maxmind.com/en/create-account?service_geoip=1)
or
[purchase web service credit](https://www.maxmind.com/en/geoip-api-web-services)
in order to receive an account to register domains. Existing account holders are
able to
[register domains directly](https://www.maxmind.com/en/accounts/current/geoip/javascript/domains).
### 2. Add a JavaScript snippet to your page
In order to use this service, the following JavaScript must be included in your
page.
> **⚠️ Warning**
>
> **Do not download this JavaScript file and serve it from
> your server(s)!**
>
> The JavaScript file must be served from MaxMind servers, otherwise GeoIP
> requests will fail.
```html
```
### 3. Call an API method and provide callbacks
The JavaScript client provides 3 public methods:
| Option | Description |
| ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `geoip2.country(onSuccess, onError, options)` | Calls the "GeoIP Country" endpoint using the routable IP address associated with the machine on which it is running. |
| `geoip2.city(onSuccess, onError, options)` | Calls the "GeoIP City Plus" endpoint using the routable IP address associated with the machine on which it is running. |
| `geoip2.insights(onSuccess, onError, options)` | Calls the "GeoIP Insights" endpoint using the routable IP address associated with the machine on which it is running. |
All of the functions take the same 3 arguments:
- If successful, this function calls the `onSuccess` callback. The first
parameter passed to the callback contains an object matching the output of one
of MaxMind’s
[GeoIP web service API responses](/geoip/docs/web-services/responses/index.md).
In addition to the attributes listed in the web services API docs, the object
also has a `most_specific_subdivision` property that provides access to the
most specific subdivision object available. On browsers other than Internet
Explorer 8, this is implemented as a non-enumerable property using
`defineProperty`.
- If there is an error, the function calls the `onError` callback with the error
object as a parameter.
- The optional `options` parameter is an object containing flags for the
service. This parameter is reserved for future use. There are no options at
this time.
### Example: Display the user's city name in a page
In this example, we are displaying the user's city name in a page. We have 2
files: page.html and demo.js.
```html
Which city am I in?
Where am I?
You are in
.
```
```js
// demo.js
var fillInPage = (function () {
var updateCityText = function (geoipResponse) {
/*
* It's possible that we won't have any names for this city.
* For language codes with a special character such as pt-BR,
* replace names.en with names['pt-BR'].
*/
var cityName = geoipResponse.city.names.en || 'your city';
document.getElementById('city').innerHTML = cityName;
};
var onSuccess = function (geoipResponse) {
updateCityText(geoipResponse);
};
// If we get an error, we will display an error message
var onError = function (error) {
document.getElementById('city').innerHTML = 'an error! Please try again..';
};
return function () {
if (typeof geoip2 !== 'undefined') {
geoip2.city(onSuccess, onError);
} else {
document.getElementById('city').innerHTML =
'a browser that blocks GeoIP requests';
}
};
})();
fillInPage();
```
### Successful responses
A successful response consists of a single JavaScript object. That object
contains a set of key/value pairs, where the keys are things like `country` and
`traits`, and the values are objects or arrays of objects.
While our REST API is documented as omitting missing keys, we add blank arrays
and objects in the JavaScript API. This makes it much simpler to work with the
response, as you will not need to check whether the data structure exists before
using it.
Wherever a missing property’s value could be an object or array, we will add an
empty object or array as needed. For example, if you call the `city()` method
and the response from the MaxMind server has no `city` key at all, it will end
up being filled in as:
```json
{
"city": {
"names": {}
},
"country": {...},
"continent": {...},
...
}
```
If the response contains no `subdivisions` key, you will get this:
```json
{
"city": {...},
"country": {...},
"continent": {...},
"subdivisions": [ { "names": {} } ],
...
}
```
### Errors
All errors are passed in a JavaScript object as the first parameter to the
`onError` function. This object contains two keys, `code` and `error`. `code` is
a machine-readable error code that will not change. `error` is a human-readable
description of the error.
| Code | HTTP Status | Description |
| ------------------------------ | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `IP_ADDRESS_INVALID` | 400 Bad Request | You have not supplied a valid IPv4 or IPv6 address. |
| `IP_ADDRESS_REQUIRED` | 400 Bad Request | You have not supplied an IP address, which is a required field. |
| `IP_ADDRESS_RESERVED` | 400 Bad Request | You have supplied an IP address which belongs to a reserved or private range. |
| `IP_ADDRESS_NOT_FOUND` | 404 Not Found | The supplied IP address is not in the database. |
| `DOMAIN_REGISTRATION_REQUIRED` | 401 Unauthorized | The domain of your site is not registered. |
| `QUERY_FORBIDDEN` | 401 Unauthorized | You tried to access a service or feature that is not covered by your service plan. |
| `OUT_OF_QUERIES` | 402 Payment Required | The license key you have provided is out of queries. Please purchase more queries to use this service. |
| `PERMISSION_REQUIRED` | 403 Forbidden | You do not have permission to use the service. Please [contact our support team](https://support.maxmind.com/knowledge-base) for more information. |
| `HTTP_TIMEOUT` | (none) | The request to the GeoIP web service timed out. |
| `HTTP_ERROR` | (none) | There was an error making the request to the GeoIP web service. |
### Versioning
This document covers **version 2.1** of the GeoIP JavaScript API. Whenever
MaxMind releases a new version of the JavaScript API, we will use a new path, so
the old JavaScript files will always be accessible. For example, if we released
version 42.6 of the JavaScript API, its path would be
`/js/apis/geoip2/**v42.6**/geoip2.js`.
However, support will only be provided for the newest version of the JavaScript
API at any given time.
Please note that the JavaScript API and the web service REST API are versioned
separately. We will bump the JavaScript API version when we add new features or
need to break backwards compatibility with previous versions of the JavaScript
API.
Version 2.1 of the JavaScript API uses version 2.1 of the
[GeoIP web services REST API](/geoip/docs/web-services/index.md).
### Browser support
MaxMind is committed to support all browser versions that are currently
supported by their respective creators. When the creator offers multiple support
levels, we only support the browser through its initial support phase. For
example, Microsoft has two support phases, Mainstream and Extended. We are
committed to supporting browsers through the end of the Mainstream support
phase. We reserve the right to end support at any time for any browser no longer
supported by its creator. In order to ensure your data is as safe and secure as
possible, we recommend using the encrypted HTTP (HTTPS) protocol.
Here is the list of browsers supported:
| Browser | Version(s) |
| --------------------------- | ----------------------------------------------------------- |
| Chrome | Last two stable releases per Chrome Release Stable Channels |
| Firefox | 60+ |
| Internet Explorer | 11 |
| Edge | 17+ |
| Safari (desktop and mobile) | 10+ |
| Opera | Current release |
| Android native browser | 5+ |
| iOS native browser | 10+ |
### Security
We require TLS 1.2 or greater for HTTPS requests to our servers to keep your
data secure.
# Geolocate an IP address using Databases
Source: https://dev.maxmind.com/geoip/geolocate-an-ip/databases/
Geolocating an IP address using GeoIP and GeoLite databases consists of
configuring a database reader and querying the database.
## Implementation
MaxMind offers and highly recommends using
[official client libraries](/geoip/docs/databases/index.md#official-client-apis) to query
our databases.
### 1. Install the GeoIP client library
We have a collection of officially supported libraries for you to query with the
GeoIP and GeoLite databases:
```csharp
// Install via NuGet
Install-Package MaxMind.GeoIP2
```
```java
// Install via Maven, recommended
com.maxmind.geoip2
geoip2
5.2.0
// Or install via Gradle
repositories {
mavenCentral()
}
dependencies {
implementation 'com.maxmind.geoip2:geoip2:5.2.0'
}
```
```javascript
// Install via npm
npm install @maxmind/geoip2-node
// Or install via yarn
yarn add @maxmind/geoip2-node
```
```php
# Install via Composer
composer require geoip2/geoip2:~3.0
```
```python
# Install via pip
pip install geoip2
```
```ruby
# Install as a gem
gem install maxmind-geoip2
# Or add this to your Gemfile
gem 'maxmind-geoip2'
```
### 2. Configure a GeoIP database reader to query the database
Configuring the database reader requires the database file to be accessible on
the filesystem. After configuring the database reader, you can then query the
database by calling the method corresponding to the database type (e.g. `city`
or `country`) and passing it the IP address you want to look up.
If the lookup succeeds, the method call will return a model class/object for the
database method you called. This model in turn contains multiple record
classes/objects, each of which represents part of the data for the record.
If the request fails, the reader class will throw an exception or return an
error depending on the library.
For more details on database methods, errors, and exceptions,
[see the client API documentation below](/geoip/geolocate-an-ip/databases/index.md#apis-and-third-party-integrations).
```csharp
using (var reader = new DatabaseReader("path/to/maxmind-database.mmdb"))
{
var response = reader.City("128.101.101.101");
Console.WriteLine(response.Country.IsoCode);
}
```
```java
File database = new File("/path/to/maxmind-database.mmdb");
// This reader object should be reused across lookups as creation of it is
// expensive.
DatabaseReader reader = new DatabaseReader.Builder(database).build();
// If you want to use caching at the cost of a small (~2MB) memory overhead:
// new DatabaseReader.Builder(database).withCache(new CHMCache()).build();
InetAddress ipAddress = InetAddress.getByName("128.101.101.101");
CityResponse response = reader.city(ipAddress);
Country country = response.country();
System.out.println(country.isoCode());
```
```javascript
// Asynchronous database opening
import { Reader } from '@maxmind/geoip2-node';
Reader.open('/path/to/maxmind-database.mmdb').then((reader) => {
const response = reader.city('128.101.101.101');
console.log(response.country.isoCode);
});
// Synchronous database opening
import { readFileSync } from 'node:fs';
import { Reader } from '@maxmind/geoip2-node';
const dbBuffer = readFileSync('/path/to/maxmind-database.mmdb');
// This reader object should be reused across lookups as creation of it is
// expensive.
const reader = Reader.openBuffer(dbBuffer);
const response = reader.city('128.101.101.101');
console.log(response.country.isoCode);
```
```php
city('128.101.101.101');
print($record->country->isoCode);
```
```python
import geoip2.database
# This reader object should be reused across lookups as creation of it is
# expensive.
with geoip2.database.Reader('/path/to/maxmind-database.mmdb') as reader:
response = reader.city('128.101.101.101')
print(response.country.iso_code)
```
```ruby
require 'maxmind/geoip2'
# This reader object should be reused across lookups as creation of it is
# expensive.
reader = MaxMind::GeoIP2::Reader.new(
database: '/path/to/maxmind-database.mmdb',
)
record = reader.city('128.101.101.101')
puts record.country.iso_code
```
## 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](/geoip/docs/databases/index.md#client-apis).
# Geolocate an IP address using Web Services
Source: https://dev.maxmind.com/geoip/geolocate-an-ip/web-services/
Geolocating an IP address using GeoIP or GeoLite web services consists of
configuring a web service client, creating a request, and handling the response.
## Implementation
MaxMind offers and highly recommends using
[official client libraries](/geoip/docs/web-services/index.md#client-apis) to access our
geolocation services. If you cannot or do not wish to use our client libraries,
please review our [GeoIP API Documentation page](/geoip/docs/web-services/index.md) for
details on our REST API.
### 1. Install the GeoIP client library
We have a collection of officially supported libraries for you to interact with
the GeoIP and GeoLite APIs:
```csharp
// Install via NuGet
Install-Package MaxMind.GeoIP2
```
```java
// Install via Maven, recommended
com.maxmind.geoip2
geoip2
5.2.0
// Or install via Gradle
repositories {
mavenCentral()
}
dependencies {
implementation 'com.maxmind.geoip2:geoip2:5.2.0'
}
```
```javascript
// Install via npm
npm install @maxmind/geoip2-node
// Or install via yarn
yarn add @maxmind/geoip2-node
```
```php
# Install via Composer
composer require geoip2/geoip2:~3.0
```
```python
# Install via pip
pip install geoip2
```
```ruby
# Install as a gem
gem install maxmind-geoip2
# Or add this to your Gemfile
gem 'maxmind-geoip2'
```
### 2. Create and configure a GeoIP client object
To interact with our API, you need to create a new client object. For this you
will need your MaxMind
[account ID and license key](https://www.maxmind.com/en/accounts/current/license-key).
Our clients also allow you to interact with our GeoLite API, but this requires
additional configuration as demonstrated below:
In the C#, Java, and JavaScript examples, replace the GeoIP client declaration
with the commented GeoLite alternative to query GeoLite.
```csharp
int accountId = 10;
string licenseKey = "LICENSEKEY";
var client = new WebServiceClient(accountId, licenseKey);
// To query the GeoLite web service, you must set the optional `host` parameter
// to `geolite.info`
// var client = new WebServiceClient(accountId, licenseKey, host: "geolite.info");
```
```java
int accountId = 10;
String licenseKey = "LICENSEKEY";
WebServiceClient client = new WebServiceClient.Builder(accountId, licenseKey).build();
// To query the GeoLite web service, you must call the `host` method on the
// builder with "geolite.info"
// WebServiceClient client = new WebServiceClient.Builder(accountId, licenseKey)
// .host("geolite.info").build();
```
```javascript
import { WebServiceClient } from '@maxmind/geoip2-node';
const accountId = '10';
const licenseKey = 'LICENSEKEY';
const client = new WebServiceClient(accountId, licenseKey);
// To query the GeoLite web service, you must set the optional `host` parameter
// const client = new WebServiceClient(accountId, licenseKey, {
// host: 'geolite.info',
// });
```
```php
name`
// method on the model classes that this client creates.
$client = new Client($accountId, $licenseKey, ['en'], ['host' => 'geolite.info']);
```
```python
from geoip2.webservice import Client, AsyncClient
account_id = 10
license_key = 'LICENSEKEY'
# If you want to use synchronous requests
client = Client(account_id, license_key)
# To query the GeoLite web service, you must set the "host" keyword argument
# to "geolite.info"
client = Client(account_id, license_key, host='geolite.info')
# Or if you want to use asynchronous requests (requires `import asyncio`)
async_client = AsyncClient(account_id, license_key)
# To query the GeoLite web service, you must set the "host" keyword argument
# to "geolite.info"
async_client = AsyncClient(account_id, license_key, host='geolite.info')
```
```ruby
require 'maxmind/geoip2'
client = MaxMind::GeoIP2::Client.new(
account_id: 10,
license_key: 'LICENSEKEY',
# To use the GeoLite web service instead of GeoIP, set the host
# parameter to "geolite.info", eg:
# host: 'geolite.info',
)
```
### 3. Query the desired geolocation service
GeoIP offers 3 services: Insights, City Plus, and Country. GeoLite offers 2
services: City and Country. Each client library has an appropriately named
method for accessing the desired geolocation service.
```csharp
// If you are making multiple requests, a single WebServiceClient
// should be shared across requests to allow connection reuse. The
// class is thread safe.
int accountId = 10;
string licenseKey = "LICENSEKEY";
// Sync
using (var client = new WebServiceClient(accountId, licenseKey))
{
// You can also use `client.City` or `client.Insights`
// `client.Insights` is not available to GeoLite users
var response = client.Country("128.101.101.101");
Console.WriteLine(response.Country.IsoCode); // 'US'
Console.WriteLine(response.Country.Name); // 'United States'
Console.WriteLine(response.Country.Names["zh-CN"]); // '美国'
}
// Async
using (var client = new WebServiceClient(accountId, licenseKey))
{
// You can also use `client.CityAsync` or `client.InsightsAsync`
// `client.InsightsAsync` is not available to GeoLite users
var response = await client.CountryAsync("128.101.101.101");
Console.WriteLine(response.Country.IsoCode); // 'US'
Console.WriteLine(response.Country.Name); // 'United States'
Console.WriteLine(response.Country.Names["zh-CN"]); // '美国'
}
```
```java
int accountId = 10;
String licenseKey = "LICENSEKEY";
WebServiceClient client = new WebServiceClient.Builder(accountId, licenseKey)
.build();
InetAddress ipAddress = InetAddress.getByName("128.101.101.101");
// You can also use `client.city` or `client.insights`
// `client.insights` is not available to GeoLite users
CountryResponse response = client.country(ipAddress);
Country country = response.country();
System.out.println(country.isoCode()); // 'US'
System.out.println(country.name()); // 'United States'
System.out.println(country.names().get("zh-CN")); // '美国'
```
```javascript
import { WebServiceClient } from '@maxmind/geoip2-node';
const accountId = '10';
const licenseKey = 'LICENSEKEY';
const client = new WebServiceClient(accountId, licenseKey);
// You can also use `client.city` or `client.insights`
// `client.insights` is not available to GeoLite users
client.country('142.1.1.1').then((response) => {
console.log(response.country.isoCode); // 'CA'
});
```
```php
city` or `$client->insights`
// `$client->insights` is not available to GeoLite users
$record = $client->country('128.101.101.101');
print($record->country->isoCode . "\n");
```
```python
# Sync
from geoip2.webservice import Client
account_id = 10
license_key = 'LICENSEKEY'
with Client(account_id, license_key) as client:
# You can also use `client.city` or `client.insights`
# `client.insights` is not available to GeoLite users
response = client.country('128.101.101.101')
print(response.country.iso_code)
# Async
import asyncio
from geoip2.webservice import AsyncClient
async def main():
async with AsyncClient(account_id, license_key) as client:
# You can also use `client.city` or `client.insights`
# `client.insights` is not available to GeoLite users
response = await client.country('128.101.101.101')
print(response.country.iso_code)
asyncio.run(main())
```
```ruby
require 'maxmind/geoip2'
client = MaxMind::GeoIP2::Client.new(
account_id: 10,
license_key: 'LICENSEKEY',
)
# You can also use `client.city` or `client.insights`.
# Note that `client.insights` is not available to GeoLite users.
record = client.country('128.101.101.101')
puts record.country.iso_code
```
## Client APIs
You can find a complete list of official and third-party client APIs on the
[web services documentation page](/geoip/docs/web-services/index.md#client-apis).
## Command Line (curl) Examples
The web service may be accessed using `curl`, a simple command-line HTTP client.
The `-u` flag is used to pass the
[HTTP basic authentication header](https://en.wikipedia.org/wiki/Basic_access_authentication#Client_side)
that provides the web service with your credentials.
For the following examples, replace `{account_id}` and `{license_key}`
(including the brackets) with your
[account ID and license key](https://www.maxmind.com/en/accounts/current/license-key),
and replace `{ip_address}` with the IP address you wish to look up.
### GeoIP Country
```bash
# Retrieve data for your IP address.
curl -u "{account_id}:{license_key}" \
"https://geoip.maxmind.com/geoip/v2.1/country/me?pretty"
# Retrieve data for an arbitrary IP address.
curl -u "{account_id}:{license_key}" \
"https://geoip.maxmind.com/geoip/v2.1/country/{ip_address}?pretty"
```
### GeoIP City Plus
```bash
# Retrieve data for your IP address.
curl -u "{account_id}:{license_key}" \
"https://geoip.maxmind.com/geoip/v2.1/city/me?pretty"
# Retrieve data for an arbitrary IP address.
curl -u "{account_id}:{license_key}" \
"https://geoip.maxmind.com/geoip/v2.1/city/{ip_address}?pretty"
```
### GeoIP Insights
```bash
# Retrieve data for your IP address.
curl -u "{account_id}:{license_key}" \
"https://geoip.maxmind.com/geoip/v2.1/insights/me?pretty"
# Retrieve data for an arbitrary IP address.
curl -u "{account_id}:{license_key}" \
"https://geoip.maxmind.com/geoip/v2.1/insights/{ip_address}?pretty"
```
### GeoLite Country
```bash
# Retrieve data for your IP address.
curl -u "{account_id}:{license_key}" \
"https://geolite.info/geoip/v2.1/country/me?pretty"
# Retrieve data for an arbitrary IP address.
curl -u "{account_id}:{license_key}" \
"https://geolite.info/geoip/v2.1/country/{ip_address}?pretty"
```
### GeoLite City
```bash
# Retrieve data for your IP address.
curl -u "{account_id}:{license_key}" \
"https://geolite.info/geoip/v2.1/city/me?pretty"
# Retrieve data for an arbitrary IP address.
curl -u "{account_id}:{license_key}" \
"https://geolite.info/geoip/v2.1/city/{ip_address}?pretty"
```
# Importing Databases
Source: https://dev.maxmind.com/geoip/importing-databases/
Learn how to import GeoIP and GeoLite CSV format databases into popular SQL
database platforms.
## Guides
- [PostgreSQL](/geoip/importing-databases/postgresql/index.md): Import databases to PostgreSQL.
- [MySQL](/geoip/importing-databases/mysql/index.md): Import databases to MySQL.
# Importing GeoIP and GeoLite databases to MySQL
Source: https://dev.maxmind.com/geoip/importing-databases/mysql/
> **⚠️ Warning**
>
> On Wednesday, November 27, 2024 we updated this tutorial to address an issue in
> which some IPv4 and IPv6 addresses could overlap. If you used a version of this
> tutorial prior to that date, please consult the updated instructions for
> querying the data in the following sections below:
>
> - [Test our table by querying it](/geoip/importing-databases/mysql/index.md#test-our-table-by-querying-it)
> - [Order the table for faster searching](/geoip/importing-databases/mysql/index.md#order-the-table-for-faster-searching)
> - [Break up our query for faster searching](/geoip/importing-databases/mysql/index.md#break-up-our-query-for-faster-searching)
This guide will show you how to import GeoIP or GeoLite databases into MySQL so
that they can be easily queried and manipulated on your server.
Importing a CSV database consists of downloading the database, extracting it,
creating tables to hold the data, and indexing those tables for faster querying.
## Download and extract the database
Begin by making sure you have downloaded the latest version of the GeoIP or
GeoLite database that you want to import. You can
[download databases through your account portal](https://www.maxmind.com/en/accounts/current/geoip/downloads).
CSV format databases are shipped as a single zip file. See our CSV database
documentation for details about the zip structure and contents of the archive.
For the purposes of this tutorial, we will be using the
[GeoIP City CSV file](/geoip/docs/databases/city-and-country/index.md#csv-databases),
but you can get information about
[any of our CSV format databases](/geoip/docs/databases/index.md) and adapt the following
instructions accordingly.
### Keep your database updated
If you are importing databases for use in an ongoing manner, you will want to
[automate the process of downloading and extracting the CSV files](/geoip/updating-databases/index.md#directly-downloading-databases)
so that you can be sure that your database is always up to date.
### Extract the CSV files
Once you have downloaded the database, unpack the zip file in your desired
directory. If you are importing the GeoIP City database, you will have a number
of files. In this tutorial we will be working with the following files:
- `GeoIP2-City-Blocks-IPv4.csv`
- `GeoIP2-City-Blocks-IPv6.csv`
- `GeoIP2-City-Locations-en.csv`
If you are working in a language other than English, you can choose the
appropriate `Locations` file from the zip archive. For example, if you want to
load Chinese location names into MySQL, you can use
`GeoIP2-City-Locations-zh-CN.csv` instead of `GeoIP2-City-Locations-en.csv`. Our
documentation on CSV format databases includes a
[list of all location files currently included in GeoIP and GeoLite databases](/geoip/docs/databases/city-and-country/index.md#locations-files).
## Create a table for network data
First we create a table to hold the network information contained in
`GeoIP2-City-Blocks-IPv4.csv` and `GeoIP2-City-Blocks-IPv6.csv`.
## Converting the network field
You can find the full description of the schema for these files in
[the section on `Blocks` files for GeoIP and GeoLite CSV databases](/geoip/docs/databases/city-and-country/index.md#blocks-files).
If you are working with a different database, you can find the `Blocks` file
schema [for the appropriate database](/geoip/docs/databases/index.md), and adapt the
table to meet that structure.
The `network` field of the database uses CIDR notation. Unfortunately MySQL
doesn't offer any capabilities to work with data in that format, so we'll first
have to convert the networks into something else that we can easily query later
on. We chose to represent networks as a pair of IP addresses that are the first
and last address in the network, respectively. We will convert this field so
that both of these IP addresses will be represented as hexadecimal numbers.
We can use the
[database conversion tool](/geoip/docs/databases/city-and-country/index.md#conversion-utility)
to convert this field to hexadecimal numbers. Once you have downloaded the
program and installed it to the same directory where you have extracted your CSV
files, you can run it:
```sh
$ ./geoip2-csv-converter -block-file GeoIP2-City-Blocks-IPv4.csv -include-hex-range -output-file GeoIP2-City-Blocks-IPv4-Hex.csv
$ ./geoip2-csv-converter -block-file GeoIP2-City-Blocks-IPv6.csv -include-hex-range -output-file GeoIP2-City-Blocks-IPv6-Hex.csv
```
## Schema
We can now create a table called `geoip2_network`to hold the data we just
converted. We'll represent the IP addresses using the type `varbinary(16)`,
which will be large enough to represent 128-bit (16 byte) IPv6 addresses.
```sql
create table geoip2_network (
network_start varbinary(16) not null,
network_end varbinary(16) not null,
geoname_id int,
registered_country_geoname_id int,
represented_country_geoname_id int,
is_anonymous_proxy bool,
is_satellite_provider bool,
postal_code text,
latitude float,
longitude float,
accuracy_radius int,
is_anycast bool,
index(network_start),
index(network_end)
);
```
Note that we're adding two separate indexes for `network_start` and
`network_end`. If we used a composite index over both columns, we wouldn't be
able to speed up the queries we'll be using later on.
### Load data into the network table
We can now import the contents of `GeoIP2-City-Blocks-IPv4.csv` and
`GeoIP2-City-Blocks-IPv6.csv` into the table we just created.
We'll start by loading the converted IPv6 data:
```sql
load data infile '/var/lib/mysql-files/GeoIP2-City-Blocks-IPv6-Hex.csv'
into table geoip2_network
fields terminated by ',' enclosed by '"' lines terminated by '\n' ignore 1 rows
(@network_start, @network_end, @geoname_id, @registered_country_geoname_id, @represented_country_geoname_id,
@is_anonymous_proxy, @is_satellite_provider, @postal_code, @latitude, @longitude, @accuracy_radius, @is_anycast)
set network_start = unhex(@network_start),
network_end = unhex(@network_end),
geoname_id = nullif(@geoname_id, ''),
registered_country_geoname_id = nullif(@registered_country_geoname_id, ''),
represented_country_geoname_id = nullif(@represented_country_geoname_id, ''),
is_anonymous_proxy = nullif(@is_anonymous_proxy, ''),
is_satellite_provider = nullif(@is_satellite_provider, ''),
postal_code = nullif(@postal_code, ''),
latitude = nullif(@latitude, ''),
longitude = nullif(@longitude, ''),
accuracy_radius = nullif(@accuracy_radius, ''),
is_anycast = nullif(@is_anycast, '');
```
We can load the converted IPv4 data in the same way:
```sql
load data infile '/var/lib/mysql-files/GeoIP2-City-Blocks-IPv4-Hex.csv'
into table geoip2_network
fields terminated by ',' enclosed by '"' lines terminated by '\n' ignore 1 rows
(@network_start, @network_end, @geoname_id, @registered_country_geoname_id, @represented_country_geoname_id,
@is_anonymous_proxy, @is_satellite_provider, @postal_code, @latitude, @longitude, @accuracy_radius, @is_anycast)
set network_start = unhex(@network_start),
network_end = unhex(@network_end),
geoname_id = nullif(@geoname_id, ''),
registered_country_geoname_id = nullif(@registered_country_geoname_id, ''),
represented_country_geoname_id = nullif(@represented_country_geoname_id, ''),
is_anonymous_proxy = nullif(@is_anonymous_proxy, ''),
is_satellite_provider = nullif(@is_satellite_provider, ''),
postal_code = nullif(@postal_code, ''),
latitude = nullif(@latitude, ''),
longitude = nullif(@longitude, ''),
accuracy_radius = nullif(@accuracy_radius, ''),
is_anycast = nullif(@is_anycast, '');
```
Note, the data will be imported even if the CSV file has extra columns that are
missing in the table.
### Test our table by querying it
With everything loaded we're now ready to look up an IP address in the database.
As we're representing IP addresses as `varbinary(16)`, we'll first have to
convert the textual representation of the IP address we're interested in to that
same type using MySQL's built-in `inet6_aton` function.
```sql
select geoname_id, registered_country_geoname_id, represented_country_geoname_id,
postal_code, latitude, longitude, accuracy_radius
from geoip2_network
where
length(inet6_aton('214.0.0.0')) = length(network_start)
and inet6_aton('214.0.0.0') between network_start and network_end
limit 1;
```
```markdown
+------------+-------------------------------+--------------------------------+-------------+----------+-----------+-----------------+
| geoname_id | registered_country_geoname_id | represented_country_geoname_id | postal_code | latitude | longitude | accuracy_radius |
+------------+-------------------------------+--------------------------------+-------------+----------+-----------+-----------------+
| 6252001 | 6252001 | NULL | NULL | 37.751 | -97.822 | 1000 |
+------------+-------------------------------+--------------------------------+-------------+----------+-----------+-----------------+
1 row in set (0.03 sec)
```
While that yields the correct results, we notice that the query performance
could be better. Let's improve it.
### Order the table for faster searching
One way of speeding up the query is the addition of `order by network_end` like
so:
```sql
select geoname_id, registered_country_geoname_id, represented_country_geoname_id,
postal_code, latitude, longitude, accuracy_radius
from geoip2_network
where
length(inet6_aton('214.0.0.0')) = length(network_start)
and inet6_aton('214.0.0.0') between network_start and network_end
order by network_end
limit 1;
```
```markdown
+------------+-------------------------------+--------------------------------+-------------+----------+-----------+-----------------+
| geoname_id | registered_country_geoname_id | represented_country_geoname_id | postal_code | latitude | longitude | accuracy_radius |
+------------+-------------------------------+--------------------------------+-------------+----------+-----------+-----------------+
| 6252001 | 6252001 | NULL | NULL | 37.751 | -97.822 | 1000 |
+------------+-------------------------------+--------------------------------+-------------+----------+-----------+-----------------+
1 row in set (0.00 sec)
```
While that addresses the performance concern we've had with the previous query,
this query will still perform poorly for addresses not contained in our GeoIP
database:
```sql
select geoname_id, registered_country_geoname_id, represented_country_geoname_id,
postal_code, latitude, longitude, accuracy_radius
from geoip2_network
where
length(inet6_aton('127.0.0.1')) = length(network_start)
and inet6_aton('127.0.0.1') between network_start and network_end
order by network_end
limit 1;
```
```markdown
Empty set (4.45 sec)
```
### Break up our query for faster searching
We can work around this problem by breaking our query up into two parts such
that MySQL will be able to use the indexes we've created more efficiently:
```sql
select geoname_id, registered_country_geoname_id, represented_country_geoname_id,
postal_code, latitude, longitude, accuracy_radius
from (
select *
from geoip2_network
where
length(inet6_aton('214.0.0.0')) = length(network_start)
and inet6_aton('214.0.0.0') >= network_start
order by network_start desc
limit 1
) net
where inet6_aton('214.0.0.0') <= network_end;
```
```markdown
+------------+-------------------------------+--------------------------------+-------------+----------+-----------+-----------------+
| geoname_id | registered_country_geoname_id | represented_country_geoname_id | postal_code | latitude | longitude | accuracy_radius |
+------------+-------------------------------+--------------------------------+-------------+----------+-----------+-----------------+
| 6252001 | 6252001 | NULL | NULL | 37.751 | -97.822 | 1000 |
+------------+-------------------------------+--------------------------------+-------------+----------+-----------+-----------------+
1 row in set (0.00 sec)
```
```sql
select geoname_id, registered_country_geoname_id, represented_country_geoname_id,
postal_code, latitude, longitude, accuracy_radius
from (
select *
from geoip2_network
where
length(inet6_aton('127.0.0.1')) = length(network_start)
and inet6_aton('127.0.0.1') >= network_start
order by network_start desc
limit 1
) net
where inet6_aton('127.0.0.1') <= network_end;
```
```markdown
Empty set (0.00 sec)
```
Using that construct gives us good query performance for all addresses,
regardless of whether or not the GeoIP database contains any information about
them. Depending on your application, you might want to consider encapsulating
this complexity/verbosity in a function. Alternatively, MySQL also offers
spatial data types that can be used to achieve similar performance while
allowing for queries to be expressed more naturally.
## Optional: Create a table for locations data
If `postal_code`, `latitude`, `longitude`, and `accuracy_radius` are everything
we're interested in we'd be done at this point and our application would be
easily able to query what it needs. However, GeoIP databases provide additional
location information. Note the `geoname_id` field in our network table. This
field can be used to look up additional information about the geolocation from
the `Locations` files we downloaded before. We'll load this data into MySQL
next.
### Locations table schema
We start by creating a table as before. As with the `Blocks` files, the schema
for GeoIP and GeoLite City locations files can be found in the
[CSV section of the database documentation](/geoip/docs/databases/city-and-country/index.md#locations-files).
We'll name this table `geoip2_location`:
```sql
create table geoip2_location (
geoname_id int not null,
locale_code text not null,
continent_code text,
continent_name text,
country_iso_code text,
country_name text,
subdivision_1_iso_code text,
subdivision_1_name text,
subdivision_2_iso_code text,
subdivision_2_name text,
city_name text,
metro_code int,
time_zone text,
is_in_european_union bool,
primary key (geoname_id, locale_code(5))
);
```
### Load data into the locations table
We then populate our `geoip2_location` table from a `Locations` CSV file. In
this case we will be populating the table from `GeoIP2-City-Locations-en.csv`.
Using the file with the `-en` suffix will give us the names of geolocations in
English:
```sql
load data infile '/var/lib/mysql-files/GeoIP2-City-Locations-en.csv'
into table geoip2_location
fields terminated by ',' enclosed by '"' lines terminated by '\n' ignore 1 rows (
geoname_id, locale_code, continent_code, continent_name,
@country_iso_code, @country_name, @subdivision_1_iso_code, @subdivision_1_name,
@subdivision_2_iso_code, @subdivision_2_name, @city_name, @metro_code, @time_zone,
is_in_european_union
)
set country_iso_code = nullif(@country_iso_code, ''),
country_name = nullif(@country_name, ''),
subdivision_1_iso_code = nullif(@subdivision_1_iso_code, ''),
subdivision_1_name = nullif(@subdivision_1_name, ''),
subdivision_2_iso_code = nullif(@subdivision_2_iso_code, ''),
subdivision_2_name = nullif(@subdivision_2_name, ''),
city_name = nullif(@city_name, ''),
metro_code = nullif(@metro_code, ''),
time_zone = nullif(@time_zone, '');
```
Note that there's a number of different `Locations` files available. The other
files with different language suffixes contain localized versions of the `-en`
data in different languages for some of the `geoname_id`s. Depending on your
application's needs you may decide to import additional `Locations` files into
localized tables. For example, you could load `GeoIP2-City-Locations-en.csv`
into a table called `geoip2_location-en`, and load
`GeoIP2-City-Locations-zh-CN.csv` into a table called `geoip2_location-zh`. You
could then query whichever locations table you needed for English or Chinese
respectively.
### Query our tables
We can now use our `geoip2_location` table to resolve the `geoname_id`s provided
by our `geoip2_network` table. For example:
```sql
select latitude, longitude, accuracy_radius, continent_name, country_name, subdivision_1_name, city_name
from (
select *
from geoip2_network
where
length(inet6_aton('214.0.0.0')) = length(network_start)
and inet6_aton('214.0.0.0') >= network_start
order by network_start desc
limit 1
) net
left join geoip2_location location on (
net.geoname_id = location.geoname_id and location.locale_code = 'en'
)
where inet6_aton('214.0.0.0') <= network_end;
```
```markdown
+----------+-----------+-----------------+----------------+---------------+--------------------+-----------+
| latitude | longitude | accuracy_radius | continent_name | country_name | subdivision_1_name | city_name |
+----------+-----------+-----------------+----------------+---------------+--------------------+-----------+
| 37.751 | -97.822 | 1000 | North America | United States | NULL | NULL |
+----------+-----------+-----------------+----------------+---------------+--------------------+-----------+
1 row in set (0.00 sec)
```
Here we were only interested in English results, but we can adjust our join
condition if we were interested in different or additional languages.
Note how a left outer join is used. This is because additional location
information might not be available for any given row of our `geoip2_network`
table. For example, some IP addresses cannot be resolved to a city or
subdivision. With the left join we'd still receive `latitude`, `longitude`, and
`accuracy_radius` as a result of our query if available, while an inner join
would result in zero rows if no additional location information was available.
In addition to the `geoname_id` column that provides location information for a
network, there's also `registered_country_geoname_id` and
`represented_country_geoname_id`, which provide location information about the
country in which the ISP has registered the network, and the country which is
represented by users of the IP address, respectively. The location data for both
can be included by additional joins:
```sql
select latitude, longitude, accuracy_radius,
location.continent_name as location_continent_name,
location.country_name as location_country_name,
location.subdivision_1_name as location_subdivision_1_name,
location.city_name as location_city_name,
registered_country.continent_name as registered_country_continent_name,
registered_country.country_name as registered_country_country_name,
represented_country.continent_name as represented_country_continent_name,
represented_country.country_name as represented_country_country_name
from (
select *
from geoip2_network
where
length(inet6_aton('214.0.0.0')) = length(network_start)
and inet6_aton('214.0.0.0') >= network_start
order by network_start desc
limit 1
) net
left join geoip2_location location on (
net.geoname_id = location.geoname_id and location.locale_code = 'en'
)
left join geoip2_location registered_country on (
net.registered_country_geoname_id = registered_country.geoname_id
and registered_country.locale_code = 'en'
)
left join geoip2_location represented_country on (
net.represented_country_geoname_id = represented_country.geoname_id
and represented_country.locale_code = 'en'
)
where inet6_aton('214.0.0.0') <= network_end;
```
```markdown
+----------+-----------+-----------------+-------------------------+-----------------------+-----------------------------+--------------------+-----------------------------------+---------------------------------+------------------------------------+----------------------------------+
| latitude | longitude | accuracy_radius | location_continent_name | location_country_name | location_subdivision_1_name | location_city_name | registered_country_continent_name | registered_country_country_name | represented_country_continent_name | represented_country_country_name |
+----------+-----------+-----------------+-------------------------+-----------------------+-----------------------------+--------------------+-----------------------------------+---------------------------------+------------------------------------+----------------------------------+
| 37.751 | -97.822 | 1000 | North America | United States | NULL | NULL | North America | United States | NULL | NULL |
+----------+-----------+-----------------+-------------------------+-----------------------+-----------------------------+--------------------+-----------------------------------+---------------------------------+------------------------------------+----------------------------------+
1 row in set (0.00 sec)
```
# Importing GeoIP and GeoLite databases to PostgreSQL
Source: https://dev.maxmind.com/geoip/importing-databases/postgresql/
This guide will show you how to import GeoIP or GeoLite databases into
PostgreSQL so that they can be easily queried and manipulated on your server.
Importing a CSV database consists of downloading the database, extracting it,
creating tables to hold the data, and indexing those tables for faster querying.
## Download and extract the database
Begin by making sure you have downloaded the latest version of the GeoIP or
GeoLite database that you want to import. You can
[download databases through your account portal](https://www.maxmind.com/en/accounts/current/geoip/downloads).
CSV format databases are shipped as a single zip file. See our CSV database
documentation for details about the zip structure and contents of the archive.
For the purposes of this tutorial, we will be using the
[GeoIP City CSV file](/geoip/docs/databases/city-and-country/index.md#csv-databases),
but you can get information about
[any of our CSV format databases](/geoip/docs/databases/index.md) and adapt the following
instructions accordingly.
### Keep your database updated
If you are importing databases for use in an ongoing manner, you will want to
[automate the process of downloading and extracting the CSV files](/geoip/updating-databases/index.md#directly-downloading-databases)
so that you can be sure that your database is always up to date.
### Extract the CSV files
Once you have downloaded the database, unpack the zip file in your desired
directory. If you are importing the GeoIP City database, you will have a number
of files. In this tutorial we will be working with the following files:
- `GeoIP2-City-Blocks-IPv4.csv`
- `GeoIP2-City-Blocks-IPv6.csv`
- `GeoIP2-City-Locations-en.csv`
If you are working in a language other than English, you can choose the
appropriate `Locations` file from the zip archive. For example, if you want to
load Chinese location names into PostgreSQL, you can use
`GeoIP2-City-Locations-zh-CN.csv` instead of `GeoIP2-City-Locations-en.csv`. Our
documentation on CSV format databases includes a
[list of all location files currently included in GeoIP and GeoLite databases](/geoip/docs/databases/city-and-country/index.md#locations-files).
## Create a table for network data
First we create a table to hold the network information contained in
`GeoIP2-City-Blocks-IPv4.csv` and `GeoIP2-City-Blocks-IPv6.csv`.
### Network table schema
You can find the full description of the schema for these files in
[the section on `Blocks` files for GeoIP and GeoLite CSV databases](/geoip/docs/databases/city-and-country/index.md#blocks-files).
If you are working with a different database, you can find the `Blocks` file
schema [for the appropriate database](/geoip/docs/databases/index.md), and adapt the
table to meet that structure.
Please note that we may add additional columns to the CSV version of our GeoIP
databases at any time. Ideally, you will design any automated integration to
check the columns of the CSV and build your table schema based on the actual
columns, or remove columns from the CSV that you don't need before importing.
The specific method for comparing the columns in the CSV file against the table
schema will depend on the language you're working with and how you wish to
handle additional data.
In this tutorial we will be creating a table to hold our network data called
`geoip2_network`. Note that we will be using PostgreSQL's
[`cidr`](https://www.postgresql.org/docs/current/datatype-net-types.html) type
for the `network` column. This will allow us to query the database more easily.
```sql
create table geoip2_network (
network cidr not null,
geoname_id int,
registered_country_geoname_id int,
represented_country_geoname_id int,
is_anonymous_proxy bool,
is_satellite_provider bool,
postal_code text,
latitude numeric,
longitude numeric,
accuracy_radius int,
is_anycast bool
);
```
### Load data into the network table
We can now import the contents of `GeoIP2-City-Blocks-IPv4.csv` and
`GeoIP2-City-Blocks-IPv6.csv` into the table we just created:
```sql
\copy geoip2_network from 'GeoIP2-City-Blocks-IPv4.csv' with (format csv, header);
```
```sql
\copy geoip2_network from 'GeoIP2-City-Blocks-IPv6.csv' with (format csv, header);
```
If there are errors such as `missing data for column` or
`extra data after last expected column`, alter the table to meet the CSV file
structure.
### Test our table by querying it
Remember that the table we created uses PostgreSQL's
[cidr](https://www.postgresql.org/docs/current/datatype-net-types.html) type for
the `network` column. This built-in type represents IPv4 and IPv6 networks and
provides
[operations](https://www.postgresql.org/docs/current/functions-net.html) to
(among other things) determine if a given host address is contained in a
network. For example:
```sql
select '192.168.0.0/24'::cidr >>= '192.168.0.1'; -- true
select '192.168.0.0/24'::cidr >>= '192.168.1.1'; -- false
```
We can use that to look up the `geoip2_network` entry for a given IP address
like so:
```sql
select * from geoip2_network where network >>= '214.0.0.0';
```
Which gives a result of:
```markdown
-[ RECORD 1 ]------------------+-------------
network | 214.0.0.0/16
geoname_id | 6252001
registered_country_geoname_id | 6252001
represented_country_geoname_id |
is_anonymous_proxy | f
is_satellite_provider | f
postal_code |
latitude | 37.7510
longitude | -97.8220
accuracy_radius | 1000
is_anycast | f
Time: 227.970 ms
```
### Index our table for faster searching
We can now look up an individual IP address's `latitude`, `longitude`, and
`accuracy_radius`. To improve our query speed, we'll create an index using
PostgreSQL's
[GiST](https://www.postgresql.org/docs/current/textsearch-indexes.html) indexing
method. For historical reasons, we also have to specify the
[inet_ops](https://www.postgresql.org/docs/9.5/gist-builtin-opclasses.html)
operator class:
```sql
create index on geoip2_network using gist (network inet_ops);
```
With that change we observe that the same query runs a lot faster:
```sql
select * from geoip2_network net where network >>= '214.0.0.0';
```
Which gives a result of:
```markdown
-[ RECORD 1 ]------------------+-------------
network | 214.0.0.0/16
geoname_id | 6252001
registered_country_geoname_id | 6252001
represented_country_geoname_id |
is_anonymous_proxy | f
is_satellite_provider | f
postal_code |
latitude | 37.7510
longitude | -97.8220
accuracy_radius | 1000
is_anycast | f
Time: 9.869 ms
```
You can now geolocate IP addresses using `latitude`, `longitude`, and
`accuracy_radius`. For more information about how to understand the
`accuracy_radius` field, see the
[article on geolocation accuracy our knowledge base](https://support.maxmind.com/knowledge-base/articles/maxmind-geolocation-accuracy).
## Optional: Create a table for locations data
If `postal_code`, `latitude`, `longitude`, and `accuracy_radius` are everything
we're interested in we'd be done at this point and our application would be
easily able to query what it needs. However, GeoIP databases provide additional
location information. Note the `geoname_id` field in our network table. This
field can be used to look up additional information about the geolocation from
the `Locations` files we downloaded before. We'll load this data into PostgreSQL
next.
### Locations table schema
We start by creating a table as before. As with the `Blocks` files, the schema
for GeoIP and GeoLite City locations files can be found in the
[CSV section of the database documentation](/geoip/docs/databases/city-and-country/index.md#locations-files).
We'll name this table `geoip2_location`:
```sql
create table geoip2_location (
geoname_id int not null,
locale_code text not null,
continent_code text,
continent_name text,
country_iso_code text,
country_name text,
subdivision_1_iso_code text,
subdivision_1_name text,
subdivision_2_iso_code text,
subdivision_2_name text,
city_name text,
metro_code int,
time_zone text,
is_in_european_union bool not null,
primary key (geoname_id, locale_code)
);
```
### Load data into the locations table
We then populate our `geoip2_location` table from a `Locations` CSV file. In
this case we will be populating the table from `GeoIP2-City-Locations-en.csv`.
Using the file with the `-en` suffix will give us the names of geolocations in
English:
```sql
\copy geoip2_location from 'GeoIP2-City-Locations-en.csv' with (format csv, header);
```
Note that there's a number of different `Locations` files available. The other
files with different language suffixes contain localized versions of the `-en`
data in different languages for some of the `geoname_id`s. Depending on your
application's needs you may decide to import additional `Locations` files into
localized tables. For example, you could load `GeoIP2-City-Locations-en.csv`
into a table called `geoip2_location-en`, and load
`GeoIP2-City-Locations-zh-CN.csv` into a table called `geoip2_location-zh`. You
could then query whichever locations table you needed for English or Chinese
respectively.
### Query our tables
We can now use our `geoip2_location` table to resolve the `geoname_id`s provided
by our `geoip2_network` table. For example:
```sql
select latitude, longitude, accuracy_radius, continent_name, country_name, subdivision_1_name, city_name
from geoip2_network net
left join geoip2_location location on (
net.geoname_id = location.geoname_id
and location.locale_code = 'en'
)
where network >>= '214.0.0.0';
```
Which gives a result of:
```markdown
-[ RECORD 1 ]------+--------------
latitude | 37.7510
longitude | -97.8220
accuracy_radius | 1000
continent_name | North America
country_name | United States
subdivision_1_name |
city_name |
```
Here we were only interested in English results, but we can adjust our join
condition if we were interested in different or additional languages.
Note how a left outer join is used. This is because additional location
information might not be available for any given row of our `geoip2_network`
table. For example, some IP addresses cannot be resolved to a city or
subdivision. With the left join we'd still receive `latitude`, `longitude`, and
`accuracy_radius` as a result of our query if available, while an inner join
would result in zero rows if no additional location information was available.
In addition to the `geoname_id` column that provides location information for a
network, there's also `registered_country_geoname_id` and
`represented_country_geoname_id`, which provide location information about the
country in which the ISP has registered the network, and the country which is
represented by users of the IP address, respectively. The location data for both
can be included by additional joins:
```sql
select latitude, longitude, accuracy_radius,
location.continent_name as location_continent_name,
location.country_name as location_country_name,
location.subdivision_1_name as location_subdivision_1_name,
location.city_name as location_city_name,
registered_country.continent_name as registered_country_continent_name,
registered_country.country_name as registered_country_country_name,
represented_country.continent_name as represented_country_continent_name,
represented_country.country_name as represented_country_country_name
from geoip2_network net
left join geoip2_location location on (
net.geoname_id = location.geoname_id
and location.locale_code = 'en'
)
left join geoip2_location registered_country on (
net.registered_country_geoname_id = registered_country.geoname_id
and registered_country.locale_code = 'en'
)
left join geoip2_location represented_country on (
net.represented_country_geoname_id = represented_country.geoname_id
and represented_country.locale_code = 'en'
)
where network >>= '214.0.0.0';
```
Which gives a result of:
```markdown
-[ RECORD 1 ]----------------------+--------------
latitude | 37.7510
longitude | -97.8220
accuracy_radius | 1000
location_continent_name | North America
location_country_name | United States
location_subdivision_1_name |
location_city_name |
registered_country_continent_name | North America
registered_country_country_name | United States
represented_country_continent_name |
represented_country_country_name |
```
# Privacy Exclusions API
Source: https://dev.maxmind.com/geoip/privacy-exclusions-api/
MaxMind maintains a list of Do Not Sell My Personal Information requests. This
API provides a simple way to retrieve
[privacy exclusion requests](https://www.maxmind.com/en/accounts/current/do-not-sell-requests)
in an automated fashion.
You can use the
[Privacy Exclusions OpenAPI specification](https://github.com/maxmind/openapi/blob/main/bundled/privacy-exclusions.yaml)
([raw file](https://raw.githubusercontent.com/maxmind/openapi/main/bundled/privacy-exclusions.yaml))
with API tools and code generators.
## Request
### Request URI
API calls should be made with an HTTP GET request to:
`https://api.maxmind.com/privacy/exclusions`
### Authorization/Security
We use
[basic HTTP authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).
The HTTP `Authorization` header is required for authorization. The username is
your
[MaxMind account ID](https://www.maxmind.com/en/accounts/current/license-key).
The password is your
[MaxMind license key](https://www.maxmind.com/en/accounts/current/license-key).
The authorization realm is `privacy-exclusion`.
The API is only available via HTTPS. Always use HTTPS, so that your credentials
are never transmitted unencrypted. If you attempt to access this service via
HTTP, you will receive a `403 Forbidden` HTTP response.
We require TLS 1.2 or greater for all requests to our servers to keep your data
secure.
### Request Parameters
The query string may include the following parameter:
| Key | Value Type | Description |
| --------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `updates_after` | RFC 3339 timestamp | If set, only updates made after this time will be returned. The value should be a valid [RFC 3339 timestamp](https://datatracker.ietf.org/doc/html/rfc3339), e.g., `2020-04-12T23:20:50.52Z`. |
URL-encode the `updates_after` value. If it has a `+` offset, send it as `%2B`,
or the service reads the `+` as a space and rejects the timestamp.
#### Example Request URL
`https://api.maxmind.com/privacy/exclusions?updates_after=2020-04-12T23:20:50.52Z`
## Response
### Response Headers
The `Content-Type` header will vary based on whether the request was successful
or not, and is detailed further in each of the two Response Body sections below.
The response will always include a `Content-Length` header.
### Response Body (for successful requests)
#### Example
```json
{
"exclusions": [
{
"exclusion_type": "ccpa_do_not_sell",
"data_type": "network",
"value": "10.0.26.166/32",
"last_updated":"2020-01-08T18:58:38Z"
},
...
]
}
```
#### Description
The `Content-Type` header for a successful response will be
`application/vnd.maxmind.com-privacy-exclusions+json; charset=UTF-8; version=1.0`
Data will be returned as a JSON document in UTF-8 encoding. The document will be
a JSON object including the `exclusions` key. Additional keys may be added in
the future.
The value for the `exclusions` key is an array of objects, each representing one
excluded network. One exclusion request for an IPv4 network appears as three
objects, as described below, so do not count the objects as separate requests.
Each IPv4 network appears three times in the array: as the IPv4 network, as the
IPv4-mapped IPv6 network (in `::ffff:0:0/96`), and as the 6to4 IPv6 network (in
`2002::/16`). For example, `203.0.113.3/32` also appears as
`::ffff:203.0.113.3/128` and `2002:cb00:7103::/48`. You should exclude all three
forms.
Each exclusion object in the `exclusions` array includes the following keys:
| Key | Value Type | Description |
| ---------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `exclusion_type` | enum | The governing law or rule that the exclusion was made under. Currently, the only valid type is `ccpa_do_not_sell` for the California Consumer Privacy Act’s “Do Not Sell My Personal Information” provision. |
| `data_type` | enum | The data type of the value being excluded. Currently, the only valid data type is `network`, which is an IP network in [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation); all IP addresses in the specified network should be excluded. You should always check this before using the associated `value`. In the future, additional types may be added. |
| `value` | string | The value being excluded. |
| `last_updated` | RFC 3339 timestamp | The time of the last update to the exclusion as an [RFC 3339 timestamp](https://datatracker.ietf.org/doc/html/rfc3339). |
Please note that additional keys may be added in the future.
### Response Body (for unsuccessful requests)
In the event an error occurs (the response indicates a 4xx or 5xx HTTP status),
the response may include a JSON document in the body. Some `4xx` errors and many
`5xx` errors do not include one. Before attempting to decode the body as JSON,
you should verify that the `Content-Type` of the error response is
`application/vnd.maxmind.com-error+json; charset=UTF-8; version=2.0`.
If the JSON document _is_ included in the response body, it will be an object
with the keys `code` and `error`. The `code` field is a static error code for
machine use. The value of any given `code` will never change, but `code`s can be
added or removed. The error field is a human-readable description of the error
and may change at any time.
In addition to the errors documented below, client code should also be prepared
to handle any valid HTTP 4xx or 5xx status code.
| Code Error | HTTP Status | Error Mode |
| --------------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| TIMESTAMP_INVALID | 400 Bad Request | The `updates_after` field must be in [RFC 3339 format](https://datatracker.ietf.org/doc/html/rfc3339). |
| AUTHORIZATION_INVALID | 401 Unauthorized | Your [account ID or license key](https://www.maxmind.com/en/accounts/current/license-key) could not be authenticated. |
| ACCOUNT_ID_REQUIRED | 401 Unauthorized | An [account ID and license key](https://www.maxmind.com/en/accounts/current/license-key) are required to use this service. |
| LICENSE_KEY_REQUIRED | 401 Unauthorized | An [account ID and license key](https://www.maxmind.com/en/accounts/current/license-key) are required to use this service. |
| PERMISSION_REQUIRED | 403 Forbidden | You do not have permission to use the service. Please [contact our support team](https://support.maxmind.com/knowledge-base) for more information. |
| (none) | 429 Too Many Requests | MaxMind rate-limited the request, usually because of excessive earlier error responses. The response may not include a JSON body. |
| SERVER_ERROR | 500 Internal Server Error | There was an error when processing this request. |
| _(none)_ | 503 Service Unavailable | There is a problem with the web service server. You can [check the status of our services](https://status.maxmind.com), or try this request again later. |
#### Example Response (for an unsuccessful request)
```json
{
"code": "ACCOUNT_ID_REQUIRED",
"error": "An account ID and license key are required to use this service."
}
```
# GeoIP Release Notes
Source: https://dev.maxmind.com/geoip/release-notes/
> **ℹ️ Info**
>
> [Sign up to be notified](https://comms.maxmind.com/geoip-rss-release-notes)
> whenever a new GeoIP release note is posted.
## Pages in this section
- 2026-11-03: [Updates to city-level geolocation information in GeoLite City](https://dev.maxmind.com/geoip/release-notes/2026-11-03-updates-to-city-level-geolocation-information-in-geolite-city/index.md)
- 2026-10-23: [Residential proxy confidence is lower for ISPs that share IPv4 addresses](https://dev.maxmind.com/geoip/release-notes/2026-10-23-residential-proxy-confidence-is-lower-for-isps-that-share-ipv4-addresses/index.md)
- 2026-10-21: [Significantly smaller file sizes for a number of databases](https://dev.maxmind.com/geoip/release-notes/2026-10-21-significantly-smaller-file-sizes-for-a-number-of-databases/index.md)
- 2026-10-13: [Update to build time for anonymous IP and anonymous plus datasets](https://dev.maxmind.com/geoip/release-notes/2026-10-13-update-to-build-time-for-anonymous-ip-and-anonymous-plus-datasets/index.md)
- 2026-10-13: [Elevated response times for web service requests experienced by some customers resolved](https://dev.maxmind.com/geoip/release-notes/2026-10-13-elevated-response-times-for-web-service-requests-experienced-by-some-customers-resolved/index.md)
- 2026-10-07: [Significantly smaller file sizes for GeoLite databases](https://dev.maxmind.com/geoip/release-notes/2026-10-07-significantly-smaller-file-sizes-for-geolite-databases/index.md)
- 2026-09-30: [Significantly smaller file sizes for a number of databases](https://dev.maxmind.com/geoip/release-notes/2026-09-30-significantly-smaller-file-sizes-for-a-number-of-databases/index.md)
- 2026-09-24: [Significantly smaller file sizes for a number of proxy databases](https://dev.maxmind.com/geoip/release-notes/2026-09-24-significantly-smaller-file-sizes-for-a-number-of-proxy-databases/index.md)
- 2026-09-11: [Elevated response times for web service requests experienced by some customers—resolved](https://dev.maxmind.com/geoip/release-notes/2026-09-11-elevated-response-times-for-web-service-requests-experienced-by-some-customers-resolved/index.md)
- 2026-08-31: [Download interruption incident—resolved](https://dev.maxmind.com/geoip/release-notes/2026-08-31-download-interruption-incident-resolved/index.md)
- 2026-08-27: [Residential proxy database now available as part of the GeoIP Anonymous Plus suite](https://dev.maxmind.com/geoip/release-notes/2026-08-27-residential-proxy-database-now-available-as-part-of-the-geoip-anonymous-plus-suite/index.md)
- 2026-07-17: [Updating the ISP name for a number of networks](https://dev.maxmind.com/geoip/release-notes/2026-07-17-updating-the-isp-name-for-a-number-of-networks/index.md)
- 2026-07-17: [New residential sub-object added to the anonymizer object](https://dev.maxmind.com/geoip/release-notes/2026-07-17-new-residential-sub-object-added-to-the-anonymizer-object/index.md)
- 2026-06-30: [GeoIP Legacy web service now returns HTTP status codes for errors](https://dev.maxmind.com/geoip/release-notes/2026-06-30-geoip-legacy-web-service-now-returns-http-status-codes-for-errors/index.md)
- 2026-06-24: [A number of networks now have an anonymizer confidence of 50](https://dev.maxmind.com/geoip/release-notes/2026-06-24-a-number-of-networks-now-have-an-anonymizer-confidence-of-50/index.md)
- 2026-06-11: [City field blanked in selected cities/provinces and countries](https://dev.maxmind.com/geoip/release-notes/2026-06-11-city-field-blanked-in-selected-cities-provinces-and-countries/index.md)
- 2026-05-29: [GeoIP ISP database and GeoIP Enterprise database release delayed](https://dev.maxmind.com/geoip/release-notes/2026-05-29-geoip-isp-database-and-geoip-enterprise-database-release-delayed/index.md)
- 2026-05-12: [Ongoing updates to VPN provider and network coverage in GeoIP Anonymous Plus](https://dev.maxmind.com/geoip/release-notes/2026-05-12-ongoing-updates-to-vpn-provider-and-network-coverage-in-geoip-anonymous-plus/index.md)
- 2026-05-11: [GeoIP Anonymous Plus won't be released as scheduled today](https://dev.maxmind.com/geoip/release-notes/2026-05-11-geoip-anonymous-plus-won-t-be-released-as-scheduled-today/index.md)
- 2026-05-05: [A number of networks now have a lower anonymizer confidence of 30](https://dev.maxmind.com/geoip/release-notes/2026-05-05-a-number-of-networks-now-have-a-lower-anonymizer-confidence-of-30/index.md)
- 2026-04-06: [Subdivision, city, and postal fields blanked in additional countries/cities](https://dev.maxmind.com/geoip/release-notes/2026-04-06-subdivision-city-and-postal-fields-blanked-in-additional-countries-cities/index.md)
- 2026-04-01: [GeoIP Connection Type database now released every weekday](https://dev.maxmind.com/geoip/release-notes/2026-04-01-geoip-connection-type-database-now-released-every-weekday/index.md)
- 2026-04-01: [Reduced country-level confidence value for hosting networks](https://dev.maxmind.com/geoip/release-notes/2026-04-01-reduced-country-level-confidence-value-for-hosting-networks/index.md)
- 2026-03-23: [Updates to geolocation confidence factors](https://dev.maxmind.com/geoip/release-notes/2026-03-23-updates-to-geolocation-confidence-factors/index.md)
- 2026-03-10: [A number of GeoIP databases not released as scheduled yesterday](https://dev.maxmind.com/geoip/release-notes/2026-03-10-a-number-of-geoip-databases-not-released-as-scheduled-yesterday/index.md)
- 2026-03-04: [Updates to user count data](https://dev.maxmind.com/geoip/release-notes/2026-03-04-updates-to-user-count-data/index.md)
- 2026-02-27: [Removing a number of suffixes in ISP/org name](https://dev.maxmind.com/geoip/release-notes/2026-02-27-removing-a-number-of-suffixes-in-isp-org-name/index.md)
- 2026-02-19: [GeoNames monthly diff report February 2026](https://dev.maxmind.com/geoip/release-notes/2026-02-19-geonames-monthly-diff-report-february-2026/index.md)
- 2026-02-18: [Changes to the GeoNames monthly diff report delivery method](https://dev.maxmind.com/geoip/release-notes/2026-02-18-changes-to-the-geonames-monthly-diff-report-delivery-method/index.md)
- 2026-01-28: [Updates to autonomous_system_organization, ISP, and organization data](https://dev.maxmind.com/geoip/release-notes/2026-01-28-updates-to-autonomous-system-organization-isp-and-organization-data/index.md)
- 2026-01-22: [Update to Japan NTT networks ISP/org name](https://dev.maxmind.com/geoip/release-notes/2026-01-22-update-to-japan-ntt-networks-isp-org-name/index.md)
- 2026-01-14: [GeoNames monthly diff report January 2026](https://dev.maxmind.com/geoip/release-notes/2026-01-14-geonames-monthly-diff-report-january-2026/index.md)
- 2026-01-06: [Subdivision, city, and postal fields blanked in additional countries](https://dev.maxmind.com/geoip/release-notes/2026-01-06-subdivision-city-and-postal-fields-blanked-in-additional-countries/index.md)
- 2025-12-17: [Subdivision, city, and postal fields blanked in additional countries](https://dev.maxmind.com/geoip/release-notes/2025-12-17-subdivision-city-and-postal-fields-blanked-in-additional-countries/index.md)
- 2025-12-15: [GeoIP Location database releases delayed](https://dev.maxmind.com/geoip/release-notes/2025-12-15-geoip-location-database-releases-delayed/index.md)
- 2025-12-10: [GeoNames monthly diff report December 2025](https://dev.maxmind.com/geoip/release-notes/2025-12-10-geonames-monthly-diff-report-december-2025/index.md)
- 2025-11-28: [Subdivision, city, and postal fields blanked in additional countries](https://dev.maxmind.com/geoip/release-notes/2025-11-28-subdivision-city-and-postal-fields-blanked-in-additional-countries/index.md)
- 2025-11-20: [IP risk snapshot output added to traits object in the Insights web services](https://dev.maxmind.com/geoip/release-notes/2025-11-20-ip-risk-snapshot-output-added-to-traits-object-in-the-insights-web-services/index.md)
- 2025-11-19: [New anonymizer data added to web services](https://dev.maxmind.com/geoip/release-notes/2025-11-19-new-anonymizer-data-added-to-web-services/index.md)
- 2025-11-18: [Subdivision, city, and postal fields blanked in selected cities and countries](https://dev.maxmind.com/geoip/release-notes/2025-11-18-subdivision-city-and-postal-fields-blanked-in-selected-cities-and-countries/index.md)
- 2025-11-18: [GeoNames monthly diff report November 2025](https://dev.maxmind.com/geoip/release-notes/2025-11-18-geonames-monthly-diff-report-november-2025/index.md)
- 2025-11-11: [A number of GeoIP databases not released as scheduled yesterday](https://dev.maxmind.com/geoip/release-notes/2025-11-11-a-number-of-geoip-databases-not-released-as-scheduled-yesterday/index.md)
- 2025-11-10: [[Update] Upcoming change to identify Verizon 5G Home as a separate ISP](https://dev.maxmind.com/geoip/release-notes/2025-11-10-update-upcoming-change-to-identify-verizon-5g-home-as-a-separate-isp/index.md)
- 2025-11-06: [Subdivision, city, and postal fields blanked in selected large cities](https://dev.maxmind.com/geoip/release-notes/2025-11-06-subdivision-city-and-postal-fields-blanked-in-selected-large-cities/index.md)
- 2025-11-03: [Subdivision, city, and postal fields to be blanked in Tokyo metro area in some cases](https://dev.maxmind.com/geoip/release-notes/2025-11-03-subdivision-city-and-postal-fields-to-be-blanked-in-tokyo-metro-area-in-some-cases/index.md)
- 2025-11-03: [Upcoming change to identify Verizon 5G Home as a separate ISP](https://dev.maxmind.com/geoip/release-notes/2025-11-03-upcoming-change-to-identify-verizon-5g-home-as-a-separate-isp/index.md)
- 2025-10-23: [GeoNames monthly diff report October 2025](https://dev.maxmind.com/geoip/release-notes/2025-10-23-geonames-monthly-diff-report-october-2025/index.md)
- 2025-10-21: [GeoIP Anonymous IP, GeoIP Anonymous Plus, and GeoIP IP Risk databases not released as scheduled yesterday](https://dev.maxmind.com/geoip/release-notes/2025-10-21-geoip-anonymous-ip-geoip-anonymous-plus-and-geoip-ip-risk-databases-not-released-as-scheduled-yesterday/index.md)
- 2025-10-14: [GeoIP Anonymous Plus database size decrease](https://dev.maxmind.com/geoip/release-notes/2025-10-14-geoip-anonymous-plus-database-size-decrease/index.md)
- 2025-09-22: [A number of GeoIP database releases delayed](https://dev.maxmind.com/geoip/release-notes/2025-09-22-a-number-of-geoip-database-releases-delayed/index.md)
- 2025-08-28: [No GeoNames monthly diff report for August 2025](https://dev.maxmind.com/geoip/release-notes/2025-08-28-no-geonames-monthly-diff-report-for-august-2025/index.md)
- 2025-08-13: [Upcoming ISP name change for a subset of AT&T Wireless networks](https://dev.maxmind.com/geoip/release-notes/2025-08-13-upcoming-isp-name-change-for-a-subset-of-at-t-wireless-networks/index.md)
- 2025-08-11: [Several GeoIP databases not released as scheduled today](https://dev.maxmind.com/geoip/release-notes/2025-08-11-several-geoip-databases-not-released-as-scheduled-today/index.md)
- 2025-07-29: [Postal code formatting in a number of GeoIP databases](https://dev.maxmind.com/geoip/release-notes/2025-07-29-postal-code-formatting-in-a-number-of-geoip-databases/index.md)
- 2025-07-16: [A number of GeoIP databases now released every weekday](https://dev.maxmind.com/geoip/release-notes/2025-07-16-a-number-of-geoip-databases-now-released-every-weekday/index.md)
- 2025-07-14: [GeoNames monthly diff report July 2025](https://dev.maxmind.com/geoip/release-notes/2025-07-14-geonames-monthly-diff-report-july-2025/index.md)
- 2025-07-07: [Download interruption incident—resolved](https://dev.maxmind.com/geoip/release-notes/2025-07-07-download-interruption-incident-resolved/index.md)
- 2025-06-16: [Off schedule release for a number of GeoIP and GeoLite databases](https://dev.maxmind.com/geoip/release-notes/2025-06-16-off-schedule-release-for-a-number-of-geoip-and-geolite-databases/index.md)
- 2025-06-10: [GeoNames monthly diff report June 2025](https://dev.maxmind.com/geoip/release-notes/2025-06-10-geonames-monthly-diff-report-june-2025/index.md)
- 2025-05-28: [Off-schedule release for GeoIP City, Country, Enterprise, ISP, and GeoLite databases](https://dev.maxmind.com/geoip/release-notes/2025-05-28-off-schedule-release-for-geoip-city-country-enterprise-isp-and-geolite-databases/index.md)
- 2025-05-20: [GeoNames monthly diff report May 2025](https://dev.maxmind.com/geoip/release-notes/2025-05-20-geonames-monthly-diff-report-may-2025/index.md)
- 2025-05-13: [GeoLite City and Country database releases delayed](https://dev.maxmind.com/geoip/release-notes/2025-05-13-geolite-city-and-country-database-releases-delayed/index.md)
- 2025-05-07: [GeoLite City and GeoLite Country database releases delayed](https://dev.maxmind.com/geoip/release-notes/2025-05-07-geolite-city-and-geolite-country-database-releases-delayed/index.md)
- 2025-05-05: [Resolved - Postal code validation bug](https://dev.maxmind.com/geoip/release-notes/2025-05-05-resolved-postal-code-validation-bug/index.md)
- 2025-05-01: [Postal code validation bug](https://dev.maxmind.com/geoip/release-notes/2025-05-01-postal-code-validation-bug/index.md)
- 2025-04-16: [Upcoming changes to ISP names](https://dev.maxmind.com/geoip/release-notes/2025-04-16-upcoming-changes-to-isp-names/index.md)
- 2025-04-08: [GeoNames monthly diff report April 2025](https://dev.maxmind.com/geoip/release-notes/2025-04-08-geonames-monthly-diff-report-april-2025/index.md)
- 2025-03-13: [Generate custom CSVs with the latest mmdbinspect release](https://dev.maxmind.com/geoip/release-notes/2025-03-13-generate-custom-csvs-with-the-latest-mmdbinspect-release/index.md)
- 2025-03-10: [GeoNames monthly diff report March 2025](https://dev.maxmind.com/geoip/release-notes/2025-03-10-geonames-monthly-diff-report-march-2025/index.md)
- 2025-03-04: [Increase in geolocation database sizes](https://dev.maxmind.com/geoip/release-notes/2025-03-04-increase-in-geolocation-database-sizes/index.md)
- 2025-02-17: [GeoIP Anonymous IP database release delayed](https://dev.maxmind.com/geoip/release-notes/2025-02-17-geoip-anonymous-ip-database-release-delayed/index.md)
- 2025-02-11: [GeoNames monthly diff report February 2025](https://dev.maxmind.com/geoip/release-notes/2025-02-11-geonames-monthly-diff-report-february-2025/index.md)
- 2025-02-10: [Removal of deprecated fields](https://dev.maxmind.com/geoip/release-notes/2025-02-10-removal-of-deprecated-fields/index.md)
- 2025-02-05: [Update—Identifying Verizon 5g Home Internet](https://dev.maxmind.com/geoip/release-notes/2025-02-05-update-identifying-verizon-5g-home-internet/index.md)
- 2025-01-27: [Identifying Verizon 5g Home Internet](https://dev.maxmind.com/geoip/release-notes/2025-01-27-identifying-verizon-5g-home-internet/index.md)
- 2025-01-21: [metro_code deprecation in GeoIP](https://dev.maxmind.com/geoip/release-notes/2025-01-21-metro-code-deprecation-in-geoip/index.md)
- 2025-01-09: [GeoNames monthly diff report January 2025](https://dev.maxmind.com/geoip/release-notes/2025-01-09-geonames-monthly-diff-report-january-2025/index.md)
- 2024-12-19: [GeoNames monthly diff report December 2024](https://dev.maxmind.com/geoip/release-notes/2024-12-19-geonames-monthly-diff-report-december-2024/index.md)
- 2024-12-19: [GeoLite data now available through the Snowflake Marketplace](https://dev.maxmind.com/geoip/release-notes/2024-12-19-geolite-data-now-available-through-the-snowflake-marketplace/index.md)
- 2024-12-11: [Enhancements to geolocation confidence factors](https://dev.maxmind.com/geoip/release-notes/2024-12-11-enhancements-to-geolocation-confidence-factors/index.md)
- 2024-12-05: [Update to CenturyLink ISP name](https://dev.maxmind.com/geoip/release-notes/2024-12-05-update-to-centurylink-isp-name/index.md)
- 2024-12-04: [Upcoming changes to ISP names](https://dev.maxmind.com/geoip/release-notes/2024-12-04-upcoming-changes-to-isp-names/index.md)
- 2024-12-03: [Several Spectrum Business networks reclassified](https://dev.maxmind.com/geoip/release-notes/2024-12-03-several-spectrum-business-networks-reclassified/index.md)
- 2024-12-02: [Updated MySQL tutorial](https://dev.maxmind.com/geoip/release-notes/2024-12-02-updated-mysql-tutorial/index.md)
- 2024-11-26: [Updated ISP and Organization name for Dish Wireless](https://dev.maxmind.com/geoip/release-notes/2024-11-26-updated-isp-and-organization-name-for-dish-wireless/index.md)
- 2024-11-15: [Upcoming changes to ISP names](https://dev.maxmind.com/geoip/release-notes/2024-11-15-upcoming-changes-to-isp-names/index.md)
- 2024-11-14: [GeoNames monthly diff report November 2024](https://dev.maxmind.com/geoip/release-notes/2024-11-14-geonames-monthly-diff-report-november-2024/index.md)
- 2024-11-01: [Postal code data now available for Indonesia and Vietnam](https://dev.maxmind.com/geoip/release-notes/2024-11-01-postal-code-data-now-available-for-indonesia-and-vietnam/index.md)
- 2024-10-23: [Improvement to subdivision confidence factors](https://dev.maxmind.com/geoip/release-notes/2024-10-23-improvement-to-subdivision-confidence-factors/index.md)
- 2024-10-18: [Updated ISP and Organization name for Free Mobile SAS](https://dev.maxmind.com/geoip/release-notes/2024-10-18-updated-isp-and-organization-name-for-free-mobile-sas/index.md)
- 2024-10-16: [Updated ISP and Organization name for OVH](https://dev.maxmind.com/geoip/release-notes/2024-10-16-updated-isp-and-organization-name-for-ovh/index.md)
- 2024-10-15: [Update to several ISP names](https://dev.maxmind.com/geoip/release-notes/2024-10-15-update-to-several-isp-names/index.md)
- 2024-10-11: [GeoNames monthly diff report October 2024](https://dev.maxmind.com/geoip/release-notes/2024-10-11-geonames-monthly-diff-report-october-2024/index.md)
- 2024-10-09: [Upcoming improvements to user count data](https://dev.maxmind.com/geoip/release-notes/2024-10-09-upcoming-improvements-to-user-count-data/index.md)
- 2024-09-10: [GeoNames monthly diff report September 2024](https://dev.maxmind.com/geoip/release-notes/2024-09-10-geonames-monthly-diff-report-september-2024/index.md)
- 2024-08-16: [Improved confidence factor scores](https://dev.maxmind.com/geoip/release-notes/2024-08-16-improved-confidence-factor-scores/index.md)
- 2024-08-13: [Increase in geolocation database sizes](https://dev.maxmind.com/geoip/release-notes/2024-08-13-increase-in-geolocation-database-sizes/index.md)
- 2024-08-12: [Off-schedule release for the GeoIP City, GeoIP Country, and GeoIP Enterprise databases](https://dev.maxmind.com/geoip/release-notes/2024-08-12-off-schedule-release-for-the-geoip-city-geoip-country-and-geoip-enterprise-databases/index.md)
- 2024-08-12: [Updated postal codes for some cities in Portugal](https://dev.maxmind.com/geoip/release-notes/2024-08-12-updated-postal-codes-for-some-cities-in-portugal/index.md)
- 2024-08-12: [GeoNames monthly diff report August 2024](https://dev.maxmind.com/geoip/release-notes/2024-08-12-geonames-monthly-diff-report-august-2024/index.md)
- 2024-08-02: [Canceled release for GeoLite City and GeoLite Country databases](https://dev.maxmind.com/geoip/release-notes/2024-08-02-canceled-release-for-geolite-city-and-geolite-country-databases/index.md)
- 2024-07-26: [MCC/MNC data available again in GeoIP ISP and Enterprise databases](https://dev.maxmind.com/geoip/release-notes/2024-07-26-mcc-mnc-data-available-again-in-geoip-isp-and-enterprise-databases/index.md)
- 2024-07-26: [Missing MCC/MNC data in GeoIP ISP and Enterprise databases](https://dev.maxmind.com/geoip/release-notes/2024-07-26-missing-mcc-mnc-data-in-geoip-isp-and-enterprise-databases/index.md)
- 2024-07-23: [Off-schedule release for the GeoIP2 City and GeoIP2 Country databases](https://dev.maxmind.com/geoip/release-notes/2024-07-23-off-schedule-release-for-the-geoip2-city-and-geoip2-country-databases/index.md)
- 2024-07-10: [Increase in the number of English place names with non-ASCII characters in GeoIP® products and services](https://dev.maxmind.com/geoip/release-notes/2024-07-10-increase-in-the-number-of-english-place-names-with-non-ascii-characters-in-geoip-products-and-services/index.md)
- 2024-07-08: [GeoNames monthly diff report July 2024](https://dev.maxmind.com/geoip/release-notes/2024-07-08-geonames-monthly-diff-report-july-2024/index.md)
- 2024-06-27: [Upcoming changes to ISP names](https://dev.maxmind.com/geoip/release-notes/2024-06-27-upcoming-changes-to-isp-names/index.md)
- 2024-06-18: [Change to GeoLite2 ASN update schedule](https://dev.maxmind.com/geoip/release-notes/2024-06-18-change-to-geolite2-asn-update-schedule/index.md)
- 2024-06-10: [GeoNames monthly diff report June 2024](https://dev.maxmind.com/geoip/release-notes/2024-06-10-geonames-monthly-diff-report-june-2024/index.md)
- 2024-05-09: [GeoNames monthly diff report May 2024](https://dev.maxmind.com/geoip/release-notes/2024-05-09-geonames-monthly-diff-report-may-2024/index.md)
- 2024-04-08: [Upcoming changes to our TLS certificates may impact customers with unusual server configuration](https://dev.maxmind.com/geoip/release-notes/2024-04-08-upcoming-changes-to-our-tls-certificates-may-impact-customers-with-unusual-server-configuration/index.md)
- 2024-04-04: [GeoNames monthly diff report April 2024](https://dev.maxmind.com/geoip/release-notes/2024-04-04-geonames-monthly-diff-report-april-2024/index.md)
- 2024-03-18: [GeoNames monthly diff report March 2024](https://dev.maxmind.com/geoip/release-notes/2024-03-18-geonames-monthly-diff-report-march-2024/index.md)
- 2024-03-13: [API policies are now permanently enforced](https://dev.maxmind.com/geoip/release-notes/2024-03-13-api-policies-are-now-permanently-enforced/index.md)
- 2024-02-13: [No GeoNames monthly diff report for February 2024](https://dev.maxmind.com/geoip/release-notes/2024-02-13-no-geonames-monthly-diff-report-for-february-2024/index.md)
- 2024-01-25: [API policies - temporary enforcement on February 7, 2024](https://dev.maxmind.com/geoip/release-notes/2024-01-25-api-policies-temporary-enforcement-on-february-7-2024/index.md)
- 2024-01-17: [Presigned URLs for database downloads](https://dev.maxmind.com/geoip/release-notes/2024-01-17-presigned-urls-for-database-downloads/index.md)
- 2024-01-17: [Anycast flag available for CSV format databases](https://dev.maxmind.com/geoip/release-notes/2024-01-17-anycast-flag-available-for-csv-format-databases/index.md)
- 2024-01-08: [GeoNames monthly diff report January 2024](https://dev.maxmind.com/geoip/release-notes/2024-01-08-geonames-monthly-diff-report-january-2024/index.md)
- 2023-12-12: [December Holiday Database Release Schedule](https://dev.maxmind.com/geoip/release-notes/2023-12-12-december-holiday-database-release-schedule/index.md)
- 2023-12-11: [Anycast flag available for GeoIP web services and databases](https://dev.maxmind.com/geoip/release-notes/2023-12-11-anycast-flag-available-for-geoip-web-services-and-databases/index.md)
- 2023-12-11: [GeoNames Monthly Diff Report December 2023](https://dev.maxmind.com/geoip/release-notes/2023-12-11-geonames-monthly-diff-report-december-2023/index.md)
- 2023-12-08: [Update to Suddenlink ISP name](https://dev.maxmind.com/geoip/release-notes/2023-12-08-update-to-suddenlink-isp-name/index.md)
- 2023-12-07: [Anycast flag releasing soon for GeoIP web services and databases](https://dev.maxmind.com/geoip/release-notes/2023-12-07-anycast-flag-releasing-soon-for-geoip-web-services-and-databases/index.md)
- 2023-11-29: [Improved postal resolution and accuracy in GeoIP products and services](https://dev.maxmind.com/geoip/release-notes/2023-11-29-improved-postal-resolution-and-accuracy-in-geoip-products-and-services/index.md)
- 2023-11-29: [Update to KDDI Japanese ISP name](https://dev.maxmind.com/geoip/release-notes/2023-11-29-update-to-kddi-japanese-isp-name/index.md)
- 2023-11-29: [Updated static IP scoring for IPv6 addresses](https://dev.maxmind.com/geoip/release-notes/2023-11-29-updated-static-ip-scoring-for-ipv6-addresses/index.md)
- 2023-11-15: [Special release of our geolocation databases](https://dev.maxmind.com/geoip/release-notes/2023-11-15-special-release-of-our-geolocation-databases/index.md)
- 2023-11-06: [More non-ASCII characters in English place names in GeoIP products and services](https://dev.maxmind.com/geoip/release-notes/2023-11-06-more-non-ascii-characters-in-english-place-names-in-geoip-products-and-services/index.md)
- 2023-10-17: [Cloudflare WARP will be identified as a consumer privacy network](https://dev.maxmind.com/geoip/release-notes/2023-10-17-cloudflare-warp-will-be-identified-as-a-consumer-privacy-network/index.md)
- 2023-10-05: [GeoNames Monthly Diff Report October 2023](https://dev.maxmind.com/geoip/release-notes/2023-10-05-geonames-monthly-diff-report-october-2023/index.md)
- 2023-09-05: [GeoNames Monthly Diff Report September 2023](https://dev.maxmind.com/geoip/release-notes/2023-09-05-geonames-monthly-diff-report-september-2023/index.md)
- 2023-08-28: [New Satellite connection type releasing](https://dev.maxmind.com/geoip/release-notes/2023-08-28-new-satellite-connection-type-releasing/index.md)
- 2023-08-17: [API policies - temporary enforcement on October 17, 2023](https://dev.maxmind.com/geoip/release-notes/2023-08-17-api-policies-temporary-enforcement-on-october-17-2023/index.md)
- 2023-08-10: [GeoNames Monthly Diff Report August 2023](https://dev.maxmind.com/geoip/release-notes/2023-08-10-geonames-monthly-diff-report-august-2023/index.md)
- 2023-08-03: [Resolving more networks to borough of Queens, New York](https://dev.maxmind.com/geoip/release-notes/2023-08-03-resolving-more-networks-to-borough-of-queens-new-york/index.md)
- 2023-08-01: [New Satellite connection type](https://dev.maxmind.com/geoip/release-notes/2023-08-01-new-satellite-connection-type/index.md)
- 2023-07-10: [GeoNames Monthly Diff Report July 2023](https://dev.maxmind.com/geoip/release-notes/2023-07-10-geonames-monthly-diff-report-july-2023/index.md)
- 2023-06-14: [Twice weekly updates for the GeoIP Domain Name database](https://dev.maxmind.com/geoip/release-notes/2023-06-14-twice-weekly-updates-for-the-geoip-domain-name-database/index.md)
- 2023-06-12: [Correction regarding London boroughs in our geolocation data](https://dev.maxmind.com/geoip/release-notes/2023-06-12-correction-regarding-london-boroughs-in-our-geolocation-data/index.md)
- 2023-06-12: [Delayed update for GeoIP Anonymous IP database](https://dev.maxmind.com/geoip/release-notes/2023-06-12-delayed-update-for-geoip-anonymous-ip-database/index.md)
- 2023-06-12: [GeoNames Monthly Diff Report June 2023](https://dev.maxmind.com/geoip/release-notes/2023-06-12-geonames-monthly-diff-report-june-2023/index.md)
- 2023-06-06: [More networks mapped to London boroughs](https://dev.maxmind.com/geoip/release-notes/2023-06-06-more-networks-mapped-to-london-boroughs/index.md)
- 2023-05-10: [GeoNames Monthly Diff Report May 2023](https://dev.maxmind.com/geoip/release-notes/2023-05-10-geonames-monthly-diff-report-may-2023/index.md)
- 2023-05-04: [Off-schedule GeoIP Domain database update](https://dev.maxmind.com/geoip/release-notes/2023-05-04-off-schedule-geoip-domain-database-update/index.md)
- 2023-04-12: [New update schedule for GeoIP Domain database](https://dev.maxmind.com/geoip/release-notes/2023-04-12-new-update-schedule-for-geoip-domain-database/index.md)
- 2023-04-10: [GeoNames Monthly Diff Report April 2023](https://dev.maxmind.com/geoip/release-notes/2023-04-10-geonames-monthly-diff-report-april-2023/index.md)
- 2023-03-20: [Issue Geolocating IPs in Portugal](https://dev.maxmind.com/geoip/release-notes/2023-03-20-issue-geolocating-ips-in-portugal/index.md)
- 2023-03-16: [Changes to MaxMind License Keys](https://dev.maxmind.com/geoip/release-notes/2023-03-16-changes-to-maxmind-license-keys/index.md)
- 2023-03-13: [GeoNames Monthly Diff Report March 2023](https://dev.maxmind.com/geoip/release-notes/2023-03-13-geonames-monthly-diff-report-march-2023/index.md)
- 2023-03-06: [Geolocate Tor Exit Nodes in GeoIP and GeoLite](https://dev.maxmind.com/geoip/release-notes/2023-03-06-geolocate-tor-exit-nodes-in-geoip-and-geolite/index.md)
- 2023-02-21: [GeoNames Monthly Diff Report February 2023](https://dev.maxmind.com/geoip/release-notes/2023-02-21-geonames-monthly-diff-report-february-2023/index.md)
- 2023-01-23: [Change to AT&T ISP name](https://dev.maxmind.com/geoip/release-notes/2023-01-23-change-to-at-t-isp-name/index.md)
- 2023-01-11: [GeoNames Monthly Diff Report January 2023](https://dev.maxmind.com/geoip/release-notes/2023-01-11-geonames-monthly-diff-report-january-2023/index.md)
- 2022-12-19: [December Holiday Database Release Schedule](https://dev.maxmind.com/geoip/release-notes/2022-12-19-december-holiday-database-release-schedule/index.md)
- 2022-12-19: [Twice weekly updates for the GeoIP Connection Type database](https://dev.maxmind.com/geoip/release-notes/2022-12-19-twice-weekly-updates-for-the-geoip-connection-type-database/index.md)
- 2022-12-12: [GeoNames Monthly Diff Report December 2022](https://dev.maxmind.com/geoip/release-notes/2022-12-12-geonames-monthly-diff-report-december-2022/index.md)
- 2022-11-21: [No Friday Updates for GeoIP2 Databases](https://dev.maxmind.com/geoip/release-notes/2022-11-21-no-friday-updates-for-geoip2-databases/index.md)
- 2022-11-10: [GeoNames Monthly Diff Report November 2022](https://dev.maxmind.com/geoip/release-notes/2022-11-10-geonames-monthly-diff-report-november-2022/index.md)
- 2022-10-11: [MaxMind Sandbox has Launched](https://dev.maxmind.com/geoip/release-notes/2022-10-11-maxmind-sandbox-has-launched/index.md)
- 2022-10-11: [GeoNames Monthly Diff Report October 2022](https://dev.maxmind.com/geoip/release-notes/2022-10-11-geonames-monthly-diff-report-october-2022/index.md)
- 2022-09-26: [Changes to Registered Country data](https://dev.maxmind.com/geoip/release-notes/2022-09-26-changes-to-registered-country-data/index.md)
- 2022-09-14: [Change to Time Zone Name for Ukraine](https://dev.maxmind.com/geoip/release-notes/2022-09-14-change-to-time-zone-name-for-ukraine/index.md)
- 2022-09-12: [GeoNames Monthly Diff Report September 2022](https://dev.maxmind.com/geoip/release-notes/2022-09-12-geonames-monthly-diff-report-september-2022/index.md)
- 2022-09-12: [Geolocation Bug Fix Complete](https://dev.maxmind.com/geoip/release-notes/2022-09-12-geolocation-bug-fix-complete/index.md)
- 2022-09-07: [Updated GeoIP2 Enterprise Database Available](https://dev.maxmind.com/geoip/release-notes/2022-09-07-updated-geoip2-enterprise-database-available/index.md)
- 2022-09-07: [Updated GeoIP2 City Database Available](https://dev.maxmind.com/geoip/release-notes/2022-09-07-updated-geoip2-city-database-available/index.md)
- 2022-09-07: [Geolocation Coordinate Bug Fix](https://dev.maxmind.com/geoip/release-notes/2022-09-07-geolocation-coordinate-bug-fix/index.md)
- 2022-08-17: [GeoNames Monthly Diff Report August 2022](https://dev.maxmind.com/geoip/release-notes/2022-08-17-geonames-monthly-diff-report-august-2022/index.md)
- 2022-07-11: [GeoNames Monthly Diff Report July 2022](https://dev.maxmind.com/geoip/release-notes/2022-07-11-geonames-monthly-diff-report-july-2022/index.md)
- 2022-06-15: [GeoNames Monthly Diff Report June 2022](https://dev.maxmind.com/geoip/release-notes/2022-06-15-geonames-monthly-diff-report-june-2022/index.md)
- 2022-06-01: [GeoIP Legacy databases have been retired](https://dev.maxmind.com/geoip/release-notes/2022-06-01-geoip-legacy-databases-have-been-retired/index.md)
- 2022-05-31: [Data changes to GeoIP Legacy web services](https://dev.maxmind.com/geoip/release-notes/2022-05-31-data-changes-to-geoip-legacy-web-services/index.md)
- 2022-05-25: [GeoLite databases will now receive twice weekly updates](https://dev.maxmind.com/geoip/release-notes/2022-05-25-geolite-databases-will-now-receive-twice-weekly-updates/index.md)
- 2022-05-10: [GeoNames Monthly Diff Report May 2022](https://dev.maxmind.com/geoip/release-notes/2022-05-10-geonames-monthly-diff-report-may-2022/index.md)
- 2022-04-11: [GeoNames Monthly Diff Report April 2022](https://dev.maxmind.com/geoip/release-notes/2022-04-11-geonames-monthly-diff-report-april-2022/index.md)
- 2022-03-11: [GeoNames Monthly Diff Report March 2022](https://dev.maxmind.com/geoip/release-notes/2022-03-11-geonames-monthly-diff-report-march-2022/index.md)
- 2022-02-25: [Update Regarding IP Geolocations in Ukraine](https://dev.maxmind.com/geoip/release-notes/2022-02-25-update-regarding-ip-geolocations-in-ukraine/index.md)
- 2022-02-18: [February Holiday Database Release Schedule](https://dev.maxmind.com/geoip/release-notes/2022-02-18-february-holiday-database-release-schedule/index.md)
- 2022-02-10: [GeoNames Monthly Diff Report February 2022](https://dev.maxmind.com/geoip/release-notes/2022-02-10-geonames-monthly-diff-report-february-2022/index.md)
- 2022-02-09: [Dialup values for connection_type and user_type deprecated](https://dev.maxmind.com/geoip/release-notes/2022-02-09-dialup-values-for-connection-type-and-user-type-deprecated/index.md)
- 2022-01-25: [Mobile country and mobile network code data](https://dev.maxmind.com/geoip/release-notes/2022-01-25-mobile-country-and-mobile-network-code-data/index.md)
- 2022-01-10: [GeoNames Monthly Diff Report January 2022](https://dev.maxmind.com/geoip/release-notes/2022-01-10-geonames-monthly-diff-report-january-2022/index.md)
- 2022-01-10: [GeoIP2 Precision is now GeoIP2 web service](https://dev.maxmind.com/geoip/release-notes/2022-01-10-geoip2-precision-is-now-geoip2-web-service/index.md)
- 2021-12-20: [GeoNames Monthly Diff Report December 2021](https://dev.maxmind.com/geoip/release-notes/2021-12-20-geonames-monthly-diff-report-december-2021/index.md)
- 2021-12-15: [December Holiday Database Release Schedule](https://dev.maxmind.com/geoip/release-notes/2021-12-15-december-holiday-database-release-schedule/index.md)
- 2021-11-23: [No Friday Updates for GeoIP2 Databases](https://dev.maxmind.com/geoip/release-notes/2021-11-23-no-friday-updates-for-geoip2-databases/index.md)
- 2021-11-12: [GeoNames Monthly Diff Report November 2021](https://dev.maxmind.com/geoip/release-notes/2021-11-12-geonames-monthly-diff-report-november-2021/index.md)
- 2021-10-13: [Crimea geolocation accuracy update](https://dev.maxmind.com/geoip/release-notes/2021-10-13-crimea-geolocation-accuracy-update/index.md)
- 2021-10-10: [GeoNames Monthly Diff Report October 2021](https://dev.maxmind.com/geoip/release-notes/2021-10-10-geonames-monthly-diff-report-october-2021/index.md)
- 2021-09-28: [Update to geolocation databases to fix Japanese geolocations](https://dev.maxmind.com/geoip/release-notes/2021-09-28-update-to-geolocation-databases-to-fix-japanese-geolocations/index.md)
- 2021-09-23: [Update to minimum accuracy_radius value](https://dev.maxmind.com/geoip/release-notes/2021-09-23-update-to-minimum-accuracy-radius-value/index.md)
- 2021-09-10: [GeoNames Monthly Diff Report September 2021](https://dev.maxmind.com/geoip/release-notes/2021-09-10-geonames-monthly-diff-report-september-2021/index.md)
- 2021-09-08: [Data Updates for Apple iCloud Private Relay](https://dev.maxmind.com/geoip/release-notes/2021-09-08-data-updates-for-apple-icloud-private-relay/index.md)
- 2021-08-31: [Mapping more mobile networks to a state](https://dev.maxmind.com/geoip/release-notes/2021-08-31-mapping-more-mobile-networks-to-a-state/index.md)
- 2021-08-18: [Increased file size of GeoIP2 Country, City, and Enterprise databases, and GeoLite2 Country and City databases](https://dev.maxmind.com/geoip/release-notes/2021-08-18-increased-file-size-of-geoip2-country-city-and-enterprise-databases-and-geolite2-country-and-city-databases/index.md)
- 2021-08-10: [GeoNames Monthly Diff Report August 2021](https://dev.maxmind.com/geoip/release-notes/2021-08-10-geonames-monthly-diff-report-august-2021/index.md)
- 2021-07-12: [GeoNames Monthly Diff Report July 2021](https://dev.maxmind.com/geoip/release-notes/2021-07-12-geonames-monthly-diff-report-july-2021/index.md)
- 2021-06-14: [GeoNames Monthly Diff Report June 2021](https://dev.maxmind.com/geoip/release-notes/2021-06-14-geonames-monthly-diff-report-june-2021/index.md)
- 2021-06-08: [Twice weekly updates for some GeoIP2 databases](https://dev.maxmind.com/geoip/release-notes/2021-06-08-twice-weekly-updates-for-some-geoip2-databases/index.md)
- 2021-05-10: [GeoNames Monthly Diff Report May 2021](https://dev.maxmind.com/geoip/release-notes/2021-05-10-geonames-monthly-diff-report-may-2021/index.md)
- 2021-04-09: [GeoNames Monthly Diff Report April 2021](https://dev.maxmind.com/geoip/release-notes/2021-04-09-geonames-monthly-diff-report-april-2021/index.md)
- 2021-03-09: [GeoNames Monthly Diff Report March 2021](https://dev.maxmind.com/geoip/release-notes/2021-03-09-geonames-monthly-diff-report-march-2021/index.md)
- 2021-02-11: [GeoNames Monthly Diff Report February 2021](https://dev.maxmind.com/geoip/release-notes/2021-02-11-geonames-monthly-diff-report-february-2021/index.md)
- 2021-01-29: [Mapping more Telstra Internet mobile networks to a state](https://dev.maxmind.com/geoip/release-notes/2021-01-29-mapping-more-telstra-internet-mobile-networks-to-a-state/index.md)
- 2021-01-22: [Change to Vodafone Germany ISP name](https://dev.maxmind.com/geoip/release-notes/2021-01-22-change-to-vodafone-germany-isp-name/index.md)
- 2021-01-11: [GeoNames Monthly Diff Report January 2021](https://dev.maxmind.com/geoip/release-notes/2021-01-11-geonames-monthly-diff-report-january-2021/index.md)
- 2020-12-30: [United Kingdom will no longer be flagged is_in_european_union](https://dev.maxmind.com/geoip/release-notes/2020-12-30-united-kingdom-will-no-longer-be-flagged-is-in-european-union/index.md)
- 2020-12-15: [GeoLite2 web service released](https://dev.maxmind.com/geoip/release-notes/2020-12-15-geolite2-web-service-released/index.md)
- 2020-12-14: [Notifications for database update delays](https://dev.maxmind.com/geoip/release-notes/2020-12-14-notifications-for-database-update-delays/index.md)
- 2020-12-10: [GeoNames Monthly Diff Report December 2020](https://dev.maxmind.com/geoip/release-notes/2020-12-10-geonames-monthly-diff-report-december-2020/index.md)
- 2020-11-10: [GeoNames Monthly Diff Report November 2020](https://dev.maxmind.com/geoip/release-notes/2020-11-10-geonames-monthly-diff-report-november-2020/index.md)
- 2020-10-20: [New Data Point is_residential_proxy Released for GeoIP2 Anonymous IP](https://dev.maxmind.com/geoip/release-notes/2020-10-20-new-data-point-is-residential-proxy-released-for-geoip2-anonymous-ip/index.md)
- 2020-10-20: [New Output is_residential_proxy Released for GeoIP2 Insights Web Service, minFraud Insights, and minFraud Factors](https://dev.maxmind.com/geoip/release-notes/2020-10-20-new-output-is-residential-proxy-released-for-geoip2-insights-web-service-minfraud-insights-and-minfraud-factors/index.md)
- 2020-10-19: [Residential proxy flag deployment](https://dev.maxmind.com/geoip/release-notes/2020-10-19-residential-proxy-flag-deployment/index.md)
- 2020-10-12: [GeoNames Monthly Diff Report October 2020](https://dev.maxmind.com/geoip/release-notes/2020-10-12-geonames-monthly-diff-report-october-2020/index.md)
- 2020-09-17: [Flagging more networks as 'corporate'](https://dev.maxmind.com/geoip/release-notes/2020-09-17-flagging-more-networks-as-corporate/index.md)
- 2020-09-10: [Billing and Product/Service Permission Types for Standard Users](https://dev.maxmind.com/geoip/release-notes/2020-09-10-billing-and-product-service-permission-types-for-standard-users/index.md)
- 2020-09-10: [GeoNames Monthly Diff Report September 2020](https://dev.maxmind.com/geoip/release-notes/2020-09-10-geonames-monthly-diff-report-september-2020/index.md)
- 2020-09-01: [Decommissioned GeoIP2 JavaScript API Domain](https://dev.maxmind.com/geoip/release-notes/2020-09-01-decommissioned-geoip2-javascript-api-domain/index.md)
- 2020-08-13: [Incorrect Spanish IP mappings to El Salvador](https://dev.maxmind.com/geoip/release-notes/2020-08-13-incorrect-spanish-ip-mappings-to-el-salvador/index.md)
- 2020-08-10: [GeoNames Monthly Diff Report August 2020](https://dev.maxmind.com/geoip/release-notes/2020-08-10-geonames-monthly-diff-report-august-2020/index.md)
- 2020-07-09: [GeoNames Monthly Diff Report July 2020](https://dev.maxmind.com/geoip/release-notes/2020-07-09-geonames-monthly-diff-report-july-2020/index.md)
- 2020-06-22: [FIDO2 Support for Two-Factor Authentication](https://dev.maxmind.com/geoip/release-notes/2020-06-22-fido2-support-for-two-factor-authentication/index.md)
- 2020-06-12: [GeoNames Monthly Diff Report June 2020](https://dev.maxmind.com/geoip/release-notes/2020-06-12-geonames-monthly-diff-report-june-2020/index.md)
- 2020-05-11: [GeoNames Monthly Diff Report May 2020](https://dev.maxmind.com/geoip/release-notes/2020-05-11-geonames-monthly-diff-report-may-2020/index.md)
- 2020-05-05: [Resolving to borough of Queens for Queens, NY, neighborhoods](https://dev.maxmind.com/geoip/release-notes/2020-05-05-resolving-to-borough-of-queens-for-queens-ny-neighborhoods/index.md)
- 2020-05-01: [GeoIP Legacy Downloadable Database Retirement](https://dev.maxmind.com/geoip/release-notes/2020-05-01-geoip-legacy-downloadable-database-retirement/index.md)
- 2020-04-27: [Broadband filter for GeoIP accuracy statistics](https://dev.maxmind.com/geoip/release-notes/2020-04-27-broadband-filter-for-geoip-accuracy-statistics/index.md)
- 2020-04-17: [Docker image for GeoIP update program](https://dev.maxmind.com/geoip/release-notes/2020-04-17-docker-image-for-geoip-update-program/index.md)
- 2020-04-15: [GeoNames Monthly Diff Report April 2020](https://dev.maxmind.com/geoip/release-notes/2020-04-15-geonames-monthly-diff-report-april-2020/index.md)
- 2020-02-27: [GeoIP2 Ruby API supports web service lookups](https://dev.maxmind.com/geoip/release-notes/2020-02-27-geoip2-ruby-api-supports-web-service-lookups/index.md)
- 2020-02-18: [mmdbinspect beta release](https://dev.maxmind.com/geoip/release-notes/2020-02-18-mmdbinspect-beta-release/index.md)
- 2020-02-14: [Privacy Exclusions API](https://dev.maxmind.com/geoip/release-notes/2020-02-14-privacy-exclusions-api/index.md)
- 2020-01-21: [Changes to ASN Organization Data](https://dev.maxmind.com/geoip/release-notes/2020-01-21-changes-to-asn-organization-data/index.md)
- 2020-01-06: [Flagging more networks used by businesses as 'corporate'](https://dev.maxmind.com/geoip/release-notes/2020-01-06-flagging-more-networks-used-by-businesses-as-corporate/index.md)
- 2019-12-23: [The USER_ID_REQUIRED error code is now ACCOUNT_ID_REQUIRED](https://dev.maxmind.com/geoip/release-notes/2019-12-23-the-user-id-required-error-code-is-now-account-id-required/index.md)
- 2019-12-19: [Resolving to parent city for Australian suburbs](https://dev.maxmind.com/geoip/release-notes/2019-12-19-resolving-to-parent-city-for-australian-suburbs/index.md)
- 2019-12-18: [Changes to accessing and using GeoLite2 databases](https://dev.maxmind.com/geoip/release-notes/2019-12-18-changes-to-accessing-and-using-geolite2-databases/index.md)
- 2019-12-17: [Query usage report license key filter](https://dev.maxmind.com/geoip/release-notes/2019-12-17-query-usage-report-license-key-filter/index.md)
- 2019-12-10: [Changes to Japan Postal Codes](https://dev.maxmind.com/geoip/release-notes/2019-12-10-changes-to-japan-postal-codes/index.md)
- 2019-11-08: [Changes to Portugal Postal Codes](https://dev.maxmind.com/geoip/release-notes/2019-11-08-changes-to-portugal-postal-codes/index.md)
- 2019-10-16: [Retirement of TLS 1.0/1.1 and unencrypted http minFraud requests](https://dev.maxmind.com/geoip/release-notes/2019-10-16-retirement-of-tls-1-0-1-1-and-unencrypted-http-minfraud-requests/index.md)
- 2019-10-15: [New static_ip_score output in web services](https://dev.maxmind.com/geoip/release-notes/2019-10-15-new-static-ip-score-output-in-web-services/index.md)
- 2019-10-14: [Final reminder of security-related retirements](https://dev.maxmind.com/geoip/release-notes/2019-10-14-final-reminder-of-security-related-retirements/index.md)
- 2019-10-03: [Improved cellular IP detection](https://dev.maxmind.com/geoip/release-notes/2019-10-03-improved-cellular-ip-detection/index.md)
- 2019-10-02: [Account activity log](https://dev.maxmind.com/geoip/release-notes/2019-10-02-account-activity-log/index.md)
- 2019-09-19: [New network and user_count outputs in web services](https://dev.maxmind.com/geoip/release-notes/2019-09-19-new-network-and-user-count-outputs-in-web-services/index.md)
- 2019-09-16: [Planned warning interruption (September 2019)](https://dev.maxmind.com/geoip/release-notes/2019-09-16-planned-warning-interruption-september-2019/index.md)
- 2019-08-26: [Anonymous IP data in GeoIP online lookup form](https://dev.maxmind.com/geoip/release-notes/2019-08-26-anonymous-ip-data-in-geoip-online-lookup-form/index.md)
- 2019-08-21: [Improved business IP detection](https://dev.maxmind.com/geoip/release-notes/2019-08-21-improved-business-ip-detection/index.md)
- 2019-08-20: [Planned warning interruption (August 2019)](https://dev.maxmind.com/geoip/release-notes/2019-08-20-planned-warning-interruption-august-2019/index.md)
- 2019-08-13: [Weekly updates for GeoIP2 ISP and GeoIP2 Connection Type](https://dev.maxmind.com/geoip/release-notes/2019-08-13-weekly-updates-for-geoip2-isp-and-geoip2-connection-type/index.md)
- 2019-07-24: [Planned warning interruption](https://dev.maxmind.com/geoip/release-notes/2019-07-24-planned-warning-interruption/index.md)
- 2019-07-15: [Postal code data for Singapore and South Korea](https://dev.maxmind.com/geoip/release-notes/2019-07-15-postal-code-data-for-singapore-and-south-korea/index.md)
- 2019-07-02: [Security Tokens](https://dev.maxmind.com/geoip/release-notes/2019-07-02-security-tokens/index.md)
- 2019-04-18: [Security-related retirements 2019](https://dev.maxmind.com/geoip/release-notes/2019-04-18-security-related-retirements-2019/index.md)
- 2019-04-08: [2FA release](https://dev.maxmind.com/geoip/release-notes/2019-04-08-2fa-release/index.md)
- 2019-01-24: [Crimea accuracy update 2019](https://dev.maxmind.com/geoip/release-notes/2019-01-24-crimea-accuracy-update-2019/index.md)
- 2019-01-23: [Initial Release of Ruby API](https://dev.maxmind.com/geoip/release-notes/2019-01-23-initial-release-of-ruby-api/index.md)
- 2019-01-14: [New GeoIP Update released](https://dev.maxmind.com/geoip/release-notes/2019-01-14-new-geoip-update-released/index.md)
- 2019-01-14: [Limiting availability of archived GeoIP databases](https://dev.maxmind.com/geoip/release-notes/2019-01-14-limiting-availability-of-archived-geoip-databases/index.md)
- 2019-01-04: [Server IP Changes January 2019](https://dev.maxmind.com/geoip/release-notes/2019-01-04-server-ip-changes-january-2019/index.md)
- 2019-01-02: [GeoIP2-node includes support for web service lookups](https://dev.maxmind.com/geoip/release-notes/2019-01-02-geoip2-node-includes-support-for-web-service-lookups/index.md)
- 2018-11-19: [Initial release of GeoIP2-node](https://dev.maxmind.com/geoip/release-notes/2018-11-19-initial-release-of-geoip2-node/index.md)
- 2018-09-21: [Changes to US coordinate data](https://dev.maxmind.com/geoip/release-notes/2018-09-21-changes-to-us-coordinate-data/index.md)
- 2018-08-14: [Mapping IPs to districts of Seoul](https://dev.maxmind.com/geoip/release-notes/2018-08-14-mapping-ips-to-districts-of-seoul/index.md)
- 2018-07-17: [Mapping more IPs to special wards of Tokyo](https://dev.maxmind.com/geoip/release-notes/2018-07-17-mapping-more-ips-to-special-wards-of-tokyo/index.md)
- 2018-07-03: [Renaming Time Warner Cable to Spectrum](https://dev.maxmind.com/geoip/release-notes/2018-07-03-renaming-time-warner-cable-to-spectrum/index.md)
- 2018-05-25: [New European Union locations added to GeoIP2 databases and services](https://dev.maxmind.com/geoip/release-notes/2018-05-25-new-european-union-locations-added-to-geoip2-databases-and-services/index.md)
- 2018-04-18: [Discontinuation of the GeoLite Legacy databases](https://dev.maxmind.com/geoip/release-notes/2018-04-18-discontinuation-of-the-geolite-legacy-databases/index.md)
- 2018-02-13: [EU Country outputs added to GeoIP2 Country, City, Enterprise DBs and web service](https://dev.maxmind.com/geoip/release-notes/2018-02-13-eu-country-outputs-added-to-geoip2-country-city-enterprise-dbs-and-web-service/index.md)
- 2017-11-02: [Anonymizer types added to GeoIP2 Insights](https://dev.maxmind.com/geoip/release-notes/2017-11-02-anonymizer-types-added-to-geoip2-insights/index.md)
- 2017-10-31: [The legacy GeoIP JavaScript services have been discontinued](https://dev.maxmind.com/geoip/release-notes/2017-10-31-the-legacy-geoip-javascript-services-have-been-discontinued/index.md)
- 2017-10-10: [Our Singapore server is live](https://dev.maxmind.com/geoip/release-notes/2017-10-10-our-singapore-server-is-live/index.md)
- 2017-09-27: [Crimea accuracy update](https://dev.maxmind.com/geoip/release-notes/2017-09-27-crimea-accuracy-update/index.md)
- 2017-08-17: [EOL legacy GeoIP JavaScript](https://dev.maxmind.com/geoip/release-notes/2017-08-17-eol-legacy-geoip-javascript/index.md)
- 2017-07-24: [Mapping more mobile networks to regional level](https://dev.maxmind.com/geoip/release-notes/2017-07-24-mapping-more-mobile-networks-to-regional-level/index.md)
- 2017-07-10: [Removing additional anycast locations](https://dev.maxmind.com/geoip/release-notes/2017-07-10-removing-additional-anycast-locations/index.md)
- 2017-06-23: [Adding Multiple License Keys Support](https://dev.maxmind.com/geoip/release-notes/2017-06-23-adding-multiple-license-keys-support/index.md)
- 2017-06-11: [Removing anycast locations](https://dev.maxmind.com/geoip/release-notes/2017-06-11-removing-anycast-locations/index.md)
- 2017-05-09: [New GeoLite2 ASN Database](https://dev.maxmind.com/geoip/release-notes/2017-05-09-new-geolite2-asn-database/index.md)
- 2017-05-08: [Spectrum rebranding](https://dev.maxmind.com/geoip/release-notes/2017-05-08-spectrum-rebranding/index.md)
- 2017-03-05: [GeoIP ISP Accuracy Improvements in Europe and Latin America](https://dev.maxmind.com/geoip/release-notes/2017-03-05-geoip-isp-accuracy-improvements-in-europe-and-latin-america/index.md)
- 2016-11-08: [Change to Comcast Business ISP name](https://dev.maxmind.com/geoip/release-notes/2016-11-08-change-to-comcast-business-isp-name/index.md)
- 2016-09-15: [Improved GeoIP accuracy outside the US](https://dev.maxmind.com/geoip/release-notes/2016-09-15-improved-geoip-accuracy-outside-the-us/index.md)
- 2016-04-26: [Accuracy radius to be added to GeoLite2 City, GeoIP2 City, and GeoIP2 City Plus](https://dev.maxmind.com/geoip/release-notes/2016-04-26-accuracy-radius-to-be-added-to-geolite2-city-geoip2-city-and-geoip2-city-plus/index.md)
- 2016-04-11: [Change in default lat/lon](https://dev.maxmind.com/geoip/release-notes/2016-04-11-change-in-default-lat-lon/index.md)
- 2016-02-26: [Capitalization change for Verizon FiOS](https://dev.maxmind.com/geoip/release-notes/2016-02-26-capitalization-change-for-verizon-fios/index.md)
- 2015-11-17: [libmaxminddb 1.1.2](https://dev.maxmind.com/geoip/release-notes/2015-11-17-libmaxminddb-1-1-2/index.md)
- 2015-08-10: [GeoIP ISP update](https://dev.maxmind.com/geoip/release-notes/2015-08-10-geoip-isp-update/index.md)
- 2015-07-13: [is_anonymous_proxy and is_satellite_provider Deprecation in GeoIP2](https://dev.maxmind.com/geoip/release-notes/2015-07-13-is-anonymous-proxy-and-is-satellite-provider-deprecation-in-geoip2/index.md)
- 2015-06-29: [Average Income and Population Density](https://dev.maxmind.com/geoip/release-notes/2015-06-29-average-income-and-population-density/index.md)
- 2015-06-11: [GeoIP2 CSVs for Anonymous IP, ISP, Domain and Connection Type](https://dev.maxmind.com/geoip/release-notes/2015-06-11-geoip2-csvs-for-anonymous-ip-isp-domain-and-connection-type/index.md)
- 2015-05-11: [Improvements to GeoIP2 City Plus and Insights](https://dev.maxmind.com/geoip/release-notes/2015-05-11-improvements-to-geoip2-city-plus-and-insights/index.md)
- 2015-01-27: [GeoIP Accuracy in Crimea](https://dev.maxmind.com/geoip/release-notes/2015-01-27-geoip-accuracy-in-crimea/index.md)
- 2014-12-16: [More IPs mapped to postal codes](https://dev.maxmind.com/geoip/release-notes/2014-12-16-more-ips-mapped-to-postal-codes/index.md)
- 2014-11-25: [Improvements to accuracy in Japan, South Korea and Venezuela and change in lat/lon returned](https://dev.maxmind.com/geoip/release-notes/2014-11-25-improvements-to-accuracy-in-japan-south-korea-and-venezuela-and-change-in-lat-lon-returned/index.md)
- 2014-11-19: [Free JavaScript service discontinued](https://dev.maxmind.com/geoip/release-notes/2014-11-19-free-javascript-service-discontinued/index.md)
- 2014-07-18: [GeoIP2 JavaScript v2.1](https://dev.maxmind.com/geoip/release-notes/2014-07-18-geoip2-javascript-v2-1/index.md)
- 2014-07-18: [GeoIP2 Web Service v2.1](https://dev.maxmind.com/geoip/release-notes/2014-07-18-geoip2-web-service-v2-1/index.md)
- 2014-04-01: [Type Change to GeoIP2 Metro Code Field](https://dev.maxmind.com/geoip/release-notes/2014-04-01-type-change-to-geoip2-metro-code-field/index.md)
- 2014-01-21: [Free use of the GeoIP2 JavaScript API has been discontinued](https://dev.maxmind.com/geoip/release-notes/2014-01-21-free-use-of-the-geoip2-javascript-api-has-been-discontinued/index.md)
- 2013-08-12: [Canadian Postals back in database](https://dev.maxmind.com/geoip/release-notes/2013-08-12-canadian-postals-back-in-database/index.md)
- 2013-08-06: [GeoIP release delay](https://dev.maxmind.com/geoip/release-notes/2013-08-06-geoip-release-delay/index.md)
- 2013-07-24: [Improved international postal resolution](https://dev.maxmind.com/geoip/release-notes/2013-07-24-improved-international-postal-resolution/index.md)
- 2013-07-08: [GeoLite2 City Database Available](https://dev.maxmind.com/geoip/release-notes/2013-07-08-geolite2-city-database-available/index.md)
- 2013-07-05: [GeoIP2 Precision Data Available](https://dev.maxmind.com/geoip/release-notes/2013-07-05-geoip2-precision-data-available/index.md)
- 2013-05-01: [GeoIP2 Now Available](https://dev.maxmind.com/geoip/release-notes/2013-05-01-geoip2-now-available/index.md)
# Track Location Name Updates
Source: https://dev.maxmind.com/geoip/track-location-name-updates/
MaxMind sources most of our place names (country, subdivision, and city names)
from [GeoNames](https://www.geonames.org/). We update place names based on
changes to GeoNames usually monthly, and publish the changes to a diff report.
## Scope of changes reported
The report covers changes to English-language location names for all locations
that appear in your GeoIP database. This includes city names, country names,
country codes, and subdivision codes.
The report compares location data between consecutive GeoIP database releases
and reports three types of changes:
- **new**: A location was added to the database.
- **updated**: A location's name data changed.
- **removed**: A location was removed from the database.
While we typically update our GeoNames data monthly, a diff report is generated
for every GeoIP database release with location data. This is because the
locations appearing in your database can change between releases, even without
GeoNames updates.
## Fields in the report
The report is a CSV file with the following fields:
| Field | Description |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `status` | The type of change: `new`, `updated`, or `removed`. |
| `geoname_id` | The [GeoNames ID](https://www.geonames.org/) for the location. |
| `old_city_name` | The previous city name. Empty for `new` entries. |
| `new_city_name` | The new city name. Empty for `removed` entries. |
| `old_country_name` | The previous country name. Empty for `new` entries. |
| `new_country_name` | The new country name. Empty for `removed` entries. |
| `old_country_code` | The previous ISO country code. Empty for `new` entries. |
| `new_country_code` | The new ISO country code. Empty for `removed` entries. |
| `old_subdivision_codes` | The previous subdivision ISO codes. When multiple levels exist, codes are listed from broadest to most specific, separated by commas (e.g., `BC` for just a province, or `BC,VAN` for a province and a smaller region within it). Empty for `new` entries. |
| `new_subdivision_codes` | The new subdivision ISO codes, following the same format as `old_subdivision_codes`. Empty for `removed` entries. |
## Downloading the report
You can download the report from the
[Download files](https://www.maxmind.com/en/accounts/current/geoip/downloads)
section of your account portal. The report is available alongside your database
downloads and can be downloaded automatically. To download it manually, click
the "Download Locations Diff Report" link next to the database.
The
[Downloads OpenAPI specification](https://github.com/maxmind/openapi/blob/main/bundled/downloads.yaml)
([raw file](https://raw.githubusercontent.com/maxmind/openapi/main/bundled/downloads.yaml))
describes the download endpoint, including the parameters for location name diff
reports.
### Download best practices
At a high level, the best practice is to write an automated script that
periodically checks the `Last-Modified` header for the report's release date,
and downloads the report when the `Last-Modified` time is later than the
`Last-Modified` time of your latest local copy.
### Checking for the latest release date
You can check the date of the report's latest release by issuing a HEAD request
for the report's download URL.
The basic steps are:
1. In the "Download Links" column, click "Get Permalink(s)".
2. Copy the database URL in the modal window.
3. Provide your
[account ID](https://support.maxmind.com/knowledge-base/articles/find-your-maxmind-account-id)
and
[your license key](https://www.maxmind.com/en/accounts/current/license-key)
using
[Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)
to authenticate.
4. If you are using `wget` or `curl` from a shell script, please be sure to
quote the URL.
5. Update the URL with `suffix` and `artifact_type` as seen in the below
examples.
For example, you can issue a `curl` command like the following:
```bash
curl -I -L -u YOUR_ACCOUNT_ID:YOUR_LICENSE_KEY \
'https://download.maxmind.com/geoip/databases/GeoIP2-City/download?suffix=csv&artifact_type=Locations-Diff-Report'
```
Or a `wget` command like the following:
```bash
wget -S \
--method HEAD \
--user=YOUR_ACCOUNT_ID \
--password=YOUR_LICENSE_KEY \
'https://download.maxmind.com/geoip/databases/GeoIP2-City/download?suffix=csv&artifact_type=Locations-Diff-Report'
```
Where `YOUR_ACCOUNT_ID` is a placeholder for your account ID and
`YOUR_LICENSE_KEY` is a placeholder for your license key.
[Learn more about license keys on our knowledge base](https://support.maxmind.com/knowledge-base/articles/using-maxmind-license-keys).
In the response, you can check the `Last-Modified` header for the file's release
date. These checks can be incorporated into your own script or program,
according to your needs.
### Automating downloads
The steps for automating downloads of the report are similar to the steps for
checking the latest release date. Instead of checking the file HEAD, you will
download the file.
1. In the "Download Links" column, click "Get Permalink(s)".
2. Copy the database URL in the modal window.
3. Provide your
[account ID](https://support.maxmind.com/knowledge-base/articles/find-your-maxmind-account-id)
and
[your license key](https://www.maxmind.com/en/accounts/current/license-key)
using
[Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)
to authenticate.
4. If you are using `wget` or `curl` from a shell script, please be sure to
quote the URL.
5. Update the URL with `suffix` and `artifact_type` as seen in the below
examples.
For example, you can issue a `curl` command like the following:
```bash
curl -O -J -L -u YOUR_ACCOUNT_ID:YOUR_LICENSE_KEY 'https://download.maxmind.com/geoip/databases/GeoIP2-City/download?suffix=csv&artifact_type=Locations-Diff-Report'
```
Or a `wget` command like the following:
```bash
wget --content-disposition --user=YOUR_ACCOUNT_ID --password=YOUR_LICENSE_KEY 'https://download.maxmind.com/geoip/databases/GeoIP2-City/download?suffix=csv&artifact_type=Locations-Diff-Report'
```
Where `YOUR_ACCOUNT_ID` is a placeholder for your account ID and
`YOUR_LICENSE_KEY` is a placeholder for your license key.
[Learn more about license keys on our knowledge base](https://support.maxmind.com/knowledge-base/articles/using-maxmind-license-keys).
This will save the report to a file like
`GeoIP2-City_Locations-Diff-Report_YYYYMMDD.csv` where YYYYMMDD is the date of
the database release.
# Updating GeoIP and GeoLite Databases
Source: https://dev.maxmind.com/geoip/updating-databases/
> **⚠️ Warning**
>
> In January 2024, we began using R2 presigned URLs for all
> database downloads. You should make sure that your HTTP client follows redirects
> and there are no proxy or firewall settings that would block requests to the
> host we are redirecting to. We will redirect requests using HTTPS on the
> following hostname:
>
> - `mm-prod-geoip-databases.a2649acb697e2c09b632799562c076f2.r2.cloudflarestorage.com`
>
> Existing database download links will continue to work, they will simply be
> redirected.
>
> [Read our release note for more information.](/geoip/release-notes/2024-01-17-presigned-urls-for-database-downloads/index.md)
There are two methods for automatically updating GeoIP and GeoLite binary
databases:
1. Using MaxMind's
[GeoIP Update program](https://github.com/maxmind/geoipupdate/releases).
2. Directly downloading the database.
For clients using our binary database format, we highly recommend using GeoIP
Update, but the direct download method is available if necessary. Clients using
the CSV-format databases must use the direct download method.
## Using GeoIP Update
MaxMind provides the GeoIP Update program, which performs automatic updates for
both GeoIP and GeoLite binary databases.
MaxMind uses R2 presigned URLs for database downloads. Make sure that your
servers can make HTTPS connections to the following hostname:
- `mm-prod-geoip-databases.a2649acb697e2c09b632799562c076f2.r2.cloudflarestorage.com`
### 1. Install GeoIP Update
Install GeoIP Update. The latest release may be downloaded from
[GitHub Releases](https://github.com/maxmind/geoipupdate/releases). See
[the installation instructions](https://github.com/maxmind/geoipupdate) for more
information. GeoIP Update can also be installed via our
[Docker image](https://hub.docker.com/r/maxmindinc/geoipupdate).
If you are using an older version of GeoIP Update, you may need to upgrade to
GeoIP Update 4.x or later version. The 4.x and later versions meet our
requirement for using TLS 1.2 or greater for all requests to our servers to keep
your data secure.
Please see our [upgrade guide](/geoip/upgrading-geoip-update/index.md) for more
information on upgrading from an older version of GeoIP Update.
### 2. Obtain GeoIP.conf with Account Information
Log in to your account portal to download a partially
[pre-filled configuration file](https://www.maxmind.com/en/accounts/current/license-key/GeoIP.conf)
and save it in your configuration directory (e.g., `/usr/local/etc/`) as
`GeoIP.conf`. You will need to replace the `YOUR_LICENSE_KEY_HERE` placeholder
with an active license key associated with your MaxMind account. You can see
your license key information on
[your account License Keys page](https://www.maxmind.com/en/accounts/current/license-key).
> **⚠️ Warning**
>
> You may also write this file by hand using the template
> below (**not recommended**).
>
> Note that for `geoipupdate` versions less than 2.5.0, use `UserId` instead of
> `AccountID` and `ProductIds` instead of `EditionIDs`.
```bash
# GeoIP.conf file - used by geoipupdate program to update databases
# from https://www.maxmind.com
AccountID YOUR_ACCOUNT_ID_HERE
LicenseKey YOUR_LICENSE_KEY_HERE
EditionIDs YOUR_EDITION_IDS_HERE
```
### 3. Run GeoIP Update
Run `geoipupdate`. To fully automate this process on Linux or Unix, use a
crontab file like:
```bash
# top of crontab
MAILTO=your@email.com
* * 6,3 /usr/local/bin/geoipupdate
# end of crontab
```
Replace `` and `` with a random time. Then the clients do not
all update at the same time.
This crontab file would run twice a week, and it would email you the results.
If you are running a firewall, `geoipupdate` requires that the DNS and HTTPS
(443) ports be open.
### Troubleshooting
If you receive an error when running GeoIP Update, you can use the verbose
option by adding the `-v` flag. This will print out each step taken as it runs.
The information provided can often help to clarify issues. Additional
instructions for GeoIP Update can be viewed when running `man geoipupdate` on
the command line.
Please note that GeoIP Update requires current access to database updates to run
properly. If your subscription needs to be renewed, updates can be purchased
while logged into
[your Account Summary page](https://www.maxmind.com/en/accounts/current/people/current).
Updating to the
[latest release of GeoIP Update](https://github.com/maxmind/geoipupdate/releases)
may be required to resolve some errors. If you are not currently using version 4
or higher of GeoIP Update and would like to learn about upgrading to the current
version of the program, read our
[guide on how to upgrade to GeoIP Update version 4.x](/geoip/upgrading-geoip-update/index.md).
Starting in 2024, MaxMind began using R2 presigned URLs for database downloads.
If your server is refusing the connection during download, make sure that your
servers can make HTTPS connections to the following hostname:
- `mm-prod-geoip-databases.a2649acb697e2c09b632799562c076f2.r2.cloudflarestorage.com`
## Directly downloading databases
This is only recommended for systems unable to use GeoIP Update or for clients
using the CSV-format databases.
The
[Downloads OpenAPI specification](https://github.com/maxmind/openapi/blob/main/bundled/downloads.yaml)
([raw file](https://raw.githubusercontent.com/maxmind/openapi/main/bundled/downloads.yaml))
describes the database download endpoints and their parameters.
### Download best practices
At a high level, the best practice is to write an automated script that
periodically checks the `Last-Modified` header for the database's build date,
and downloads the database when the `Last-Modified` time is later than the
`Last-Modified` time of the latest local copy of the database.
It is good to check periodically throughout the day for a release so that you do
not rely on an update schedule, and so that you catch off-schedule releases.
### Checking for the Latest Release Date
You can check the date of a given database’s latest release by issuing a HEAD
request for that database’s download permalink URL. The download permalink can
be found in the
[Download Databases](https://www.maxmind.com/en/accounts/current/geoip/downloads)
section of your account portal.
For example, using the permalink for the GeoIP City CSV database, you can issue
a `curl` command like the following:
```bash
curl -I -L -u YOUR_ACCOUNT_ID:YOUR_LICENSE_KEY \
'https://download.maxmind.com/geoip/databases/GeoIP2-City-CSV/download?suffix=zip'
```
Or a `wget` command like the following:
```bash
wget -S \
--method HEAD \
--user=YOUR_ACCOUNT_ID \
--password=YOUR_LICENSE_KEY \
'https://download.maxmind.com/geoip/databases/GeoIP2-City-CSV/download?suffix=zip'
```
Where `YOUR_ACCOUNT_ID` is a placeholder for your account ID and
`YOUR_LICENSE_KEY` is a placeholder for your license key.
[Learn more about license keys on our knowledge base](https://support.maxmind.com/knowledge-base/articles/using-maxmind-license-keys).
In the response, you can check the `Last-Modified` header for the file’s build
date, or you can check the `Content-Disposition` header for the date that would
appear in the file name. These checks can be incorporated into your own script
or program, according to your needs.
This method only issues a HEAD request, rather than a download request, so
running this check won’t count against your
[daily database download limit](https://support.maxmind.com/knowledge-base/articles/download-and-update-maxmind-databases).
### Automating downloads
The steps for automating downloads of the databases are similar to the steps for
checking the latest release date. Instead of checking the file HEAD, you will
download the file.
In order to download the databases from a script or program, please use the
permalinks found on the
[GeoIP download page](https://www.maxmind.com/en/accounts/current/geoip/downloads).
Please note that you will be redirected from these permalinks because MaxMind
uses R2 presigned URLs for database downloads. You should make sure that your
HTTP client follows redirects and there are no proxy or firewall settings that
would block requests to the host we are redirecting to. We will redirect
requests using HTTPS on the following hostname:
- `mm-prod-geoip-databases.a2649acb697e2c09b632799562c076f2.r2.cloudflarestorage.com`
To directly download databases, follow these steps:
1. In the “Download Links” column, click “Get Permalink(s)” for the desired
database.
2. Copy the permalink(s) provided in the modal window.
3. Provide your
[account ID](https://support.maxmind.com/knowledge-base/articles/find-your-maxmind-account-id)
and
[your license key](https://www.maxmind.com/en/accounts/current/license-key)
using
[Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)
to authenticate.
4. If you are using `wget` or `curl` from a shell script, please be sure to
quote the URL.
This download will return a compressed file in gzip (for binary) or zip (for
CSV) format, which can be uncompressed using a program like
[7-Zip](https://www.7-zip.org/) or [gzip](https://www.gzip.org/).
For example, using the permalink for the GeoIP City CSV database, you can issue
a `curl` command like the following:
```bash
curl -O -J -L -u YOUR_ACCOUNT_ID:YOUR_LICENSE_KEY 'https://download.maxmind.com/geoip/databases/GeoIP2-City-CSV/download?suffix=zip'
```
Or a `wget` command like the following:
```bash
wget --content-disposition --user=YOUR_ACCOUNT_ID --password=YOUR_LICENSE_KEY 'https://download.maxmind.com/geoip/databases/GeoIP2-City-CSV/download?suffix=zip'
```
Where `YOUR_ACCOUNT_ID` is a placeholder for your account ID and
`YOUR_LICENSE_KEY` is a placeholder for your license key.
[Learn more about license keys on our knowledge base](https://support.maxmind.com/knowledge-base/articles/using-maxmind-license-keys).
These examples will save the database to a file called
`GeoIP2-City-CSV_YYYYMMDD.zip` where YYYYMMDD is the date of the latest release.
We also maintain example zip files on the corresponding GeoIP database
documentation pages (see
[the GeoIP City example file](/geoip/docs/databases/city-and-country/index.md#example-files)),
and
[tutorials for importing CSV databases into SQL](/geoip/importing-databases/index.md).
## Changes to file size between updates
It is expected for database files to increase or decrease in size from time to
time between releases. As we incorporate data corrections and new data sources,
we will add entries to our databases. Sometimes IP ranges are taken out of use
and removed. You should develop your integration with the expectation that
changes to the size of our databases will occur.
When we anticipate significant changes to the size of our databases, we will
notify customers by [posting a release note](/geoip/release-notes/index.md).
## Download limits
_MaxMind reserves the right to
[limit the number of downloads](https://support.maxmind.com/knowledge-base/articles/download-and-update-maxmind-databases)
made within a limited period of time._ A request that exceeds the account's
download limit receives a `429 Too Many Requests` response.
## Rate-limiting
Customer traffic may occasionally receive an error status from MaxMind web
services. This can be due to, for example, using invalid credentials or
attempting to download a database with a lapsed subscription. If these
unsuccessful requests are deemed excessive, MaxMind may choose to rate-limit
these requests for a period of time. Rate-limited requests receive a
`429 Too Many Requests` response. This applies to both `GET` and `HEAD`
requests. The response may not include a JSON body.
# Upgrading GeoIP Update from v3.x to v4.0 and higher
Source: https://dev.maxmind.com/geoip/upgrading-geoip-update/
> **ℹ️ Info**
>
> In 2019, we released a new major version of `geoipupdate`.
> This document describes how you can upgrade from versions 3.x to versions 4.x
> and higher.
>
> If you are upgrading from version 4.x and higher to the latest version, please
> consult the
> [changelog of the latest release](https://github.com/maxmind/geoipupdate/releases)
> for information.
## What changed
`geoipupdate` 4\.x was a rewrite of the old `geoipupdate` and started from a new
modern code base. It supports the same core functionality and config file format
as before.
The biggest change is support for additional platforms, notably Windows.
## Notable changes
There are changes you should be aware of if you’re upgrading from older
versions.
If you’re coming from `geoipupdate` 2\.x:
- We removed support for the configuration options `Protocol`,
`SkipPeerVerification`, and `SkipHostnameVerification`. `geoipupdate` now
always uses HTTPS and always verifies certificates. We ignore these options if
present.
- The configuration file must have the `AccountID` (or the deprecated `UserId`)
when downloading a paid database. Previously, when downloading the GeoIP
Legacy Country database, you were able to only provide the `LicenseKey`. Now
you must provide both `AccountID` and `LicenseKey`.
## Confirm your version
You can do this by running `geoipupdate -V`:
```bash
geoipupdate -V
> geoipupdate 3.1.1
```
If this says something like `geoipupdate 4.0.0` then you’re already running 4.x.
If this says something like `command not found` then you may not have
`geoipupdate` installed. Please see our
[installation guide](/geoip/updating-databases/index.md#1-install-geoip-update) for more
information.
## Find your config file
Typically this will be `/etc/GeoIP.conf` or `/usr/local/etc/GeoIP.conf`.
One way to do this is to run `geoipupdate` in verbose mode:
```bash
geoipupdate -v
> geoipupdate 3.1.1
> Opened License file /etc/GeoIP.conf
> ...
```
In this case the config file is `/etc/GeoIP.conf`.
## Install geoipupdate 4.x
Follow the instructions in our
[installation guide](/geoip/updating-databases/index.md#1-install-geoip-update) for how
to do this.
If you previously installed it via our PPA, you should be able to upgrade
through `apt`.
If you previously installed it via `make install`, you should determine where
it’s installed so you don’t end up with conflicting versions. You can run this
command to check where it is:
```bash
which geoipupdate
> /usr/bin/geoipupdate
```
In this case `geoipupdate` is installed to `/usr/bin/geoipupdate` so you’d want
to install there again.
After you’ve installed it, confirm by running `geoipupdate -V` that you’re
running 4.x.
## Test it
Run `geoipupdate` in verbose mode to verify it’s using the config file you
expect and completes without error:
```bash
geoipupdate -v
> Using config file /etc/GeoIP.conf
> ...
```
If it’s using a config file from a different spot than you expect, either move
your config to that location or pass the `-f` flag when running `geoipupdate` to
tell it where to find the config.
## Check cron
If you configured `geoipupdate` to run from cron then it is a good idea to
confirm it will continue to work. In particular you should check the command in
your cron configuration will use the config file you expect. You can run the
command from your crontab with the verbose flag (`-v`) to verify this.
# What's New in GeoIP2
Source: https://dev.maxmind.com/geoip/whats-new-in-geoip2/
MaxMind's GeoIP2 web services and GeoIP2 databases are an evolution of our
original GeoIP web services and databases, which we now refer to as GeoIP
Legacy. This document highlights the most important changes for developers.
## Data Changes
GeoIP2 includes a variety of new data, as well as making changes to how existing
data is represented.
### Localized Data
Perhaps the biggest change is the inclusion of localized name data. The service
supports Brazilian Portuguese (`pt-BR`), English (`en`), French (`fr`), German
(`de`), Japanese (`ja`), Russian (`ru`), Simplified Chinese (`zh-CN`), and
Spanish (`es`).
Whenever possible, we provide a `geoname_id` for things like cities, countries,
and country subdivisions. The [GeoNames](https://www.geonames.org) data set
includes a huge amount of data on geographical features.
### Country, Registered Country, and Represented Country
We now distinguish between several types of country data. The `country` is the
country where the IP address is located. The `registered_country` is the country
in which the IP is registered. These two may differ in some cases.
Both `country` and `registered_country` may include the `is_in_european_union`
key to indicate that the country is in the European Union.
Finally, we also include a `represented_country` key for some records. This is
used when the IP address belongs to something like a military base. The
`represented_country` is the country that the base represents. This can be
useful for managing content licensing, among other uses.
### ISO 3166-2, FIPS 10-4, and Country Subdivisions
We now provide the ISO 3166-2 codes for country subdivisions when they are
available. The GeoIP2 databases and services **do not** include FIPS 10-4 region
codes. The GeoIP Legacy databases included ISO codes for US and Canada and FIPS
codes for all other countries.
We also provide multiple levels of country subdivision data. The subdivisions
these provide correspond to the subdivisions which have been given ISO 3166-2
codes. For example, in the United States, we only provide a single level of
subdivision data, corresponding to US states. But for the United Kingdom, we may
provide two levels. The first level is the country (England, Scotland, Wales) or
province (Northern Ireland). The second level may be a county, a London borough,
a unitary authority, council area, etc.
We provide a
[CSV file which maps FIPS 10-4 region codes to their corresponding ISO 3166-2 subdivision codes](/csv/fips-iso-map.csv).
Note that codes for the US and Canada are not present since we included ISO
codes for these countries in GeoIP Legacy. Also note that the CSV file may
contain outdated ISO 3166-2 subdivision codes in addition to any up-to-date
codes that may have replaced them. This file incorporates GeoNames geographical
data, which is made available under the
[Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/).
### Custom Country Codes
In the GeoIP Legacy databases, we included several country codes that don't
represent countries. These were `AP` (Asia/Pacific), `EU` (Europe), `A1`
(anonymous proxy), and `A2` (satellite provider).
For IP addresses where we used to use `AP`, we now return a response with no
country set at all. It will, however, contain a `continent` object, and that
continent will be Asia. The `time_zone` key under the `location` object will be
set to `Australia/Perth`. For `EU`, we return a similar document where the
continent is Europe and the `time_zone` is `Europe/Vaduz`.
For IP addresses where we used `A1` or `A2`, we now set the appropriate key in
the `traits` object. The `A1` code corresponds to the deprecated
`is_anonymous_proxy` key, while `A2` corresponds to the deprecated
`is_satellite_provider` key. New integrations are encouraged to use
`is_anonymous`, `is_anonymous_vpn`, `is_hosting_provider`, `is_public_proxy`,
`is_satellite_provider`, `is_tor_exit_node`, and `is_residential_proxy`, all
available in the GeoIP2 Insights web service or the GeoIP2 Anonymous IP
database.
### User Type and Net Speed (web service only)
In the GeoIP2 web services, we have effectively merged the user type and net
speed data into the `user_type` key. The `cellular` net speed was already
included in the list of possible `user_type` values.
We have also changed the format of the `user_type` values so that they are in
all lower case, with words separated by underscores (\_).
### Autonomous System Number
In GeoIP Legacy, this was returned as a string like "AS1239 Linkem IR WiMax
Network". This has been split into two keys, `autonomous_system_number`, an
integer, and `autonomous_system_organization`, which is a string.
### Area Code
The GeoIP2 databases and services **do not** include area codes.
### Location Information
GeoIP2 Insights includes the average income and population density for the area
in which the IP address is used.
### IP and Network
All GeoIP2 databases and web services provide the network of the associated data
record in the database.
GeoIP2 Insights also includes `user_count`, an estimate of the number of users
using the IP address, and the `static_ip_score`, an indicator of how static or
dynamic an IP allocation is.
## JavaScript API Changes
The MaxMind GeoIP2 JavaScript API provides a JavaScript interface to our
[GeoIP2 web service](/geoip/docs/web-services/index.md). The API calls the web service to
retrieve the location information of the user as a
[JavaScript object](/geoip/docs/web-services/index.md).
The API is written using the
[JavaScript module pattern](https://adequatelygood.com/JavaScript-Module-Pattern-In-Depth.html).
Rather than injecting many global functions into the top-level execution scope,
it returns a single object containing multiple functions you can call.
## Web Service Changes
Our GeoIP2 web services now follow REST principles.
Unlike the GeoIP Legacy web service, the GeoIP2 web services use HTTP basic
authentication over TLS rather than passing the license key as a query
parameter.
When an error occurs, we now return an appropriate HTTP error code instead of
simply returning a 200 with an error in the document. We also return a JSON
document with details about the error in most cases.
Successful responses also return a JSON document. All documents, both successful
and error, are in the form of a JSON object.
## Database Changes
Downloadable databases for GeoIP2 use our new
[MaxMind DB](https://maxmind.github.io/MaxMind-DB/) format. Our
[GeoIP2 downloadable databases page](/geoip/docs/databases/index.md) has information on
how to use the new format.
## Web Service Example
This is an example of our GeoIP2 Insights web service's return document.
```json
{
"city": {
"confidence": 25,
"geoname_id": 54321,
"names": {
"de": "Los Angeles",
"en": "Los Angeles",
"es": "Los Ángeles",
"fr": "Los Angeles",
"ja": "ロサンゼルス市",
"pt-BR": "Los Angeles",
"ru": "Лос-Анджелес",
"zh-CN": "洛杉矶"
}
},
"continent": {
"code": "NA",
"geoname_id": 123456,
"names": {
"de": "Nordamerika",
"en": "North America",
"es": "América del Norte",
"fr": "Amérique du Nord",
"ja": "北アメリカ",
"pt-BR": "América do Norte",
"ru": "Северная Америка",
"zh-CN": "北美洲"
}
},
"country": {
"confidence": 75,
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
}
},
"location": {
"accuracy_radius": 20,
"average_income": 128321,
"latitude": 37.6293,
"longitude": -122.1163,
"metro_code": 807,
"population_density": 7122,
"time_zone": "America/Los_Angeles"
},
"postal": {
"code": "90001",
"confidence": 10
},
"registered_country": {
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
}
},
"represented_country": {
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
},
"type": "military"
},
"subdivisions": [
{
"confidence": 50,
"geoname_id": 5332921,
"iso_code": "CA",
"names": {
"de": "Kalifornien",
"en": "California",
"es": "California",
"fr": "Californie",
"ja": "カリフォルニア",
"ru": "Калифорния",
"zh-CN": "加州"
}
}
],
"traits": {
"autonomous_system_number": 1239,
"autonomous_system_organization": "Linkem IR WiMax Network",
"domain": "example.com",
"is_anonymous": true,
"is_anonymous_proxy": true,
"is_anonymous_vpn": true,
"is_hosting_provider": true,
"is_public_proxy": true,
"is_satellite_provider": true,
"is_tor_exit_node": true,
"is_residential_proxy": true,
"isp": "Linkem spa",
"ip_address": "1.2.3.4",
"network": "1.2.3.0/24",
"organization": "Linkem IR WiMax Network",
"static_ip_score": 1.5,
"user_count": 1,
"user_type": "traveler"
},
"maxmind": {
"queries_remaining": 54321
}
}
```
_Latitude and longitude 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._
# minFraud Web Services
Source: https://dev.maxmind.com/minfraud/
> **ℹ️ Info**
>
> If you are a minFraud Legacy customer, please refer to our
> [minFraud Legacy documentation](/minfraud/minfraud-legacy/index.md).
>
> If you are a Proxy Detection Legacy customer, please refer to our
> [Proxy Detection Legacy documentation](/minfraud/proxy-detection/index.md).
minFraud is our transaction risk API, consisting of the minFraud Score, Insights
and Factors services.
## Guides
- [Evaluate a Transaction](/minfraud/evaluate-a-transaction/index.md): Start evaluating your transactions by installing, configuring, and using a minFraud client API.
- [Report Transactions](/minfraud/report-a-transaction/index.md): Use the Report Transaction API to report chargebacks, false positives, suspected fraud, or spam/abuse.
- [Integrate Device Tracking](/minfraud/track-devices/index.md): Capture more data and catch more fraud using our device tracking libraries.
## Resources
- [API Documentation](/minfraud/api-documentation/index.md): Learn about each minFraud service's request and response objects.
- [Release Notes](/minfraud/release-notes/index.md): Review minFraud release notes to understand changes to the minFraud API.
- [Knowledge Base](https://support.maxmind.com/knowledge-base/minfraud-web-services): Consult our knowledge base for articles about using minFraud.
## Pages in this section
- [minFraud Alerts](https://dev.maxmind.com/minfraud/alerts/index.md): How minFraud Alerts tell you by email or webhook when the risk score of a transaction increases after scoring, and how to secure the webhook.
- [minFraud API Requests](https://dev.maxmind.com/minfraud/api-documentation/requests/index.md): Reference for minFraud API requests: authorization, service endpoints, headers, and each field of the request body.
- [minFraud API Responses](https://dev.maxmind.com/minfraud/api-documentation/responses/index.md): Reference for minFraud API responses: headers, errors, rate limits, and each field of the Score, Insights, and Factors response body.
- [Normalizing Email Addresses for minFraud](https://dev.maxmind.com/minfraud/normalizing-email-addresses-for-minfraud/index.md): How to normalize an email address before you send its MD5 hash to the minFraud services, with examples.
- [Testing minFraud in the MaxMind Sandbox](https://dev.maxmind.com/minfraud/sandbox-environment/index.md): How to test a minFraud integration in the MaxMind Sandbox: license keys, Sandbox endpoints, and test data.
- [What's New in minFraud Score, minFraud Insights, and minFraud Factors](https://dev.maxmind.com/minfraud/whats-new-in-minfraud-score-and-minfraud-insights/index.md): Changes for developers who move from minFraud Legacy to minFraud Score, minFraud Insights, and minFraud Factors.
- [Working with Transaction Dispositions](https://dev.maxmind.com/minfraud/working-with-transaction-dispositions/index.md): How to use the disposition API to accept or reject a minFraud transaction after manual review.
# minFraud Alerts
Source: https://dev.maxmind.com/minfraud/alerts/
After initial scoring, we continue to monitor transactions with risk scores less
than or equal to 10 for another 24 hours. If we receive new information related
to these transactions that leads to a transaction having a re-calculated risk
score greater than or equal to 75, we send out a minFraud Alert.
You can receive minFraud Alerts via email or webhook.
## Receive minFraud Alerts via email
You can set an email where you would like to receive minFraud Alerts through the
[minFraud Alert configuration screen in your account portal](https://www.maxmind.com/en/accounts/current/minfraud/alerts/settings)
(login required).
## Receive minFraud Alerts via webhook
You can also receive minFraud Alerts by webhook, and integrate your own response
to these alerts on your server. You can configure your minFraud Alert webhook
settings through the
[minFraud Alert configuration screen in your account portal](https://www.maxmind.com/en/accounts/current/minfraud/alerts/settings)
(login required).
### Configuration
The alert webhook URL should be an HTTPS endpoint that accepts `GET` requests.
The User-Agent of the minFraud Alert service is `MaxMind MinFraud Alert Robot`.
For a machine-readable description of the webhook's headers and parameters, see
the
[minFraud OpenAPI specification](https://github.com/maxmind/openapi/blob/main/bundled/minfraud.yaml)
([raw file](https://raw.githubusercontent.com/maxmind/openapi/main/bundled/minfraud.yaml)).
#### Sample minFraud Alert webhook request
```html
http://yourdomain/yoururl?i=24.24.24.24&maxmindID=1234ABCD&domain=sample.com&city=Anytown®ion=CA&country=US&date=Jan.+1,+1970&txnID=foo123&reason=IP+address+has+been+marked+as+a+high-risk+IP&reason_code=HIGH_RISK_IP&minfraud_id=2afb0d26-e3b4-4624-8e66-fd10e64b95df&shop_id=shop321
```
#### Parameters
The following are the parameters that will be included in the query string of
the request. Additional parameters may be added in the future.
##### `city`
Type: string (max length: 255).
The billing city included in the original minFraud request.
##### `country`
Type: string (max length: 2).
The billing country included in the original minFraud request.
##### `date`
Type: string (max length: 255).
The date of the original minFraud request, e.g., `Nov. 1, 2019`.
##### `domain`
Type: string (max length: 255).
The email domain included in the original minFraud request.
##### `i`
Type: string (format: IPv4 or IPv6).
The IP address included in the original minFraud request.
##### `maxmindID`
Type: string (max length: 8).
The minFraud Legacy `maxmindID` of the original minFraud request.
##### `minfraud_id`
Type: string (format: UUID).
The minFraud ID of the original minFraud request.
##### `new_risk_score`
Type: decimal (min: 0.01, max: 99).
The updated risk score, calculated after your initial query with additional
information.
##### `old_risk_score`
Type: decimal (min: 0.01, max: 99).
The risk score as originally calculated.
##### `postal`
Type: string (max length: 255).
The billing postal code included in the original minFraud request.
##### `reason`
Type: string.
A human-readable description of why the minFraud alert was sent. See below for
the current list of possible reasons.
##### `reason_code`
Type: string (format: enum).
A fixed, machine-readable code for the reason why the minFraud alert was sent.
See below for the current list of possible reasons.
##### `region`
Type: string (max length: 4).
The billing region included in the original minFraud request.
##### `shop_id`
Type: string (max length: 255).
The shop ID included in the original minFraud request. This will only be set if
the original request included a shop ID.
##### `txnID`
Type: string (max length: 255).
The transaction ID included in the original minFraud request.
##### `updated_at`
Type: string (max length: 255).
The date and time at which the new risk score was calculated, in RFC3339 format,
e.g., `2019-11-01T12:34:56Z`.
#### Possible alert reasons
These are the possible `reason_code`s which might be returned with a minFraud
Alert. These codes are subject to change.
| `reason_code` | `reason` |
| ------------------ | ------------------------------------------------------------------------------------------------ |
| `CARDER_EMAIL` | Email on order was flagged as high-risk email, as it was associated with another high-risk order |
| `HIGH_RISK_DEVICE` | Device ID has been marked as a high-risk device ID |
| `HIGH_RISK_IP` | IP address has been marked as a high-risk IP |
| `HOSTING_PROVIDER` | IP is from a high-risk hosting provider |
| `MANUAL_REVIEW` | The transaction was flagged as risky after manual review |
| `POSTAL_VELOCITY` | IP address had high velocity of orders (e.g. different zip codes on same IP address) |
### Securing your webhook
You can secure your webhook by verifying that alert requests come from MaxMind:
- Check that requests come from one of the MaxMind IPs we
[list below](/minfraud/alerts/index.md#alert-webhook-request-ips).
- Check that requests are signed using a secret you configure in your minFraud
Alert configuration screen in your account portal.
[Learn more about setting up signed requests below.](/minfraud/alerts/index.md#signed-requests)
#### Alert webhook request IPs
minFraud alert requests may come from one of the following IP addresses. This
list is subject to change.
- `34.27.174.58`
- `2600:1900:4000:947::/64`
#### Signed requests
Alert requests can be signed by MaxMind. To enable signed requests, visit your
[minFraud Alert configuration screen in your account portal](https://www.maxmind.com/en/accounts/current/minfraud/alerts/settings)
(login required) and set an Alert Webhook Secret.
Once you set a secret, each alert request will have an HTTP header with a
signature of the request. You can calculate the signature of the request on your
server and check it matches the signature in the header to verify the request is
authentic.
For example, if the secret is `supersecret-0123456789` and the alert request is:
```html
http://yourdomain/yoururl?i=24.24.24.24&maxmindID=1234ABCD&domain=sample.com&city=Anytown®ion=CA&country=US&date=Jan.+1,+1970&txnID=foo123&reason=IP+address+has+been+marked+as+a+high-risk+IP&reason_code=HIGH_RISK_IP&minfraud_id=2afb0d26-e3b4-4624-8e66-fd10e64b95df&shop_id=shop321
```
Then the request will include this header:
```
X-MaxMind-Alert-HMAC-SHA256: dd11717fc5559effc9607d03f2ad534ac8f7c7f81acba8d2c14d0ed484974ff0
```
The signature is the hex encoded HMAC-SHA256 of the URL query parameters -
everything after the `?` in the request URL. In this case, the text to be signed
is:
```html
i=24.24.24.24&maxmindID=1234ABCD&domain=sample.com&city=Anytown®ion=CA&country=US&date=Jan.+1,+1970&txnID=foo123&reason=IP+address+has+been+marked+as+a+high-risk+IP&reason_code=HIGH_RISK_IP&minfraud_id=2afb0d26-e3b4-4624-8e66-fd10e64b95df&shop_id=shop321
```
Please note that the URL query parameters should be from the raw request string
that our server sends. In particular, note that space characters are encoded as
`+` characters.
You can check the signature using something like the following code:
```ruby
require 'openssl'
require 'openssl/hmac'
require 'rack/utils'
def verify_signature(secret, header, query)
expectedMAC = OpenSSL::HMAC.hexdigest('SHA256', secret, query)
raise 'invalid signature' if !Rack::Utils.secure_compare(header, expectedMAC)
end
```
```go
import (
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
)
func verifySignature(secret, header, query string) (bool, error) {
gotMAC, err := hex.DecodeString(header)
if err != nil {
return false, err
}
mac := hmac.New(sha256.New, []byte(secret))
mac.Write([]byte(query))
expectedMAC := mac.Sum(nil)
return hmac.Equal(gotMAC, expectedMAC), nil
}
```
To avoid [timing attacks](https://en.wikipedia.org/wiki/Timing_attack), please
use a secure comparison function rather than the equals operator of your
language.
# minFraud API Documentation
Source: https://dev.maxmind.com/minfraud/api-documentation/
> **ℹ️ Info**
>
> If you are a [minFraud Legacy](/minfraud/minfraud-legacy/index.md)
> customer, please see our
> [What's New in minFraud Score, minFraud Insights, and minFraud Factors](/minfraud/whats-new-in-minfraud-score-and-minfraud-insights/index.md)
> document for a summary of the changes.
## Overview
To learn more about the minFraud services and to purchase credits, please visit
the
[minFraud Overview page](https://www.maxmind.com/en/solutions/fraud-and-risk).
To better understand the differences between each minFraud service, review our
[minFraud Service Comparison page](https://www.maxmind.com/en/solutions/fraud-and-risk/plans-pricing)
and the
[API response body documentation](/minfraud/api-documentation/responses/index.md#response-body).
## OpenAPI Specification
The
[minFraud OpenAPI specification](https://github.com/maxmind/openapi/blob/main/bundled/minfraud.yaml)
([raw file](https://raw.githubusercontent.com/maxmind/openapi/main/bundled/minfraud.yaml))
describes the minFraud web services, including transaction reporting,
dispositions, and alert webhooks. Use the raw file with API tools and code
generators.
## Client APIs
The following APIs are developed and maintained by MaxMind. See
[our guide on developing for the community](/contribute/index.md) if you have questions
about creating or sharing your own unofficial clients or integrations.
| Language or Framework | Package Repository | Documentation | Version Control |
| --------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------- |
| .NET (C#) | [NuGet](https://www.nuget.org/packages/MaxMind.MinFraud) | [GitHub Pages](https://maxmind.github.io/minfraud-api-dotnet/) | [GitHub](https://github.com/maxmind/minfraud-api-dotnet) |
| Java | [Maven Central](https://search.maven.org/search?q=g:com.maxmind.minfraud) | [GitHub Pages](https://maxmind.github.io/minfraud-api-java/) | [GitHub](https://github.com/maxmind/minfraud-api-java) |
| Node.js | [NPM](https://www.npmjs.com/package/@maxmind/minfraud-api-node) | [GitHub Pages](https://maxmind.github.io/minfraud-api-node/) | [GitHub](https://github.com/maxmind/minfraud-api-node) |
| Perl (deprecated) | [metacpan](https://metacpan.org/release/WebService-MinFraud) | [metacpan](https://metacpan.org/pod/WebService::MinFraud) | [GitHub](https://github.com/maxmind/minfraud-api-perl) |
| PHP | [Packagist](https://packagist.org/packages/maxmind/minfraud) | [GitHub Pages](https://maxmind.github.io/minfraud-api-php/) | [GitHub](https://github.com/maxmind/minfraud-api-php) |
| Python | [PyPI](https://pypi.org/project/minfraud/) | [Read the Docs](https://minfraud.readthedocs.io/en/latest/) | [GitHub](https://github.com/maxmind/minfraud-api-python) |
| Ruby | [RubyGems.org](https://rubygems.org/gems/minfraud) | [RubyDoc.info](https://www.rubydoc.info/gems/minfraud/) | [GitHub](https://github.com/maxmind/minfraud-api-ruby) |
## Additional Features
### Disposition API
We provide a [Dispositions API](/minfraud/working-with-transaction-dispositions/index.md)
for use with Disposition setting from the Transaction Details page. Use this API
to integrate with your order management system, payment processor, or other
internal system so that manual review decisions made from the account portal are
available within your own systems. For more information about setting
dispositions from the account portal, please refer to the
[article on reviewing transactions on our knowledge base](https://support.maxmind.com/knowledge-base/articles/review-a-minfraud-transaction).
### Report Transactions
If you are using our minFraud transaction fraud detection service, we also
encourage you to use our
[report transaction service](/minfraud/report-a-transaction/index.md). By reporting
transactions, you can help us significantly increase the amount of fraud we can
detect for you. We build custom machine learning models for each customer based
on reported transactions. We also manually review many reported transactions to
identify customizations and algorithmic improvements for each customer reporting
feedback.
### Device Tracking Add-On
You may optionally include the [Device Tracking Add-On](/minfraud/track-devices/index.md)
to help us identify the device your customer is using to determine whether it
has been used in previous fraudulent transactions. The device information is
factored into the scores returned through the minFraud service.
## Timeout Errors
If you get timeout errors, first confirm if we experienced a service disruption
on our [status page](https://status.maxmind.com/) or on
[Pingdom](https://stats.pingdom.com/datuqzybqg5z).
If there has not been a service disruption, we may be able to help you diagnose
your connection issues. Please use our
[`mm-network-analyzer` program](https://github.com/maxmind/mm-network-analyzer),
which is designed to aid in diagnosing networking issues. It creates a zip file
containing various network checks like traceroute, DNS, etc. You can download
the latest version, run it, and send the resulting zip file to our support team
for review.
Please note, `mm-network-analyzer` is not compatible with Windows, but you can
reach out to support with the following information (if available to you) to
help us investigate an issue:
- Your requesting server’s IP address
- Which web service demonstrates the issue
- What integration method you’re using for that web service
- Any full error messages you’re receiving
- Date and time frame (including time zone) that you experienced the issue
- Your traceroute to `minfraud.maxmind.com`
[You can submit your support request on our knowledge base.](https://support.maxmind.com/knowledge-base)
## Versioning
The minFraud Score, minFraud Insights, and minFraud Factors web services use two
part versions. Our current release is version 2.0. The major version number will
remain at 2 for the foreseeable future.
The minor version will only change if there are breaking changes in the web
service. A breaking change is one that breaks client code that follows the
documentation on this page. Breaking changes include changing the type of an
existing field, deleting a field entirely, or changing URIs.
All changes to the web services will be documented in the
[minFraud release notes](/minfraud/release-notes/index.md), whether or not the version
number is changed.
The following changes are not considered to be breaking changes and will not be
accompanied by a version number change:
- Increased validation of inputs that causes a warning to be returned when there
previously was not one.
- Adding a new request or response field, either at the top level of the
structure or in one particular object such as `billing` or `credit_card`.
Client code should be written to allow for new fields to appear.
- Adding new values to enum fields such as processor.
- Adding or removing warning or error codes, and/or changing the body type for
an error. Client code should always check the `Content-Type` header for any
error response. Client code should also be prepared to handle any valid HTTP
4xx or 5xx status code.
- Adding a new service with a new path.
## License
These services incorporate [GeoNames](https://www.geonames.org/) geographical
data, which is made available under the
[Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/).
# minFraud API Requests
Source: https://dev.maxmind.com/minfraud/api-documentation/requests/
## Authorization and Security
The HTTP `Authorization` header is required for authorization. The username is
your
[MaxMind account ID](https://www.maxmind.com/en/accounts/current/license-key).
The password is your
[MaxMind license key](https://www.maxmind.com/en/accounts/current/license-key).
> **⚠️ Warning**
>
> You must be approved for a trial or purchase credit for
> use with our web services in order to receive an account ID and license key.
We use
[basic HTTP authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).
The APIs which require authentication are only available via HTTPS. Always use
HTTPS, so that your credentials are never transmitted unencrypted. If you
attempt to access this service via HTTP, you will receive a `403 Forbidden` HTTP
response.
We require TLS 1.2 or greater for all requests to our servers to keep your data
secure.
## Service Endpoints
The endpoint for each service is as specified below.
| Service | HTTP Method | Endpoint |
| -------- | ----------- | ----------------------------------------------------- |
| Score | `POST` | `https://minfraud.maxmind.com/minfraud/v2.0/score` |
| Insights | `POST` | `https://minfraud.maxmind.com/minfraud/v2.0/insights` |
| Factors | `POST` | `https://minfraud.maxmind.com/minfraud/v2.0/factors` |
The **minfraud.maxmind.com** hostname automatically picks the data center
geographically closest to you.
## Headers
The `Authorization` header is always required. See
[Authorization and Security](/minfraud/api-documentation/requests/index.md#authorization-and-security) for more details.
The `Accept` and `Accept-Charset` headers are optional. The service ignores them
and always returns JSON encoded as UTF-8.
## Request Body
Currently minFraud Score, minFraud Insights, and minFraud Factors use the same
request document format. The request consists of a JSON object with one or more
of the fields shown below. Each key in the top-level object maps to an object or
array as described below. New fields that apply to one or more services may be
added in the future.
String fields are limited to no more than 255 valid Unicode characters unless a
different length is specified; the null and newline characters are forbidden. Of
course, many fields also have additional constraints that limit the length. For
example, the `ip_address` field cannot be longer than the longest valid
representation of an IPv6 address. Unless it must match a specific format, it is
valid for a string field to be empty.
Boolean fields must be provided as JSON `true` or `false`.
Unless otherwise specified, if the value meets the requirements for the field,
then it will not be modified. Beyond field-specific exceptions, an exception to
this is if the value is provided as a type different from what we require. In
such cases we convert it to the required type if possible. For example, if you
provide a string field as a number, then it will be converted to a string, and
vice versa. This conversion happens only between numbers and strings.
The entire request body is limited to 20,000 bytes. Requests larger than this
size will be rejected.
```json
{
"account": {
"user_id": "3132",
"username_md5": "570a90bfbf8c7eab5dc5d4e26832d5b1"
},
"billing": {
"address": "400 Blake St.",
"address_2": "Suite 5",
"city": "New Haven",
"company": "Big Corp.",
"country": "US",
"first_name": "John",
"last_name": "Doe",
"phone_country_code": "1",
"phone_number": "203-000-0000",
"phone_verification_method": "delivered_code",
"phone_verification_time": "2026-10-01T14:30:00Z",
"phone_was_verification_successful": true,
"postal": "06511",
"region": "CT"
},
"credit_card": {
"avs_result": "Y",
"bank_name": "Bank of America",
"bank_phone_country_code": "1",
"bank_phone_number": "800-342-1232",
"country": "US",
"cvv_result": "N",
"issuer_id_number": "323132",
"last_digits": "7643",
"token": "OQRST14PLQ98323",
"was_3d_secure_successful": true
},
"custom_inputs": {
"a_custom_input_key": "NSC0083121",
"another_custom_input_key": false
},
"device": {
"accept_language": "en-US,en;q=0.8",
"ip_address": "2001:db8::ff00:42:8329",
"session_age": 3600.5,
"session_id": "c2ffa1b7-f5c5-4702-beb2-4254794fe391",
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36"
},
"email": {
"address": "977577b140bfb7c516e4746204fbdb01",
"domain": "maxmind.com",
"verification_time": "2026-10-01T14:25:00Z",
"was_verification_successful": true
},
"event": {
"party": "customer",
"shop_id": "s2123",
"transaction_id": "txn3134133",
"type": "purchase"
},
"order": {
"affiliate_id": "af12",
"amount": 323.21,
"currency": "USD",
"discount_code": "FIRST",
"has_gift_message": false,
"is_gift": true,
"referrer_uri": "http://www.google.com/",
"subaffiliate_id": "saf42"
},
"payment": {
"decline_code": "card_declined",
"method": "card",
"processor": "stripe",
"was_authorized": false
},
"shipping": {
"address": "82 Wall St.",
"address_2": "#1",
"city": "New Haven",
"company": "Smaller, Inc.",
"country": "US",
"delivery_speed": "same_day",
"first_name": "Jane",
"last_name": "Doe",
"phone_country_code": "1",
"phone_number": "203-000-0000",
"phone_verification_method": "delivered_code",
"phone_verification_time": "2026-10-01T14:30:00Z",
"phone_was_verification_successful": true,
"postal": "06515",
"region": "CT"
},
"shopping_cart": [
{
"category": "pets",
"item_id": "ad23232",
"price": 20.43,
"quantity": 2
},
{
"category": "beauty",
"item_id": "bst112",
"price": 100,
"quantity": 1
}
]
}
```
### Device
`device` is a JSON object that contains information about the device used in the
transaction.
```json
{
"accept_language": "en-US,en;q=0.8",
"ip_address": "2001:db8::ff00:42:8329",
"session_age": 3600.5,
"session_id": "c2ffa1b7-f5c5-4702-beb2-4254794fe391",
"tracking_token": "abc123...",
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36"
}
```
#### `device.ip_address`
Type: string (format: IPv4 or IPv6).
The IP address associated with the device used by the customer in the transaction. The IP address must be in IPv4 or IPv6 presentation format, i.e., dotted-quad notation or the IPv6 hexadecimal-colon notation.
[Get tips for how to pass the /device/ip\_address input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/device-inputs-minfraud#ip-address)
#### `device.user_agent`
Type: string (max length: 512).
The HTTP `User-Agent` header of the browser used in the transaction.
[Learn more about the /device/user\_agent input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/device-inputs-minfraud#browser-information)
#### `device.accept_language`
Type: string (max length: 255).
The HTTP `Accept-Language` header of the device used in the transaction.
[Learn more about the /device/accept\_language input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/device-inputs-minfraud#browser-information)
#### `device.session_age`
Type: decimal (min: 0, max: 1e13-1).
The number of seconds between the creation of the user's session and the time of the transaction. Note that `session_age` is not the duration of the current visit, but the time since the start of the first visit.
[Learn more about the /device/session\_age input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/device-inputs-minfraud#session-information)
#### `device.session_id`
Type: string (max length: 255).
An ID that uniquely identifies a visitor's session on the site.
[Learn more about the /device/session\_id input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/device-inputs-minfraud#session-information)
#### `device.tracking_token`
Type: string.
The token returned by the [Device Tracking Add-On](/minfraud/track-devices/index.md) client-side code, used for explicit device linking. When provided, this token enables high-confidence device matching that does not rely on the IP address alone.
[Learn more about explicit device linking on our device tracking page.](/minfraud/track-devices/index.md#explicit-device-linking)
### Event
`event` is a JSON object that contains general information related to the event
being scored.
```json
{
"party": "customer",
"shop_id": "s2123",
"transaction_id": "txn3134133",
"type": "purchase"
}
```
#### `event.transaction_id`
Type: string (max length: 255).
Your internal ID for the transaction. We can use this to locate a specific transaction in our logs, and it will also show up in email alerts and notifications from us to you. No specific format is required.
[Learn more about the /event/transaction\_id input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/event-and-account-inputs-minfraud#transactor-identifier)
#### `event.shop_id`
Type: string (max length: 255).
Your internal ID for the shop, affiliate, or merchant this order is coming from. Required for minFraud users who are resellers, payment providers, gateways, and affiliate networks. No specific format is required. However, if you are testing the minFraud service, please add a `test` prefix to your shop ID (e.g. `testfoo23` or `test:foo23`) or set your shop ID to `test` if you don’t have a shop ID.
[Learn more about the /event/shop\_id input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/event-and-account-inputs-minfraud#storefront-identifier)
#### `event.time`
Type: string.
The date and time the event occurred. The string must be in the [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) date-time format. The time must be within the past year. If this field is not in the request, the current time will be used.
**It is not recommended to use this input when scoring live transactions as they occur.** However, it can be useful if you store transactions to be submitted to the service for scoring later.
Please note that you cannot submit times more than one year in the past. If you submit an event time more than one year in the past, the current time will be used to score the transaction, and a warning will be returned.
[Learn more about the /event/time input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/event-and-account-inputs-minfraud#transaction-time)
#### `event.type`
Type: string (format: enum).
The type of event being scored. The valid types are:
| Transaction type | Description |
| ---------------------------- | ------------------------------------------------------------------- |
| `account_creation` | The transactor is attempting to create an account in your system. |
| `account_login` | The transactor is attempting to log in to an account in your system. |
| `credit_application` | The transactor is attempting to submit an application for credit. |
| `email_change` | The transactor is attempting to change the email address associated with their account in your system. |
| `fund_transfer` | The transactor is attempting to transfer funds from one account to another. |
| `password_reset` | The transactor is attempting to reset their password in your system. |
| `payout_change` | The transactor is attempting to change how they will be paid in your system. The transactor may be sending you referral traffic or completing surveys, but this transaction type can be used in any circumstance in which you pay your users, and they are attempting to change how they are paid. |
| `purchase` | The transactor is attempting to make a purchase. |
| `recurring_purchase` | The transactor is attempting to set up a recurring purchase or subscription. |
| `referral` | The transactor is sending you referral traffic, for example referring someone to an e-commerce site with an ad. |
| `sim_swap` | For mobile network operators. A new SIM card or eSIM is being issued to activate service on a customer's existing phone number. |
| `survey` | The transactor is attempting to begin or complete a survey. |
[Learn more about the /event/type input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/event-and-account-inputs-minfraud#transaction-identifier)
#### `event.party`
Type: string (format: enum).
The party submitting this transaction. The valid values are:
* `agent`
* `customer`
### Account
`account` is a JSON object that contains account information for the end-user on
the site where the event took place.
```json
{
"user_id": "3132",
"username_md5": "570a90bfbf8c7eab5dc5d4e26832d5b1"
}
```
#### `account.user_id`
Type: string (max length: 255).
A unique user ID associated with the end-user in your system. If your system allows the login name for the account to be changed, this should not be the login name for the account, but rather should be an internal ID that does not change. This is not your MaxMind account ID. No specific format is required.
[Learn more about the /account/user\_id input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/event-and-account-inputs-minfraud#transactor-identifier)
#### `account.username_md5`
Type: string (exactly 32 hexadecimal characters).
An MD5 hash as a hexadecimal string of the username or login name associated with the account.
### Email
`email` is a JSON object that contains information about the email address of
the end-user who initiated the event.
```json
{
"address": "977577b140bfb7c516e4746204fbdb01",
"domain": "maxmind.com",
"verification_time": "2026-10-01T14:25:00Z",
"was_verification_successful": true
}
```
#### `email.address`
Type: string (max length: 255, type: Email or MD5 of Email).
This field must be either a valid email address or an MD5 of the email used in the transaction.
[Learn more about the /email/address input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/passing-email-inputs-minfraud)
#### `email.domain`
Type: string (max length: 255).
The domain of the email address used in the transaction. Do not include the `@` in this field.
You do not need to pass the email domain input unless you are passing the email address as an MD5 hash. [Learn more about hashed email inputs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/passing-email-inputs-minfraud#email-hashing)
#### `email.verification_time`
Type: string.
The date and time of the most recent completed verification of the email address, if known. The value must reflect the verification state as of the time of the event. Use the time the verification succeeded or failed, for example the time the user clicked the link, not the time you sent the link. Do not include this field if no verification was attempted or no verification is complete. The string must be in the [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) date-time format. The time must not be before 1970-01-01T00:00:00Z or more than two days in the future. For a time outside this range, MaxMind ignores the input and returns a warning.
[Learn more about the /email/verification\_time input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/passing-email-inputs-minfraud)
#### `email.was_verification_successful`
Type: boolean.
Whether the most recent completed verification that the end user controls this email address was successful (e.g. by confirming a link sent to the email address). The value must reflect the verification state as of the time of the event. `true` if the email verification was successful, or `false` if the user failed email verification. A pending, abandoned, or expired verification is not complete and is not a failure. If no verification is complete, for example because the user has not clicked the link yet, do not include this field. Do not include this field if you have not performed this check.
[Learn more about the /email/was\_verification\_successful input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/passing-email-inputs-minfraud)
### Billing
`billing` is a JSON object that contains the billing address and contact
information provided by the end-user who initiated the event.
[Learn more about the billing address inputs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/billing-and-shipping-inputs-minfraud#billing-address)
```json
{
"address": "400 Blake St.",
"address_2": "Suite 5",
"city": "New Haven",
"company": "Big Corp.",
"country": "US",
"first_name": "John",
"last_name": "Doe",
"phone_country_code": "1",
"phone_number": "203-000-0000",
"phone_verification_method": "delivered_code",
"phone_verification_time": "2026-10-01T14:30:00Z",
"phone_was_verification_successful": true,
"postal": "06511",
"region": "CT"
}
```
#### `billing.first_name`
Type: string (max length: 255).
The first name of the end user as provided in their billing information.
#### `billing.last_name`
Type: string (max length: 255).
The last name of the end user as provided in their billing information.
#### `billing.company`
Type: string (max length: 255).
The company of the end user as provided in their billing information.
#### `billing.address`
Type: string (max length: 255).
The first line of the user's billing address.
#### `billing.address_2`
Type: string (max length: 255).
The second line of the user's billing address.
#### `billing.city`
Type: string (max length: 255).
The city of the user's billing address.
#### `billing.region`
Type: string (1-4 uppercase letters or digits).
The [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO%5F3166-2) for the user's billing address.
#### `billing.country`
Type: string (max length: 2).
The two-character [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO%5F3166-1%5Falpha-2) of the user's billing address.
#### `billing.postal`
Type: string (max length: 255).
The postal code of the user's billing address.
#### `billing.phone_number`
Type: string (max length: 255).
The phone number without the country code for the user's billing address. Punctuation characters will be stripped. After stripping punctuation characters, the number must contain only digits.
#### `billing.phone_country_code`
Type: string (1-4 digits).
The country code for the phone number associated with the user's billing
address. Use digits only; do not include a leading `+`.
#### `billing.phone_verification_method`
Type: string (format: enum).
The method used for the most recent completed verification of the billing phone number. The value must reflect the verification state as of the time of the event. The valid values are:
| Method | Description |
| ---------------- | --------------------------------------------------------------------------- |
| `network` | Carrier or SIM-based silent network authentication. No code is sent to the device. |
| `delivered_code` | A one-time code delivered to the phone number by SMS, an automated voice call, or an over-the-top messaging channel such as WhatsApp or RCS, and entered by the user. |
| `other` | A method not listed above, such as flash or missed call verification, or a method you do not know because a third party performed the check. |
If you send a value that is not in this list, the service returns an `INPUT_INVALID` warning. Do not include this field if no verification was attempted or no verification is complete.
[Learn more about the /billing/phone\_verification\_method input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/billing-and-shipping-inputs-minfraud#billing-address)
#### `billing.phone_was_verification_successful`
Type: boolean.
Whether the most recent completed verification that the end user controls this billing phone number was successful, using the method named in `phone_verification_method`. The value must reflect the verification state as of the time of the event. `true` if the phone verification was successful, or `false` if the user failed phone verification. A pending, abandoned, or expired verification is not complete and is not a failure. If no verification is complete, for example because the user has not entered the code yet, do not include this field. Do not include this field if you have not performed this check.
[Learn more about the /billing/phone\_was\_verification\_successful input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/billing-and-shipping-inputs-minfraud#billing-address)
#### `billing.phone_verification_time`
Type: string.
The date and time of the most recent completed verification of the billing phone number, if known. The value must reflect the verification state as of the time of the event. Use the time the verification succeeded or failed, for example the time the user entered the code, not the time you sent the code. Do not include this field if no verification was attempted or no verification is complete. The string must be in the [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) date-time format. The time must not be before 1970-01-01T00:00:00Z or more than two days in the future. For a time outside this range, MaxMind ignores the input and returns a warning.
[Learn more about the /billing/phone\_verification\_time input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/billing-and-shipping-inputs-minfraud#billing-address)
### Shipping
`shipping` is a JSON object that contains the shipping address and contact
information provided by the end-user who initiated the event.
[Learn more about the shipping address inputs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/billing-and-shipping-inputs-minfraud#shipping-address)
```json
{
"address": "82 Wall St.",
"address_2": "#1",
"city": "New Haven",
"company": "Smaller, Inc.",
"country": "US",
"delivery_speed": "same_day",
"first_name": "Jane",
"last_name": "Doe",
"phone_country_code": "1",
"phone_number": "203-000-0000",
"phone_verification_method": "delivered_code",
"phone_verification_time": "2026-10-01T14:30:00Z",
"phone_was_verification_successful": true,
"postal": "06515",
"region": "CT"
}
```
#### `shipping.first_name`
Type: string (max length: 255).
The first name of the end user as provided in their shipping information.
#### `shipping.last_name`
Type: string (max length: 255).
The last name of the end user as provided in their shipping information.
#### `shipping.company`
Type: string (max length: 255).
The company of the end user as provided in their shipping information.
#### `shipping.address`
Type: string (max length: 255).
The first line of the user's shipping address.
#### `shipping.address_2`
Type: string (max length: 255).
The second line of the user's shipping address.
#### `shipping.city`
Type: string (max length: 255).
The city of the user's shipping address.
#### `shipping.region`
Type: string (1-4 uppercase letters or digits).
The [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO%5F3166-2) for the user's shipping address.
#### `shipping.country`
Type: string (max length: 2).
The two-character [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO%5F3166-1%5Falpha-2) of the user's shipping address.
#### `shipping.postal`
Type: string (max length: 255).
The postal code of the user's shipping address.
#### `shipping.phone_number`
Type: string (max length: 255).
The phone number without the country code for the user's shipping address. Punctuation characters will be stripped. After stripping punctuation characters, the number must contain only digits.
#### `shipping.phone_country_code`
Type: string (1-4 digits).
The country code for the phone number associated with the user's shipping
address. Use digits only; do not include a leading `+`.
#### `shipping.phone_verification_method`
Type: string (format: enum).
The method used for the most recent completed verification of the shipping phone number. The value must reflect the verification state as of the time of the event. The valid values are:
| Method | Description |
| ---------------- | --------------------------------------------------------------------------- |
| `network` | Carrier or SIM-based silent network authentication. No code is sent to the device. |
| `delivered_code` | A one-time code delivered to the phone number by SMS, an automated voice call, or an over-the-top messaging channel such as WhatsApp or RCS, and entered by the user. |
| `other` | A method not listed above, such as flash or missed call verification, or a method you do not know because a third party performed the check. |
If you send a value that is not in this list, the service returns an `INPUT_INVALID` warning. Do not include this field if no verification was attempted or no verification is complete.
[Learn more about the /shipping/phone\_verification\_method input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/billing-and-shipping-inputs-minfraud#shipping-address)
#### `shipping.phone_was_verification_successful`
Type: boolean.
Whether the most recent completed verification that the end user controls this shipping phone number was successful, using the method named in `phone_verification_method`. The value must reflect the verification state as of the time of the event. `true` if the phone verification was successful, or `false` if the user failed phone verification. A pending, abandoned, or expired verification is not complete and is not a failure. If no verification is complete, for example because the user has not entered the code yet, do not include this field. Do not include this field if you have not performed this check.
[Learn more about the /shipping/phone\_was\_verification\_successful input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/billing-and-shipping-inputs-minfraud#shipping-address)
#### `shipping.phone_verification_time`
Type: string.
The date and time of the most recent completed verification of the shipping phone number, if known. The value must reflect the verification state as of the time of the event. Use the time the verification succeeded or failed, for example the time the user entered the code, not the time you sent the code. Do not include this field if no verification was attempted or no verification is complete. The string must be in the [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) date-time format. The time must not be before 1970-01-01T00:00:00Z or more than two days in the future. For a time outside this range, MaxMind ignores the input and returns a warning.
[Learn more about the /shipping/phone\_verification\_time input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/billing-and-shipping-inputs-minfraud#shipping-address)
#### `shipping.delivery_speed`
Type: string (format: enum).
The shipping delivery speed for the order. The valid values are:
* `same_day`
* `overnight`
* `expedited`
* `standard`
### Payment
`payment` is a JSON object that contains information from and about the payment
process that was used for the event.
```json
{
"decline_code": "card_declined",
"method": "card",
"processor": "stripe",
"was_authorized": false
}
```
#### `payment.method`
Type: string (format: enum).
The payment method associated with the transaction. The valid values are:
| Payment method | Description |
| ---------------------------- | ------------------------------------------------------------------ |
| `bank_debit` | A direct debit of the customer's bank account. |
| `bank_redirect` | The customer authorizes payment after authentication via their bank. |
| `bank_transfer` | The customer pushes funds directly from their bank account. |
| `buy_now_pay_later` | Payment via a buy now, pay later provider (e.g. Affirm, Afterpay, Klarna, etc.). |
| `card` | Payment by card, such as a credit, debit, or charge card. |
| `crypto` | Payment via a cryptocurrency. |
| `digital_wallet` | Payment from a digital wallet linked to a card or bank account (e.g. Apple Pay, Google Pay, PayPal, etc.). |
| `gift_card` | Payment via a merchant-sponsored gift card. |
| `real_time_payment` | The customer pushes funds directly from their bank account or other funding source using an intermediary to authenticate, such as a phone number or other account (e.g. Pix, PayNow, Swish, etc.). |
| `rewards` | Payment via rewards or loyalty program incentives. |
[Learn more about payment method inputs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/event-and-account-inputs-minfraud#payment-method-information)
#### `payment.processor`
Type: string (format: enum).
The payment processor used for the transaction. The valid values are:
* `adyen`
* `affirm`
* `afterpay`
* `altapay`
* `amazon_payments`
* `american_express_payment_gateway`
* `apple_pay`
* `aps_payments`
* `authorizenet`
* `balanced`
* `banquest`
* `beanstream`
* `bluepay`
* `bluesnap`
* `boacompra`
* `boku`
* `bpoint`
* `braintree`
* `cardknox`
* `cardpay`
* `cashfree`
* `ccavenue`
* `ccnow`
* `cetelem`
* `chase_paymentech`
* `checkout_com`
* `cielo`
* `collector`
* `commdoo`
* `compropago`
* `concept_payments`
* `conekta`
* `coregateway`
* `creditguard`
* `credorax`
* `cryptomus`
* `ct_payments`
* `cuentadigital`
* `curopayments`
* `cybersource`
* `dalenys`
* `dalpay`
* `datacap`
* `datacash`
* `dibs`
* `digital_river`
* `dlocal`
* `dotpay`
* `ebs`
* `ecomm365`
* `ecommpay`
* `elavon`
* `emerchantpay`
* `epay`
* `epayco`
* `eprocessing_network`
* `epx`
* `eway`
* `exact`
* `fat_zebra`
* `first_atlantic_commerce`
* `first_data`
* `fiserv`
* `g2a_pay`
* `global_payments`
* `gocardless`
* `google_pay`
* `heartland`
* `hipay`
* `ingenico`
* `interac`
* `internetsecure`
* `intuit_quickbooks_payments`
* `iugu`
* `klarna`
* `komoju`
* `lemon_way`
* `mastercard_payment_gateway`
* `mercadopago`
* `mercanet`
* `merchant_esolutions`
* `mirjeh`
* `mollie`
* `moneris_solutions`
* `neopay`
* `neosurf`
* `nmi`
* `oceanpayment`
* `oney`
* `onpay`
* `openbucks`
* `openpaymx`
* `optimal_payments`
* `orangepay`
* `other`
* `pacnet_services`
* `payconex`
* `payeezy`
* `payfast`
* `paygate`
* `paylike`
* `payment_express`
* `paymentwall`
* `payone`
* `paypal`
* `payplus`
* `paysafecard`
* `paysera`
* `paystation`
* `paytm`
* `paytrace`
* `paytrail`
* `payture`
* `payulatam`
* `payvision`
* `payu`
* `payway`
* `payza`
* `pinpayments`
* `placetopay`
* `posconnect`
* `princeton_payment_solutions`
* `psigate`
* `pxp_financial`
* `qiwi`
* `quickpay`
* `raberil`
* `razorpay`
* `rede`
* `redpagos`
* `rewardspay`
* `ryft`
* `safecharge`
* `sagepay`
* `securepay`
* `securetrading`
* `shopify_payments`
* `simplify_commerce`
* `skrill`
* `smartcoin`
* `smartdebit`
* `solidtrust_pay`
* `sps_decidir`
* `stripe`
* `summit_payments`
* `synapsefi`
* `systempay`
* `telerecargas`
* `towah`
* `transact_pro`
* `trustly`
* `trustpay`
* `tsys`
* `usa_epay`
* `vantiv`
* `verepay`
* `vericheck`
* `vindicia`
* `virtual_card_services`
* `vme`
* `vpos`
* `windcave`
* `wirecard`
* `worldpay`
* `yaadpay`
If your payment processor is missing from this list, please [contact our support team](https://support.maxmind.com/knowledge-base).
#### `payment.was_authorized`
Type: boolean.
The authorization outcome from the payment processor. If the transaction has not yet been approved or denied, do not include this field.
#### `payment.decline_code`
Type: string (max length: 255).
The decline code as provided by your payment processor. If the transaction was not declined, do not include this field.
### Credit Card
`credit_card` is a JSON object that contains information provided by the
end-user and the payment processor about the credit card used for the event.
```json
{
"avs_result": "Y",
"bank_name": "Bank of America",
"bank_phone_country_code": "1",
"bank_phone_number": "800-342-1232",
"country": "US",
"cvv_result": "N",
"issuer_id_number": "323132",
"last_digits": "7643",
"token": "OQRST14PLQ98323",
"was_3d_secure_successful": true
}
```
#### `credit_card.issuer_id_number`
Type: string (max length: 8).
The issuer ID number for the credit card. This is the first six or eight digits of the credit card number. It identifies the issuing bank. If you do not know whether the IIN is six or eight digits long, send us six digits.
[Learn more about the /credit\_card/issuer\_id\_number input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/credit-card-and-payments-inputs-minfraud#iin-bin)
#### `credit_card.last_digits`
Type: string (max length: 4).
The last digits of the credit card number. In most cases, you should send the last four digits for `last_digits`. If you send an [issuer\_id\_number](/minfraud/api-documentation/requests/index.md#schema--request--credit-card%5F%5Fissuer%5Fid%5Fnumber) that contains an eight-digit IIN, and if the credit card brand is not one of the following, you should send the last two digits for `last_digits`: `Discover`, `JCB`, `Mastercard`, `UnionPay`, `Visa`.
[Learn more about the /credit\_card/last\_digits input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/credit-card-and-payments-inputs-minfraud#partial-cc-numbers)
#### `credit_card.token`
Type: string (max length: 255).
A token uniquely identifying the card. The token should consist of non-space printable ASCII characters. If the token is all digits, it must be more than 19 characters long. The token must not be a primary account number (PAN) or a simple transformation of it. If you have a valid token that looks like a PAN but is not one, you may prefix that token with a fixed string, e.g., `token-`.
[Learn more about the /credit\_card/token input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/credit-card-and-payments-inputs-minfraud#unique-tokens)
#### `credit_card.bank_name`
Type: string (max length: 255).
The name of the issuing bank as provided by the end user.
#### `credit_card.bank_phone_country_code`
Type: string (1-4 digits).
The phone country code for the issuing bank as provided by the end user. Use
digits only; do not include a leading `+`.
#### `credit_card.bank_phone_number`
Type: string (max length: 255).
The phone number, without the country code, for the issuing bank as provided by the end user. Punctuation characters will be stripped. After stripping punctuation characters, the number must contain only digits.
#### `credit_card.country`
Type: string (max length: 2).
The two-character [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO%5F3166-1%5Falpha-2) where the issuer of the card is located. This may be passed instead of the [issuer\_id\_number](/minfraud/api-documentation/requests/index.md#schema--request--credit-card%5F%5Fissuer%5Fid%5Fnumber) if you do not wish to pass partial account numbers, or if your payment processor does not provide them.
[Learn more about the /credit\_card/country input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/credit-card-and-payments-inputs-minfraud#card-issuer-country)
#### `credit_card.avs_result`
Type: string (max length: 1).
The address verification system (AVS) check result, as returned to you by the credit card processor. The minFraud service supports the standard AVS codes.
[Learn more about the /credit\_card/avs\_result input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/credit-card-and-payments-inputs-minfraud#payment-processor-information)
#### `credit_card.cvv_result`
Type: string (max length: 1).
The card verification value (CVV) code as provided by the payment processor.
[Learn more about the /credit\_card/cvv\_result input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/credit-card-and-payments-inputs-minfraud#payment-processor-information)
#### `credit_card.was_3d_secure_successful`
Type: boolean.
Whether the outcome of 3-D Secure verification (e.g. SafeKey, SecureCode, Verified by Visa) was successful. `true` if customer verification was successful, or `false` if the customer failed verification. If 3-D Secure verification was not used, was unavailable, or resulted in another outcome other than success or failure, do not include this field.
[Learn more about the /credit\_card/was\_3d\_secure\_successful input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/credit-card-and-payments-inputs-minfraud#payment-processor-information)
### Order
`order` is a JSON object that contains information about the order associated
with the event.
```json
{
"affiliate_id": "af12",
"amount": 323.21,
"currency": "USD",
"discount_code": "FIRST",
"has_gift_message": false,
"is_gift": true,
"referrer_uri": "http://www.google.com/",
"subaffiliate_id": "saf42"
}
```
#### `order.amount`
Type: decimal (min: 0, max: 1e13-1).
The total order amount for the transaction before taxes and discounts.
[Learn more about the /order/amount input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/order-and-shopping-cart-inputs-minfraud#order-amount)
#### `order.currency`
Type: string (max length: 3).
The [ISO 4217 currency code](https://en.wikipedia.org/wiki/ISO%5F4217) for the currency used in the transaction.
[Learn more about the /order/currency input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/order-and-shopping-cart-inputs-minfraud#order-amount)
#### `order.discount_code`
Type: string (max length: 255).
The discount code applied to the transaction. If multiple discount codes were used, please separate them with a comma.
[Learn more about the /order/discount\_code input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/order-and-shopping-cart-inputs-minfraud#discount-codes)
#### `order.affiliate_id`
Type: string (max length: 255).
The ID of the affiliate where the order is coming from. No specific format is required.
[Learn more about the /order/affiliate\_id input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/order-and-shopping-cart-inputs-minfraud#affiliates-referrers)
#### `order.subaffiliate_id`
Type: string (max length: 255).
The ID of the sub-affiliate where the order is coming from. No specific format is required.
[Learn more about the /order/subaffiliate\_id input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/order-and-shopping-cart-inputs-minfraud#affiliates-referrers)
#### `order.referrer_uri`
Type: string (max length: 1024).
The URI of the referring site for this order. Needs to be absolute and have a URI scheme such as `https://`.
[Learn more about the /order/referrer\_uri input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/order-and-shopping-cart-inputs-minfraud#affiliates-referrers)
#### `order.is_gift`
Type: boolean.
Whether the order was marked as a gift by the purchaser.
[Learn more about the /order/is\_gift input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/order-and-shopping-cart-inputs-minfraud#gift-information)
#### `order.has_gift_message`
Type: boolean.
Whether the purchaser included a gift message.
[Learn more about the /order/has\_gift\_message input on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/order-and-shopping-cart-inputs-minfraud#gift-information)
### Shopping Cart
`shopping_cart` is an array of shopping cart item objects.
Passing hashed values for shopping cart items can increase the privacy of your
customers' information while continuing to fulfill the needs for fraud
detection. A suitable hashed value can be produced by using a cryptographic hash
function and a fixed salt. Using a random salt is not recommended as that will
result in different hashed values for the same plain value, which would make
them ineffective for our fraud detection service. For more information, see:
- [OWASP Cryptographic Storage Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Cryptographic_Storage_Cheat_Sheet.html)
- [NIST FIPS Secure Hash Standard (SHS)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf)
[Learn more about the shopping cart inputs on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/order-and-shopping-cart-inputs-minfraud#shopping-cart-contents)
```json
[
{
"category": "pets",
"item_id": "ad23232",
"price": 20.43,
"quantity": 2
},
{
"category": "beauty",
"item_id": "bst112",
"price": 100,
"quantity": 1
}
]
```
#### `shopping_cart.category`
Type: string (max length: 255).
The category of the item. This can also be a hashed value; see above.
#### `shopping_cart.item_id`
Type: string (max length: 255).
Your internal ID for the item. No specific format is required. This can also be a hashed value; see above.
#### `shopping_cart.quantity`
Type: integer (min: 0, max: 1e13-1).
The quantity of the item in the shopping cart. The value must be a whole number.
#### `shopping_cart.price`
Type: decimal (min: 0, max: 1e13-1).
The per-unit price of this item in the shopping cart. This should use the same currency as the order currency.
### Custom Inputs
`custom_inputs` are optional inputs to the minFraud service that must first be
defined for your account. Select Custom Inputs from the Account Portal in order
to do so. See our
[Custom Inputs documentation](https://support.maxmind.com/knowledge-base/articles/use-custom-inputs-minfraud)
for more information.
**You should never send a full credit card number as an input.** If you attempt
to send a full credit card number as an input, the minFraud service will reject
the input and issue a warning.
[Learn more about valid payment number inputs above.](/minfraud/api-documentation/requests/index.md#schema--request--credit-card)
```json
{
"a_custom_input_key": "NSC0083121",
"another_custom_input_key": false
}
```
#### `custom_inputs.your_custom_BOOLEAN_key`
Type: boolean.
A custom key of your choice with a boolean value.
#### `custom_inputs.your_custom_FLOAT_NUMBER_key`
Type: float (min: -1e13+1, max: 1e13-1).
A custom key of your choice with a floating-point number value.
#### `custom_inputs.your_custom_PHONE_NUMBER_key`
Type: string (format: Phone number, max length: 255).
A custom key of your choice with a string value, formatted as a phone number. Numbers, spaces and punctuation accepted, although spaces and punctuation will be stripped. The following ASCII characters constitute the accepted punctuation: \` \~ ! @ # $ % ^ & \* ( ) - \_ = + ' " ; : , < . > / ? \\ | \[ \] { and }.
#### `custom_inputs.your_custom_STRING_key`
Type: string (max length: 255).
A custom key of your choice with a string value. The null character is not allowed.
# minFraud API Responses
Source: https://dev.maxmind.com/minfraud/api-documentation/responses/
## Headers
The `Content-Type` for a successful response varies based on the service as
outlined below:
| Service | Content-Type |
| --- | --- |
| Score | `application/vnd.maxmind.com-minfraud-score+json; charset=UTF-8; version=2.0` |
| Insights | `application/vnd.maxmind.com-minfraud-insights+json; charset=UTF-8; version=2.0` |
| Factors | `application/vnd.maxmind.com-minfraud-factors+json; charset=UTF-8; version=2.0` |
Errors may be returned with the `Content-Type` set to
`application/vnd.maxmind.com-error+json; charset=UTF-8; version=2.0`. If this is
the case, then the body of the response contains a JSON document with two keys,
`code` and `error`. See the
[Errors](/minfraud/api-documentation/responses/index.md#errors) section for more
details.
A `Content-Length` header will be provided.
## Errors
When the server returns an error (`4xx` or `5xx`), the response may include a
JSON document in the body. This document is a single object with the keys `code`
and `error`. The `code` field is a static error code for machine use. The value
of any given code will never change, though codes can be added or removed. The
`error` field is a human-readable description of the error and may change at any
time.
Not all errors include a JSON body. Some `4xx` errors, such as a `403` for a
plain HTTP request, and many `5xx` errors, which typically happen outside of our
web service request handling code, do not include one. You
should check the `Content-Type` header of an error response before attempting
to decode the body as JSON.
In addition to the errors documented below, client code should also be prepared
to handle any valid HTTP `4xx` or `5xx` status code.
| Code | HTTP Status | Description |
| --- | --- | --- |
| `JSON_INVALID` | 400 Bad Request | We cannot decode the body as a JSON object. |
| `REQUEST_INVALID` | 400 Bad Request | The request body is valid JSON but contains no valid input values. |
| `BAD_REQUEST` | 400 Bad Request | There was a problem reading or decoding the request. |
| `REQUEST_TOO_BIG` | 400 Bad Request | The request body is too large. Keep the request body at 20,000 bytes or less to avoid both this error and the `413` response. |
| `AUTHORIZATION_INVALID` | 401 Unauthorized | You have supplied an invalid [MaxMind account ID and/or license key](https://www.maxmind.com/en/accounts/current/license-key) in the [Authorization](/minfraud/api-documentation/requests/index.md#authorization-and-security) header. |
| `LICENSE_KEY_REQUIRED` | 401 Unauthorized | You have not supplied a [MaxMind license key](https://www.maxmind.com/en/accounts/current/license-key) in the [Authorization](/minfraud/api-documentation/requests/index.md#authorization-and-security) header. |
| `ACCOUNT_ID_REQUIRED` | 401 Unauthorized | You have not supplied a [MaxMind account ID](https://support.maxmind.com/knowledge-base/articles/find-your-maxmind-account-id) in the [Authorization](/minfraud/api-documentation/requests/index.md#authorization-and-security) header. |
| `INSUFFICIENT_FUNDS` | 402 Payment Required | The license key you have provided does not have sufficient funds to use this service. Please [purchase more service credits](https://www.maxmind.com/en/solutions/fraud-and-risk/plans-pricing#buy-now). |
| `PERMISSION_REQUIRED` | 403 Forbidden | You do not have permission to use the service. Please [contact our support team](https://support.maxmind.com/knowledge-base) for more information. |
| (none) | 413 Content Too Large | This status is returned when the request body is larger than 20,000 bytes. The response does not have a JSON body. |
| (none) | 429 Too Many Requests | Your request has been denied due to rate-limiting imposed by MaxMind. This is likely due to excessive previous requests resulting in error responses. |
| `SERVER_ERROR` | 500 Internal Server Error | There was an error when processing this request. |
| (none) | 503 Service Unavailable | There is a problem with the web service server. You can try this request again later. |
### Rate-limiting
If customer requests result in excessive errors, MaxMind may impose rate limits
for a period of time.
## Response Body
All services return data as a JSON document. The document that is returned
always consists of an object (aka map or hash).
Keys with undefined or empty values will not be included in the returned
document.
The data returned in the document will be in UTF-8 encoding.
Note that a given key and value may be omitted from the response entirely if
there is no relevant information to include. For example, if you do not pass any
information about the credit card in your request, then the response will not
contain a `credit_card` key or value.
For full examples of response bodies, select one of the following:
- [minFraud Score Body Example](/minfraud/api-documentation/responses/index.md#minfraud-score-body-example)
- [minFraud Insights Body Example](/minfraud/api-documentation/responses/index.md#minfraud-insights-body-example)
- [minFraud Factors Body Example](/minfraud/api-documentation/responses/index.md#minfraud-factors-body-example)
- [Error Body Example](/minfraud/api-documentation/responses/index.md#error-body-example)
### Top-Level Fields
```json
{
"id": "5bc5d6c2-b2c8-40af-87f4-6d61af86b6ae",
"risk_score": 0.01,
"funds_remaining": 25,
"queries_remaining": 5000,
"ip_address": {...},
"credit_card": {...},
"device": {...},
"email": {...},
"shipping_address": {...},
"shipping_phone": {...},
"billing_address": {...},
"billing_phone": {...},
"disposition": {...},
"risk_score_reasons": [...],
"warnings": [...]
}
```
#### `id`
Type: string (format: UUID). Available in: minFraud Score, minFraud Insights, minFraud Factors.
This is the minFraud ID, a [UUID](https://en.wikipedia.org/wiki/Universally%5Funique%5Fidentifier) that identifies the minFraud response. Use this ID to [search your minFraud logs](https://www.maxmind.com/en/accounts/current/query-usage-report) or when making support requests to MaxMind.
#### `risk_score`
Type: decimal (min: 0.01, max: 99). Available in: minFraud Score, minFraud Insights, minFraud Factors.
This field contains the overall risk score, from 0.01 to 99. A higher score indicates a higher risk of fraud. For example, a score of 20 indicates a 20% chance that a transaction is fraudulent. We never return a risk score of 0, since all transactions have the possibility of being fraudulent. Likewise, we never return a risk score of 100.
[Learn more about the overall risk score on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/overall-risk-score-minfraud-maxmind)
#### `funds_remaining`
Type: decimal (min: 0). Available in: minFraud Score, minFraud Insights, minFraud Factors.
The approximate US dollar value of the funds remaining on your MaxMind account.
#### `queries_remaining`
Type: integer (min: 0). Available in: minFraud Score, minFraud Insights, minFraud Factors.
The approximate number of queries remaining for the service before your account runs out of funds.
#### `ip_address`
Type: object. Available in: minFraud Score, minFraud Insights, minFraud Factors.
This object contains IP intelligence data.
[See more](/minfraud/api-documentation/responses/index.md#schema--response--ip-address).
#### `credit_card`
Type: object. Available in: minFraud Insights, minFraud Factors.
This object contains information related to the credit card.
[See more](/minfraud/api-documentation/responses/index.md#schema--response--credit-card).
#### `device`
Type: object. Available in: minFraud Insights, minFraud Factors.
This object contains information about the device that MaxMind believes is associated with the IP address passed in the request.
[See more](/minfraud/api-documentation/responses/index.md#schema--response--device).
#### `email`
Type: object. Available in: minFraud Insights, minFraud Factors.
This object contains email intelligence data.
[See more](/minfraud/api-documentation/responses/index.md#schema--response--email).
#### `shipping_address`
Type: object. Available in: minFraud Insights, minFraud Factors.
This object contains information related to the shipping address.
[See more](/minfraud/api-documentation/responses/index.md#schema--response--shipping-address).
#### `shipping_phone`
Type: object. Available in: minFraud Insights, minFraud Factors.
This object contains information related to the shipping phone number.
[See more](/minfraud/api-documentation/responses/index.md#schema--response--shipping-phone).
#### `billing_address`
Type: object. Available in: minFraud Insights, minFraud Factors.
This object contains information related to the billing address.
[See more](/minfraud/api-documentation/responses/index.md#schema--response--billing-address).
#### `billing_phone`
Type: object. Available in: minFraud Insights, minFraud Factors.
This object contains information related to the billing phone number.
[See more](/minfraud/api-documentation/responses/index.md#schema--response--billing-phone).
#### `disposition`
Type: object. Available in: minFraud Score, minFraud Insights, minFraud Factors.
This object contains information about how a request was handled by the custom rules that you have defined.
[See more](/minfraud/api-documentation/responses/index.md#schema--response--disposition).
#### `risk_score_reasons`
Type: array. Available in: minFraud Factors.
This array contains risk score reason objects.
[See more](/minfraud/api-documentation/responses/index.md#schema--response--risk-score-reasons).
#### `warnings`
Type: array. Available in: minFraud Score, minFraud Insights, minFraud Factors.
This array contains warning objects detailing issues with the request that was sent, such as invalid or unknown inputs.
[See more](/minfraud/api-documentation/responses/index.md#schema--response--warnings).
### IP Address
For minFraud Score, this object only contains the `risk` for the IP address. For
minFraud Insights and Factors, the object is the
[GeoIP Insights response body](/geoip/docs/web-services/responses/index.md#geoip-insights-body-example)
with five modifications:
1. `risk` has been added directly to the `ip_address` object.
2. `risk_reasons` has been added directly to the `ip_address` object.
3. `is_high_risk` has been added to the `country` sub-object. This field is
deprecated.
4. `local_time` has been added to the `location` sub-object.
5. The `maxmind` object is not present.
See below for descriptions of the added fields.
minFraud Insights and Factors return anonymous IP outputs in the
[`anonymizer` object](/geoip/docs/web-services/responses/index.md#anonymizer):
- `confidence`
- `is_anonymous`
- `is_anonymous_vpn`
- `is_hosting_provider`
- `is_public_proxy`
- `is_residential_proxy`
- `is_tor_exit_node`
- `network_last_seen`
- `provider_name`
- `residential`
The six `is_*` outputs above are also returned in the `traits` object for
backwards compatibility, but they are deprecated there. Use the `anonymizer`
object instead.
```json
{
"risk": 0.01,
"anonymizer": {
"confidence": 99,
"is_anonymous": true,
"is_anonymous_vpn": true,
"is_hosting_provider": true,
"is_public_proxy": true,
"is_residential_proxy": true,
"is_tor_exit_node": true,
"network_last_seen": "2025-01-15",
"provider_name": "nordvpn",
"residential": {
"confidence": 82,
"network_last_seen": "2026-05-11",
"provider_name": "quickshift"
}
},
"city": {
"confidence": 25,
"geoname_id": 54321,
"names": {
"de": "Los Angeles",
"en": "Los Angeles",
"es": "Los Ángeles",
"fr": "Los Angeles",
"ja": "ロサンゼルス市",
"pt-BR": "Los Angeles",
"ru": "Лос-Анджелес",
"zh-CN": "洛杉矶"
}
},
"continent": {
"code": "NA",
"geoname_id": 123456,
"names": {
"de": "Nordamerika",
"en": "North America",
"es": "América del Norte",
"fr": "Amérique du Nord",
"ja": "北アメリカ",
"pt-BR": "América do Norte",
"ru": "Северная Америка",
"zh-CN": "北美洲"
}
},
"country": {
"confidence": 75,
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
}
},
"location": {
"accuracy_radius": 20,
"average_income": 50321,
"latitude": 37.6293,
"local_time": "2015-04-26T01:37:17-08:00",
"longitude": -122.1163,
"metro_code": 807,
"population_density": 7122,
"time_zone": "America/Los_Angeles"
},
"postal": {
"code": "90001",
"confidence": 10
},
"registered_country": {
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
}
},
"represented_country": {
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
},
"type": "military"
},
"risk_reasons": [
{
"code": "ANONYMOUS_IP",
"reason": "The IP address belongs to an anonymous network."
},
{
"code": "MINFRAUD_NETWORK_ACTIVITY",
"reason": "Suspicious activity has been seen on this IP address across minFraud customers."
}
],
"subdivisions": [
{
"confidence": 50,
"geoname_id": 5332921,
"iso_code": "CA",
"names": {
"de": "Kalifornien",
"en": "California",
"es": "California",
"fr": "Californie",
"ja": "カリフォルニア",
"ru": "Калифорния",
"zh-CN": "加州"
}
}
],
"traits": {
"autonomous_system_number": 1239,
"autonomous_system_organization": "Linkem IR WiMax Network",
"connection_type": "Cable/DSL",
"domain": "example.com",
"ip_address": "1.2.3.4",
"ip_risk_snapshot": 45.5,
"is_anonymous": true,
"is_anonymous_vpn": true,
"is_anycast": true,
"is_hosting_provider": true,
"is_public_proxy": true,
"is_residential_proxy": true,
"is_tor_exit_node": true,
"isp": "Linkem spa",
"mobile_country_code": "310",
"mobile_network_code": "004",
"network": "1.2.3.0/24",
"organization": "Linkem IR WiMax Network",
"static_ip_score": 1.5,
"user_count": 1,
"user_type": "traveler"
}
}
```
#### `ip_address.risk`
Type: decimal (min: 0.01, max: 99). Available in: minFraud Score, minFraud Insights, minFraud Factors.
This field contains the risk associated with the IP address. The value ranges from 0.01 to 99. A higher score indicates a higher risk.
[Learn more about the IP risk score on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/minfraud-ip-risk-score)
#### `ip_address.country`
Type: object. Available in: minFraud Insights, minFraud Factors.
This object contains country-level geolocation data for the IP address associated with the event.
#### `ip_address.location`
Type: object. Available in: minFraud Insights, minFraud Factors.
This object contains city-level geolocation data for the IP address associated with the event.
#### `ip_address.risk_reasons`
Type: array. Available in: minFraud Insights, minFraud Factors.
This array contains IP Address Risk Reason objects identifying the reasons why the IP address received the associated risk.
[Learn how to use IP risk reasons for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/minfraud-ip-risk-reasons-maxmind)
### IP Address > Country
This object contains country-level geolocation data for the IP address
associated with the event.
[See the GeoIP Insights response body](/geoip/docs/web-services/responses/index.md#country)
for more information.
```json
{
"confidence": 75,
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
}
}
```
### IP Address > Location
This object contains city-level geolocation data for the IP address associated
with the event.
[See the GeoIP Insights response body](/geoip/docs/web-services/responses/index.md#location)
for more information.
```json
{
"accuracy_radius": 20,
"average_income": 50321,
"latitude": 37.6293,
"local_time": "2015-04-26T01:37:17-08:00",
"longitude": -122.1163,
"metro_code": 807,
"population_density": 7122,
"time_zone": "America/Los_Angeles"
}
```
#### `ip_address.location.local_time`
Type: string (max length: 255). Available in: minFraud Insights, minFraud Factors.
The date and time of the transaction in the time zone associated with the IP address. The value is formatted according to [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339). For instance, the local time in Boston might be returned as `2015-04-27T19:17:24-04:00`.
### IP Address > Risk Reasons
This array contains IP Address Risk Reason objects identifying the reasons why
the IP address received the associated risk.
```json
[
{
"code": "ANONYMOUS_IP",
"reason": "The IP address belongs to an anonymous network."
},
{
"code": "MINFRAUD_NETWORK_ACTIVITY",
"reason": "Suspicious activity has been seen on this IP address across minFraud customers."
}
]
```
#### `ip_address.risk_reasons.code`
Type: string (format: enum, max length: 255). Available in: minFraud Insights, minFraud Factors.
This value is a machine-readable code identifying the reason. Although more codes may be added in the future, the current codes are:
| Code | Explanation |
| ---------------------------- | ------------------------------------------------------------------------------------------------------ |
| `ANONYMOUS_IP` | The IP address belongs to an anonymous network. |
| `BILLING_POSTAL_VELOCITY` | Many different billing postal codes have been seen on this IP address. |
| `EMAIL_VELOCITY` | Many different email addresses have been seen on this IP address. |
| `HIGH_RISK_DEVICE` | A high risk device was seen on this IP address. |
| `HIGH_RISK_EMAIL` | A high risk email address was seen on this IP address in your past transactions. |
| `ISSUER_ID_NUMBER_VELOCITY` | Many different issuer ID numbers have been seen on this IP address. |
| `MINFRAUD_NETWORK_ACTIVITY` | Suspicious activity has been seen on this IP address across minFraud customers. |
[Learn how to use IP risk reasons for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/minfraud-ip-risk-reasons-maxmind)
#### `ip_address.risk_reasons.reason`
Type: string. Available in: minFraud Insights, minFraud Factors.
This field provides an explanation of the reason, as seen in the table above. The explanation text may change at any time and should not be matched against.
[Learn how to use IP risk reasons for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/minfraud-ip-risk-reasons-maxmind)
### Credit Card
This object contains minFraud information related to the credit card. If an
issuer ID number (IIN) was not provided in the request, this object will not be
present in the response.
```json
{
"brand": "Visa",
"country": "US",
"is_business": true,
"is_issued_in_billing_address_country": true,
"is_prepaid": true,
"is_virtual": true,
"issuer": {
"matches_provided_name": true,
"matches_provided_phone_number": true,
"name": "Bank of America",
"phone_number": "800-732-9194"
},
"type": "credit"
}
```
#### `credit_card.issuer`
Type: object. Available in: minFraud Insights, minFraud Factors.
This field contains a JSON object with information relating to the credit card issuer.
#### `credit_card.brand`
Type: string (max length: 255). Available in: minFraud Insights, minFraud Factors.
The card brand, such as "Visa", "Discover", "American Express", etc.
[Learn how to use the credit card brand data for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/credit-card-risk-data-minfraud#cc-brand-name)
#### `credit_card.country`
Type: string (max length: 2). Available in: minFraud Insights, minFraud Factors.
The two-letter [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO%5F3166-1%5Falpha-2) associated with the location of the majority of customers using this credit card as determined by their billing address. In cases where the location of customers is highly mixed, this defaults to the country of the bank issuing the card.
[Learn how to use the credit card country data for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/credit-card-risk-data-minfraud#cc-country)
#### `credit_card.is_business`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This field is `true` if the issuer ID number is for a business card. It is `false` if the issuer ID number is for a non-business card. The key is only present when a valid issuer ID number has been provided.
#### `credit_card.is_issued_in_billing_address_country`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This field is `true` if the country of the billing address matches the country of the majority of customers using that IIN. It is `false` if both countries are available but do not match. If one or both of the countries are missing, the key will not be present. In cases where the location of customers is highly mixed, the match is to the country of the bank issuing the card.
[Learn how to use the billing address to credit card country matching for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/billing-and-shipping-address-risk-data-minfraud#billing-cc-match)
#### `credit_card.is_prepaid`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This field is `true` if the issuer ID number is for a prepaid card. It is `false` if the issuer ID number is for a non-prepaid card. The key is only present when a valid issuer ID number has been provided.
[Learn how to use prepaid card detection for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/credit-card-risk-data-minfraud#detection-prepaid-virtual)
#### `credit_card.is_virtual`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This field is `true` if the issuer ID number is for a virtual card. It is `false` if the issuer ID number is for a non-virtual card. The key is only present when a valid issuer ID number has been provided.
[Learn how to use virtual card detection for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/credit-card-risk-data-minfraud#detection-prepaid-virtual)
#### `credit_card.type`
Type: string (format: enum). Available in: minFraud Insights, minFraud Factors.
The card’s type. The valid values are:
* `charge` – See [Wikipedia](https://en.wikipedia.org/wiki/Charge%5Fcard) for an explanation of the difference between charge and credit cards.
* `credit`
* `debit`
### Credit Card > Issuer
This is a sub-object of `credit_card` that contains information related to the
issuer of the card.
```json
{
"matches_provided_name": true,
"matches_provided_phone_number": true,
"name": "Bank of America",
"phone_number": "800-732-9194"
}
```
#### `credit_card.issuer.name`
Type: string (max length: 255). Available in: minFraud Insights, minFraud Factors.
The name of the issuing bank.
[Learn how to use the credit card issuer name for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/credit-card-risk-data-minfraud#cc-brand-name)
#### `credit_card.issuer.matches_provided_name`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This field is `true` if the name matches the name provided in the request for the card issuer. It is `false` if the name does not match. The field is not included if either no name or issuer ID number (IIN) is provided in the request or if MaxMind does not have a name associated with the IIN.
#### `credit_card.issuer.phone_number`
Type: string (max length: 255). Available in: minFraud Insights, minFraud Factors.
The phone number of the bank which issued the credit card. In some cases, the phone number we return may be out of date.
#### `credit_card.issuer.matches_provided_phone_number`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This field is `true` if the phone number matches the number provided in the request for the card issuer. It is `false` if the number does not match. The field is not included if either no phone number or issuer ID number (IIN) is provided in the request or if MaxMind does not have a phone number associated with the IIN.
### Device
This object contains information about the device that MaxMind believes is
associated with the IP address passed in the request.
```json
{
"confidence": 99,
"id": "7835b099-d385-4e5b-969e-7df26181d73b",
"last_seen": "2016-06-08T14:16:38Z",
"local_time": "2018-01-02T10:40:11-08:00"
}
```
#### `device.confidence`
Type: decimal (min: 0.01, max: 99). Available in: minFraud Insights, minFraud Factors.
A number from 0.01 to 99 representing the confidence that the `/device/id` refers to a unique device as opposed to a cluster of similar devices. A confidence of 0.01 indicates very low confidence that the device is unique, whereas 99 indicates very high confidence.
[Learn how to use device confidence for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/device-risk-data-minfraud#device-confidence)
#### `device.id`
Type: string (format: UUID). Available in: minFraud Insights, minFraud Factors.
A UUID that MaxMind uses for the device associated with this IP address. This is only available if you are using the [Device Tracking Add-On](/minfraud/api-documentation/index.md#device-tracking-add-on).
#### `device.last_seen`
Type: string (max length: 255). Available in: minFraud Insights, minFraud Factors.
The date and time of the last sighting of the device. The value is formatted according to [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339).
[Learn how to use the last sighting data for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/device-risk-data-minfraud#device-last-seen)
#### `device.local_time`
Type: string (max length: 255). Available in: minFraud Insights, minFraud Factors.
The local date and time of the transaction in the time zone of the device. This is determined by using the UTC offset associated with the device. The value is formatted according to [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339).
[Learn how to use local time data for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/device-risk-data-minfraud#device-local-time)
### Email
```json
{
"domain": {
"classification": "business",
"first_seen": "2019-01-20",
"risk": 1.23,
"visit": {
"has_redirect": true,
"last_visited_on": "2025-11-15",
"status": "live"
},
"volume": 6.5
},
"first_seen": "2016-02-03",
"is_disposable": false,
"is_free": false,
"is_high_risk": true
}
```
#### `email.domain`
Type: object. Available in: minFraud Insights, minFraud Factors.
This field contains a JSON object with information relating to the domain.
#### `email.first_seen`
Type: string (format: YYYY-MM-DD, max length: 10). Available in: minFraud Insights, minFraud Factors.
A date string (e.g. 2017-04-24) to identify the date an email address was first seen by MaxMind. This is expressed using the ISO 8601 date format `YYYY-MM-DD`. The earliest date that may be returned is January 1, 2008.
[Learn how to use email first seen data for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/minfraud-email-risk-data#email-first-seen)
#### `email.is_disposable`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This field is `true` if MaxMind believes that the email address is from a disposable email provider. It is `false` if the address is not from a known disposable email provider. The key will only be present if a valid email address or email domain is provided.
[Learn how to use disposable email detection for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/minfraud-email-risk-data#free-disposible-flags)
#### `email.is_free`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This field is `true` if MaxMind believes that this email domain is for a free email provider such as Gmail or Yahoo! Mail. It is `false` if the domain is not for a known free email provider. The key will only be present if a valid email address or email domain is provided.
[Learn how to use free email detection for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/minfraud-email-risk-data#free-disposible-flags)
#### `email.is_high_risk`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This field is `true` if MaxMind believes that this email address is likely to be used for fraud. It is `false` if MaxMind does not believe the address is used for fraud. The key will only be present if a valid email address or email address hash is provided. Note that this is also factored into the overall `risk_score` in the response as well.
[Learn how to use our high risk email flag for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/minfraud-email-risk-data#email-reputation-flagging)
### Email > Domain
This is a sub-object of `email` that contains information related to the domain.
```json
{
"classification": "business",
"first_seen": "2019-01-20",
"risk": 1.23,
"visit": {
"has_redirect": true,
"last_visited_on": "2025-11-15",
"status": "live"
},
"volume": 6.5
}
```
#### `email.domain.classification`
Type: string. Available in: minFraud Insights, minFraud Factors.
A classification of the domain. One of the following values. Additional values may be added in the future.
* `business`
* `education`
* `government`
* `isp_email`
[Learn more about the domain classification on our Knowledge Base.](https://support.maxmind.com/knowledge-base/minfraud-domain-risk-data#domain-classification)
#### `email.domain.first_seen`
Type: string (format: YYYY-MM-DD, max length: 10). Available in: minFraud Insights, minFraud Factors.
A date string (e.g. 2019-01-01) to identify the date an email address domain was first seen by MaxMind. This is expressed using the ISO 8601 date format `YYYY-MM-DD`. The earliest date that may be returned is January 1, 2019.
[Learn how to use email first seen data for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/minfraud-email-risk-data#email-first-seen)
#### `email.domain.risk`
Type: decimal (min: 0.01, max: 99). Available in: minFraud Insights, minFraud Factors.
This field contains the risk associated with the domain. The value ranges from 0.01 to 99. A higher score indicates higher risk.
[Learn more about the email domain risk score on our Knowledge Base.](https://support.maxmind.com/knowledge-base/minfraud-domain-risk-data#domain-reputation-score)
#### `email.domain.visit`
Type: object. Available in: minFraud Insights, minFraud Factors.
An object containing information about an automated visit to the email domain. See the [Email > Domain > Visit](/minfraud/api-documentation/responses/index.md#email--domain--visit) section for details about this object.
#### `email.domain.volume`
Type: decimal (min: 0.001, max: 1000000). Available in: minFraud Insights, minFraud Factors.
This field indicates how much activity we see on an email domain across the minFraud network, expressed in sightings per million.
The value is rounded to 2 significant figures. Example domain sightings per million requests:
* Consumer email domains: gmail.com (630,000), icloud.com (37,000)
* Business domains: microsoft.com (6)
Note: These are point-in-time examples to provide a relative sense of the values. They will change based on email usage patterns.
[Learn more about email domain volume on our Knowledge Base.](https://support.maxmind.com/knowledge-base/minfraud-domain-risk-data#domain-volume)
### Email > Domain > Visit
This is a sub-object of `email/domain` that contains information about an
automated visit to the email domain.
Domain visits are performed by an automated agent, so for newly-sighted domains
on the minFraud network, it can take a few minutes for these outputs to be
populated on later requests on the same domain. Domain visits are also limited
to those with low volume on the network. High volume domains such as those for
email providers and large businesses will not have domain visit outputs in the
minFraud response.
```json
{
"has_redirect": true,
"last_visited_on": "2025-11-15",
"status": "live"
}
```
#### `email.domain.visit.has_redirect`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This is `true` if the domain in the request has redirects (configured to automatically send visitors to another URL). Otherwise, the key is not included in the `/email/domain/visit` object.
If `true`, the `/email/domain/visit/status` field corresponds to the last domain visited after redirecting.
[Learn more about the email domain visit redirect flag on our Knowledge Base.](https://support.maxmind.com/knowledge-base/minfraud-domain-risk-data#domain-visit)
#### `email.domain.visit.last_visited_on`
Type: string (format: YYYY-MM-DD). Available in: minFraud Insights, minFraud Factors.
A date string that corresponds to when the automated visit was completed. This is expressed using the ISO 8601 date format `YYYY-MM-DD`.
Pair with the `/email/domain/visit/status` and `/email/domain/visit/has_redirect` fields to determine the recency of those values.
#### `email.domain.visit.status`
Type: string. Available in: minFraud Insights, minFraud Factors.
A classification of the status of the domain (or the last domain visited after following redirects, if these are present and can be followed) based on an automated visit at a previous point in time. This field may be initially unavailable for a newly-sighted domain and populated at a future time after a visit is conducted. Pair with the `/email/domain/visit/last_visited_on` to determine the recency of the visit. One of the following values. Additional values may be added in the future.
| Status | Description |
| ----------------------------- | ---------------------------------------------------------------------------------------------------- |
| `live` | The domain is reachable and serving content normally. |
| `dns_error` | The domain is missing, expired, or DNS is misconfigured. |
| `network_error` | The domain is offline, blocked, or unreachable. |
| `http_error` | The domain is reachable but the web application had a problem or denied the request. |
| `parked` | The domain is live and is in a parked state. |
| `pre_development` | The domain is live and is in a pre-development state. |
[Learn more about the email domain visit status on our Knowledge Base.](https://support.maxmind.com/knowledge-base/minfraud-domain-risk-data#domain-visit)
### Shipping Address
```json
{
"distance_to_billing_address": 22,
"distance_to_ip_location": 15,
"is_high_risk": true,
"is_in_ip_country": true,
"is_postal_in_city": true,
"latitude": 37.632,
"longitude": -122.313
}
```
#### `shipping_address.is_high_risk`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This field is `true` if the shipping address is an address associated with fraudulent transactions. The field is `false` when the address is not associated with increased risk. The key will only be present when a shipping address is provided.
[Learn more about the flag for high risk shipping addresses on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/billing-and-shipping-address-risk-data-minfraud#high-risk-flag)
#### `shipping_address.is_postal_in_city`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This field is `true` if the postal code provided with the address is in the city for the address. The field is `false` when the postal code is not in the city. The key will only be present when a shipping postal code, city, and country have been provided.
We use [GeoNames data](https://www.geonames.org/postal-codes/postal-codes-us.html) for the postal-city match, which uses the [preferred place name](https://en.wikipedia.org/wiki/ZIP_Code) for a US ZIP code. [Alternative place names](https://en.wikipedia.org/wiki/ZIP_Code) for US ZIP codes may not trigger a match for this field.
[Learn how to use the postal to city check for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/billing-and-shipping-address-risk-data-minfraud#postal-city-match)
#### `shipping_address.latitude`
Type: decimal. Available in: minFraud Insights, minFraud Factors.
The approximate [WGS84](https://en.wikipedia.org/wiki/World%5FGeodetic%5FSystem) latitude associated with the address.
**Latitude and longitude are not precise and should not be used to identify a particular street address or household.**
#### `shipping_address.longitude`
Type: decimal. Available in: minFraud Insights, minFraud Factors.
The approximate [WGS84](https://en.wikipedia.org/wiki/World%5FGeodetic%5FSystem) longitude associated with the address.
**Latitude and longitude are not precise and should not be used to identify a particular street address or household.**
#### `shipping_address.distance_to_ip_location`
Type: integer. Available in: minFraud Insights, minFraud Factors.
The distance in kilometers from the address to the IP location. When we cannot locate the address or the IP address more precisely, we use country or subdivision coordinates, which may lead to inaccurate distance calculations.
[Learn how to use the IP geolocation to address distance for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/billing-and-shipping-address-risk-data-minfraud#ip-geo-to-address-match)
#### `shipping_address.distance_to_billing_address`
Type: integer. Available in: minFraud Insights, minFraud Factors.
The distance in kilometers from the shipping address to the billing address. When we cannot locate an address more precisely, we use country or subdivision coordinates, which may lead to inaccurate distance calculations.
[Learn how to use the shipping to billing address distance for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/billing-and-shipping-address-risk-data-minfraud#distance)
#### `shipping_address.is_in_ip_country`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This field is `true` if the address is in the IP country. The field is `false` when the address is not in the IP country. If the IP address could not be geolocated or no shipping address was provided, the field will not be included in the response.
[Learn how to use the IP location to country check for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/billing-and-shipping-address-risk-data-minfraud#ip-geo-to-address-match)
### Shipping Phone
```json
{
"country": "CA",
"is_voip": true,
"matches_postal": true,
"network_operator": "Telus Mobility-SVR/2",
"number_type": "mobile"
}
```
#### `shipping_phone.country`
Type: string. Available in: minFraud Insights, minFraud Factors.
A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO%5F3166-1) country code for the country associated with the shipping phone number.
#### `shipping_phone.network_operator`
Type: string. Available in: minFraud Insights, minFraud Factors.
The name of the original network operator associated with the shipping phone number. This field does not reflect phone numbers that have been ported from the original operator to another, nor does it identify [mobile virtual network operators](https://en.wikipedia.org/wiki/Mobile%5Fvirtual%5Fnetwork%5Foperator).
#### `shipping_phone.number_type`
Type: string. Available in: minFraud Insights, minFraud Factors.
One of the following values: `fixed` or `mobile`. Additional values may be added in the future.
#### `shipping_phone.is_voip`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This is `true` if the shipping phone number is a Voice over Internet Protocol (VoIP) number allocated by a regulator. It is `false` if the shipping phone number is not a VoIP number allocated by a regulator. The key is only present when a valid shipping phone number has been provided and we have data for it.
#### `shipping_phone.matches_postal`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This field is `true` if the phone number's prefix is commonly associated with the shipping postal code. It is `false` if the prefix is not associated with the postal code. This key is only present when the phone number is in the US, the number prefix is in our database, and the postal code and country are provided in the request.
### Billing Address
```json
{
"distance_to_ip_location": 100,
"is_in_ip_country": true,
"is_postal_in_city": true,
"latitude": 37.545,
"longitude": -122.421
}
```
#### `billing_address.is_postal_in_city`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This field is `true` if the postal code provided with the address is in the city for the address. The field is `false` when the postal code is not in the city. The key will only be present when a billing postal code, city, and country have been provided.
We use [GeoNames data](https://www.geonames.org/postal-codes/postal-codes-us.html) for the postal-city match, which uses the [preferred place name](https://en.wikipedia.org/wiki/ZIP_Code) for a US ZIP code. [Alternative place names](https://en.wikipedia.org/wiki/ZIP_Code) for US ZIP codes may not trigger a match for this field.
[Learn how to use the postal to city check for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/billing-and-shipping-address-risk-data-minfraud#postal-city-match)
#### `billing_address.latitude`
Type: decimal. Available in: minFraud Insights, minFraud Factors.
The approximate [WGS84](https://en.wikipedia.org/wiki/World%5FGeodetic%5FSystem) latitude associated with the address.
**Latitude and longitude are not precise and should not be used to identify a particular street address or household.**
#### `billing_address.longitude`
Type: decimal. Available in: minFraud Insights, minFraud Factors.
The approximate [WGS84](https://en.wikipedia.org/wiki/World%5FGeodetic%5FSystem) longitude associated with the address.
**Latitude and longitude are not precise and should not be used to identify a particular street address or household.**
#### `billing_address.distance_to_ip_location`
Type: integer. Available in: minFraud Insights, minFraud Factors.
The distance in kilometers from the address to the IP location. When we cannot locate the address or the IP address more precisely, we use country or subdivision coordinates, which may lead to inaccurate distance calculations.
[Learn how to use the IP geolocation to address distance for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/billing-and-shipping-address-risk-data-minfraud#ip-geo-to-address-match)
#### `billing_address.is_in_ip_country`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This field is `true` if the address is in the IP country. The field is `false` when the address is not in the IP country. If the IP address could not be geolocated or no billing address was provided, the field will not be included in the response.
[Learn how to use the IP location to country check for risk analysis on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/billing-and-shipping-address-risk-data-minfraud#ip-geo-to-address-match)
### Billing Phone
```json
{
"country": "US",
"is_voip": true,
"matches_postal": true,
"network_operator": "Verizon/1",
"number_type": "fixed"
}
```
#### `billing_phone.country`
Type: string. Available in: minFraud Insights, minFraud Factors.
A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO%5F3166-1) country code for the country associated with the billing phone number.
#### `billing_phone.network_operator`
Type: string. Available in: minFraud Insights, minFraud Factors.
The name of the original network operator associated with the billing phone number. This field does not reflect phone numbers that have been ported from the original operator to another, nor does it identify [mobile virtual network operators](https://en.wikipedia.org/wiki/Mobile%5Fvirtual%5Fnetwork%5Foperator).
#### `billing_phone.number_type`
Type: string. Available in: minFraud Insights, minFraud Factors.
One of the following values: `fixed` or `mobile`. Additional values may be added in the future.
#### `billing_phone.is_voip`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This is `true` if the billing phone number is a Voice over Internet Protocol (VoIP) number allocated by a regulator. It is `false` if the billing phone number is not a VoIP number allocated by a regulator. The key is only present when a valid billing phone number has been provided and we have data for it.
#### `billing_phone.matches_postal`
Type: boolean. Available in: minFraud Insights, minFraud Factors.
This field is `true` if the phone number's prefix is commonly associated with the billing postal code. It is `false` if the prefix is not associated with the postal code. This key is only present when the phone number is in the US, the number prefix is in our database, and the postal code and country are provided in the request.
### Disposition
This object contains information about how a request was handled by the custom
rules you have defined. If your account does not have any custom rules defined,
then this object will not be present in the response.
[Learn about custom rules and dispositions on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/use-custom-rules-and-dispositions-minfraud-maxmind)
```json
{
"action": "accept",
"reason": "custom_rule",
"rule_label": "my_custom_rule"
}
```
#### `disposition.action`
Type: string (format: enum). Available in: minFraud Score, minFraud Insights, minFraud Factors.
This describes how the request was handled. The valid values are:
| Action | Explanation |
| -------------- | -------------------------------------------------------------------------------------- |
| `accept` | This is the default value that is used if none of your custom rules match the request. |
| `reject` | |
| `manual_review` | |
| `test` | This value can be used to test custom rules. |
#### `disposition.reason`
Type: string (format: enum). Available in: minFraud Score, minFraud Insights, minFraud Factors.
This describes why the `action` was set to a particular value. The valid values are:
| Reason | Explanation |
| ------------ | --------------------------------------------- |
| `default` | No custom rules matched the request. |
| `custom_rule` | A custom rule was applied and set the action. |
#### `disposition.rule_label`
Type: string. Available in: minFraud Score, minFraud Insights, minFraud Factors.
The custom rule that was triggered. If you do not have custom rules set up, the triggered custom rule does not have a label, or no custom rule was triggered, the field will not be included in the response.
### Risk Score Reasons
This array contains risk score reason objects. Risk score reasons are usually
only returned for medium to high risk transactions. If there were no significant
changes to the risk score due to these reasons, then this array will not be
present in the response.
```json
[
{
"multiplier": 45,
"reasons": [
{
"code": "ANONYMOUS_IP",
"reason": "The Anonymous IP address raised the overall risk score"
},
{
"code": "IP_ISSUER_ID_NUMBER_VELOCITY",
"reason": "The number of distinct Issuer ID Numbers found in the velocity check on IP address raised the overall risk score"
}
]
},
{
"multiplier": 1.6,
"reasons": [
{
"code": "ORG_DISTANCE_RISK",
"reason": "The risk of the ISP combined with the distance between the billing address and IP address location raised the overall risk score"
}
]
},
{
"multiplier": 0.34,
"reasons": [
{
"code": "PHONE_ACTIVITY",
"reason": "minFraud network activity of the phone number lowered the overall risk score"
}
]
}
]
```
#### `risk_score_reasons.multiplier`
Type: decimal (min: 0.01, max: 100). Available in: minFraud Factors.
The factor by which the risk score is increased (if the value is greater than 1) or decreased (if the value is less than 1) for given risk reason(s). Multipliers representing a significant percentage increase or decrease in the risk score lead to risk reason(s) being present.
#### `risk_score_reasons.reasons`
Type: array. Available in: minFraud Factors.
This array contains objects that describe one of the reasons for the multiplier.
#### `risk_score_reasons.reasons.code`
Type: string (format: enum, max length: 255). Available in: minFraud Factors.
A machine-readable code identifying the risk reason. Examples listed below. Although more codes may be added in the future, a list of current codes may be provided on request.
| Code |
| --------------- |
| ANONYMOUS\_IP |
| COUNTRY |
| ORG\_DISTANCE\_RISK |
#### `risk_score_reasons.reasons.reason`
Type: string. Available in: minFraud Factors.
The human-readable description of the risk reason and its effect on the overall risk score.
The explanation text may change at any time and should not be matched against.
| Code | Reason |
| ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- |
| ANONYMOUS\_IP | The Anonymous IP address raised the overall risk score |
| COUNTRY | The country associated with the request lowered the overall risk score |
| ORG\_DISTANCE\_RISK | The risk of the ISP combined with the distance between the billing address and IP address location raised the overall risk score |
### Warnings
This array contains warning objects detailing issues with the request that was
sent, such as invalid or unknown inputs. It is highly recommended that you check
this array for issues when integrating the web service.
```json
[
{
"code": "INPUT_INVALID",
"input_pointer": "/shipping/city",
"warning": "Encountered value at /shipping/city that does not meet the required constraints"
}
]
```
#### `warnings.code`
Type: string (max length: 255). Available in: minFraud Score, minFraud Insights, minFraud Factors.
This value is a machine-readable code identifying the warning. Although more codes may be added in the future, the current codes are:
| Code | Description |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `BILLING_CITY_NOT_FOUND` | The billing city could not be found in our database. This may impact our ability to provide accurate distance calculations. |
| `BILLING_COUNTRY_MISSING` | Billing address information was provided without providing a billing country. This may impact our ability to provide accurate distance calculations. |
| `BILLING_COUNTRY_NOT_FOUND` | The billing country could not be found in our database. This may impact our ability to provide accurate distance calculations. |
| `BILLING_POSTAL_NOT_FOUND` | The billing postal code could not be found in our database. This may impact our ability to provide accurate distance calculations. |
| `BILLING_REGION_NOT_FOUND` | The billing region could not be found in our database. This may impact our ability to provide accurate distance calculations. |
| `EMAIL_ADDRESS_UNUSABLE` | The email address entered is likely incorrect due to an integration issue. To avoid false positives, it has not been used in scoring. Check how you are passing your [email address inputs](/minfraud/api-documentation/requests/index.md#schema--request--email). |
| `INPUT_INVALID` | The value associated with the key does not meet the required constraints, e.g., "United States" in a field that requires a two-letter country code. |
| `INPUT_UNKNOWN` | An unknown key was encountered in the request body. |
| `IP_ADDRESS_INVALID` | The IP address supplied is not a valid IPv4 or IPv6 address. |
| `IP_ADDRESS_NOT_FOUND` | The IP address could not be geolocated. |
| `IP_ADDRESS_RESERVED` | The IP address supplied is in a reserved network. |
| `SHIPPING_CITY_NOT_FOUND` | The shipping city could not be found in our database. This may impact our ability to provide accurate distance calculations. |
| `SHIPPING_COUNTRY_MISSING` | Shipping address information was provided without providing a shipping country. This may impact our ability to provide accurate distance calculations. |
| `SHIPPING_COUNTRY_NOT_FOUND` | The shipping country could not be found in our database. This may impact our ability to provide accurate distance calculations. |
| `SHIPPING_POSTAL_NOT_FOUND` | The shipping postal code could not be found in our database. This may impact our ability to provide accurate distance calculations. |
| `SHIPPING_REGION_NOT_FOUND` | The shipping region could not be found in our database. This may impact our ability to provide accurate distance calculations. |
| `TRACKING_TOKEN_INVALID` | The tracking token provided was invalid or malformed. |
| `TRACKING_TOKEN_NOT_FOUND` | The tracking token provided was not found in our system. |
#### `warnings.warning`
Type: string. Available in: minFraud Score, minFraud Insights, minFraud Factors.
This field provides a human-readable explanation of the warning. The description may change at any time and should not be matched against.
#### `warnings.input_pointer`
Type: string (format: json pointer). Available in: minFraud Score, minFraud Insights, minFraud Factors.
A [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) to the input field that the warning is associated with. For instance, if the warning was about the billing city, this would be `/billing/city`. If it was for the price in the second shopping cart item, it would be `/shopping_cart/1/price`.
## Example Response Bodies
The examples show available fields using illustrative values. They do not
describe a single real transaction.
Each service returns data as a JSON document. The document that is returned
always consists of an object (aka map or hash). Below are full examples of the
JSON body document for the minFraud Score, minFraud Insights, and minFraud
Factors services, and a full example of the JSON body document for an error.
### minFraud Score Body Example
```json
{
"disposition": {
"action": "accept",
"reason": "custom_rule",
"rule_label": "my_custom_rule"
},
"funds_remaining": 25,
"id": "5bc5d6c2-b2c8-40af-87f4-6d61af86b6ae",
"ip_address": {
"risk": 0.01
},
"queries_remaining": 5000,
"risk_score": 0.01,
"warnings": [
{
"code": "INPUT_INVALID",
"input_pointer": "/shipping/city",
"warning": "Encountered value at /shipping/city that does not meet the required constraints"
}
]
}
```
### minFraud Insights Body Example
```json
{
"disposition": {
"action": "accept",
"reason": "custom_rule",
"rule_label": "my_custom_rule"
},
"funds_remaining": 25,
"id": "5bc5d6c2-b2c8-40af-87f4-6d61af86b6ae",
"ip_address": {
"risk": 0.01,
"anonymizer": {
"confidence": 99,
"is_anonymous": true,
"is_anonymous_vpn": true,
"is_hosting_provider": true,
"is_public_proxy": true,
"is_residential_proxy": true,
"is_tor_exit_node": true,
"network_last_seen": "2025-01-15",
"provider_name": "nordvpn",
"residential": {
"confidence": 82,
"network_last_seen": "2026-05-11",
"provider_name": "quickshift"
}
},
"city": {
"confidence": 25,
"geoname_id": 54321,
"names": {
"de": "Los Angeles",
"en": "Los Angeles",
"es": "Los Ángeles",
"fr": "Los Angeles",
"ja": "ロサンゼルス市",
"pt-BR": "Los Angeles",
"ru": "Лос-Анджелес",
"zh-CN": "洛杉矶"
}
},
"continent": {
"code": "NA",
"geoname_id": 123456,
"names": {
"de": "Nordamerika",
"en": "North America",
"es": "América del Norte",
"fr": "Amérique du Nord",
"ja": "北アメリカ",
"pt-BR": "América do Norte",
"ru": "Северная Америка",
"zh-CN": "北美洲"
}
},
"country": {
"confidence": 75,
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
}
},
"location": {
"accuracy_radius": 20,
"average_income": 50321,
"latitude": 37.6293,
"local_time": "2015-04-26T01:37:17-08:00",
"longitude": -122.1163,
"metro_code": 807,
"population_density": 7122,
"time_zone": "America/Los_Angeles"
},
"postal": {
"code": "90001",
"confidence": 10
},
"registered_country": {
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
}
},
"represented_country": {
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
},
"type": "military"
},
"risk_reasons": [
{
"code": "ANONYMOUS_IP",
"reason": "The IP address belongs to an anonymous network."
},
{
"code": "MINFRAUD_NETWORK_ACTIVITY",
"reason": "Suspicious activity has been seen on this IP address across minFraud customers."
}
],
"subdivisions": [
{
"confidence": 50,
"geoname_id": 5332921,
"iso_code": "CA",
"names": {
"de": "Kalifornien",
"en": "California",
"es": "California",
"fr": "Californie",
"ja": "カリフォルニア",
"ru": "Калифорния",
"zh-CN": "加州"
}
}
],
"traits": {
"autonomous_system_number": 1239,
"autonomous_system_organization": "Linkem IR WiMax Network",
"connection_type": "Cable/DSL",
"domain": "example.com",
"ip_address": "1.2.3.4",
"ip_risk_snapshot": 45.5,
"is_anonymous": true,
"is_anonymous_vpn": true,
"is_anycast": true,
"is_hosting_provider": true,
"is_public_proxy": true,
"is_residential_proxy": true,
"is_tor_exit_node": true,
"isp": "Linkem spa",
"mobile_country_code": "310",
"mobile_network_code": "004",
"network": "1.2.3.0/24",
"organization": "Linkem IR WiMax Network",
"static_ip_score": 1.5,
"user_count": 1,
"user_type": "traveler"
}
},
"queries_remaining": 5000,
"risk_score": 0.01,
"warnings": [
{
"code": "INPUT_INVALID",
"input_pointer": "/shipping/city",
"warning": "Encountered value at /shipping/city that does not meet the required constraints"
}
],
"billing_address": {
"distance_to_ip_location": 100,
"is_in_ip_country": true,
"is_postal_in_city": true,
"latitude": 37.545,
"longitude": -122.421
},
"billing_phone": {
"country": "US",
"is_voip": true,
"matches_postal": true,
"network_operator": "Verizon/1",
"number_type": "fixed"
},
"credit_card": {
"brand": "Visa",
"country": "US",
"is_business": true,
"is_issued_in_billing_address_country": true,
"is_prepaid": true,
"is_virtual": true,
"issuer": {
"matches_provided_name": true,
"matches_provided_phone_number": true,
"name": "Bank of America",
"phone_number": "800-732-9194"
},
"type": "credit"
},
"device": {
"confidence": 99,
"id": "7835b099-d385-4e5b-969e-7df26181d73b",
"last_seen": "2016-06-08T14:16:38Z",
"local_time": "2018-01-02T10:40:11-08:00"
},
"email": {
"domain": {
"classification": "business",
"first_seen": "2019-01-20",
"risk": 1.23,
"visit": {
"has_redirect": true,
"last_visited_on": "2025-11-15",
"status": "live"
},
"volume": 6.5
},
"first_seen": "2016-02-03",
"is_disposable": false,
"is_free": false,
"is_high_risk": true
},
"shipping_address": {
"distance_to_billing_address": 22,
"distance_to_ip_location": 15,
"is_high_risk": true,
"is_in_ip_country": true,
"is_postal_in_city": true,
"latitude": 37.632,
"longitude": -122.313
},
"shipping_phone": {
"country": "CA",
"is_voip": true,
"matches_postal": true,
"network_operator": "Telus Mobility-SVR/2",
"number_type": "mobile"
}
}
```
### minFraud Factors Body Example
```json
{
"disposition": {
"action": "accept",
"reason": "custom_rule",
"rule_label": "my_custom_rule"
},
"funds_remaining": 25,
"id": "5bc5d6c2-b2c8-40af-87f4-6d61af86b6ae",
"ip_address": {
"risk": 0.01,
"anonymizer": {
"confidence": 99,
"is_anonymous": true,
"is_anonymous_vpn": true,
"is_hosting_provider": true,
"is_public_proxy": true,
"is_residential_proxy": true,
"is_tor_exit_node": true,
"network_last_seen": "2025-01-15",
"provider_name": "nordvpn",
"residential": {
"confidence": 82,
"network_last_seen": "2026-05-11",
"provider_name": "quickshift"
}
},
"city": {
"confidence": 25,
"geoname_id": 54321,
"names": {
"de": "Los Angeles",
"en": "Los Angeles",
"es": "Los Ángeles",
"fr": "Los Angeles",
"ja": "ロサンゼルス市",
"pt-BR": "Los Angeles",
"ru": "Лос-Анджелес",
"zh-CN": "洛杉矶"
}
},
"continent": {
"code": "NA",
"geoname_id": 123456,
"names": {
"de": "Nordamerika",
"en": "North America",
"es": "América del Norte",
"fr": "Amérique du Nord",
"ja": "北アメリカ",
"pt-BR": "América do Norte",
"ru": "Северная Америка",
"zh-CN": "北美洲"
}
},
"country": {
"confidence": 75,
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
}
},
"location": {
"accuracy_radius": 20,
"average_income": 50321,
"latitude": 37.6293,
"local_time": "2015-04-26T01:37:17-08:00",
"longitude": -122.1163,
"metro_code": 807,
"population_density": 7122,
"time_zone": "America/Los_Angeles"
},
"postal": {
"code": "90001",
"confidence": 10
},
"registered_country": {
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
}
},
"represented_country": {
"geoname_id": 6252001,
"is_in_european_union": true,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États-Unis",
"ja": "アメリカ合衆国",
"pt-BR": "Estados Unidos",
"ru": "США",
"zh-CN": "美国"
},
"type": "military"
},
"risk_reasons": [
{
"code": "ANONYMOUS_IP",
"reason": "The IP address belongs to an anonymous network."
},
{
"code": "MINFRAUD_NETWORK_ACTIVITY",
"reason": "Suspicious activity has been seen on this IP address across minFraud customers."
}
],
"subdivisions": [
{
"confidence": 50,
"geoname_id": 5332921,
"iso_code": "CA",
"names": {
"de": "Kalifornien",
"en": "California",
"es": "California",
"fr": "Californie",
"ja": "カリフォルニア",
"ru": "Калифорния",
"zh-CN": "加州"
}
}
],
"traits": {
"autonomous_system_number": 1239,
"autonomous_system_organization": "Linkem IR WiMax Network",
"connection_type": "Cable/DSL",
"domain": "example.com",
"ip_address": "1.2.3.4",
"ip_risk_snapshot": 45.5,
"is_anonymous": true,
"is_anonymous_vpn": true,
"is_anycast": true,
"is_hosting_provider": true,
"is_public_proxy": true,
"is_residential_proxy": true,
"is_tor_exit_node": true,
"isp": "Linkem spa",
"mobile_country_code": "310",
"mobile_network_code": "004",
"network": "1.2.3.0/24",
"organization": "Linkem IR WiMax Network",
"static_ip_score": 1.5,
"user_count": 1,
"user_type": "traveler"
}
},
"queries_remaining": 5000,
"risk_score": 0.01,
"warnings": [
{
"code": "INPUT_INVALID",
"input_pointer": "/shipping/city",
"warning": "Encountered value at /shipping/city that does not meet the required constraints"
}
],
"billing_address": {
"distance_to_ip_location": 100,
"is_in_ip_country": true,
"is_postal_in_city": true,
"latitude": 37.545,
"longitude": -122.421
},
"billing_phone": {
"country": "US",
"is_voip": true,
"matches_postal": true,
"network_operator": "Verizon/1",
"number_type": "fixed"
},
"credit_card": {
"brand": "Visa",
"country": "US",
"is_business": true,
"is_issued_in_billing_address_country": true,
"is_prepaid": true,
"is_virtual": true,
"issuer": {
"matches_provided_name": true,
"matches_provided_phone_number": true,
"name": "Bank of America",
"phone_number": "800-732-9194"
},
"type": "credit"
},
"device": {
"confidence": 99,
"id": "7835b099-d385-4e5b-969e-7df26181d73b",
"last_seen": "2016-06-08T14:16:38Z",
"local_time": "2018-01-02T10:40:11-08:00"
},
"email": {
"domain": {
"classification": "business",
"first_seen": "2019-01-20",
"risk": 1.23,
"visit": {
"has_redirect": true,
"last_visited_on": "2025-11-15",
"status": "live"
},
"volume": 6.5
},
"first_seen": "2016-02-03",
"is_disposable": false,
"is_free": false,
"is_high_risk": true
},
"shipping_address": {
"distance_to_billing_address": 22,
"distance_to_ip_location": 15,
"is_high_risk": true,
"is_in_ip_country": true,
"is_postal_in_city": true,
"latitude": 37.632,
"longitude": -122.313
},
"shipping_phone": {
"country": "CA",
"is_voip": true,
"matches_postal": true,
"network_operator": "Telus Mobility-SVR/2",
"number_type": "mobile"
},
"risk_score_reasons": [
{
"multiplier": 45,
"reasons": [
{
"code": "ANONYMOUS_IP",
"reason": "The Anonymous IP address raised the overall risk score"
}
]
},
{
"multiplier": 1.6,
"reasons": [
{
"code": "ORG_DISTANCE_RISK",
"reason": "The risk of the ISP combined with the distance between the billing address and IP address location raised the overall risk score"
}
]
},
{
"multiplier": 0.34,
"reasons": [
{
"code": "PHONE_ACTIVITY",
"reason": "minFraud network activity of the phone number lowered the overall risk score"
}
]
}
]
}
```
### Error Body Example
```json
{
"code": "INSUFFICIENT_FUNDS",
"error": "You do not have sufficient funds to use this service."
}
```
# Evaluate a Transaction
Source: https://dev.maxmind.com/minfraud/evaluate-a-transaction/
Evaluating a transaction consists of setting up device tracking, creating an
object that contains the details of the transaction, and then submitting the
transaction to the minFraud service for evaluation.
## Implementation
MaxMind offers and highly recommends using official client libraries to access
our minFraud services. If you cannot or do not wish to use our client libraries,
please review our [minFraud API Documentation page](/minfraud/api-documentation/index.md)
for details on our JSON API.
### 1. Add device tracking to your site or app
The [Device Tracking Add-On](/minfraud/track-devices/index.md) runs on a visiting device
so that the minFraud service can assign a device ID and begin collecting
fingerprint information. This helps detect fraudsters if they change or enable
proxies while using your site or app.
Note that, in order to be effective, device tracking must be active when the IP
address is captured for a minFraud query.
For web integration, add the device tracking script to the footer of your HTML
pages. See [Web device tracking](/minfraud/track-devices/web/index.md#implementation) for
the snippets to choose from. For Android apps, see the
[Android SDK guide](/minfraud/track-devices/android/index.md).
Higher-volume and enterprise accounts can also serve the script from a hostname
on their own domain to
[protect device tracking from ad blockers](/minfraud/track-devices/web/index.md#protecting-device-tracking-from-ad-blockers).
### 2. Install the minFraud client library
We have a collection of officially supported libraries for you to interact with
the minFraud API:
```csharp
// Install via NuGet
Install-Package MaxMind.MinFraud
```
```java
// Install via Maven, recommended
com.maxmind.minfraud
minfraud
4.4.0
// Or install via Gradle
repositories {
mavenCentral()
}
dependencies {
implementation 'com.maxmind.minfraud:minfraud:4.4.0'
}
```
```javascript
// Install via npm
npm install @maxmind/minfraud-api-node
// Or install via yarn
yarn add @maxmind/minfraud-api-node
```
```php
# Install via Composer
composer require maxmind/minfraud:~3.0
```
```python
# Install via pip
pip install minfraud
```
```ruby
# Install as a gem
gem install minfraud
# Or add this to your Gemfile
gem 'minfraud'
```
### 3. Create a minFraud client object
To interact with our API, you need to create a new client object. For this you
will need
[your MaxMind account ID and license key](https://www.maxmind.com/en/accounts/current/license-key):
```csharp
int accountId = 10;
string licenseKey = "LICENSEKEY";
var client = new WebServiceClient(accountId, licenseKey);
```
```java
int accountId = 10;
String licenseKey = "LICENSEKEY";
WebServiceClient client = new WebServiceClient.Builder(accountId, licenseKey).build();
```
```javascript
import * as minFraud from '@maxmind/minfraud-api-node';
const accountId = '10';
const licenseKey = 'LICENSEKEY';
const client = new minFraud.Client(accountId, licenseKey);
```
```php
$accountId = 10;
$licenseKey = 'LICENSEKEY';
$client = new MinFraud($accountId, $licenseKey);
```
```python
from minfraud import Client, AsyncClient
account_id = 10
license_key = 'LICENSEKEY'
# If you want to use synchronous requests
client = Client(account_id, license_key)
# Or if you want to use asynchronous requests
async_client = AsyncClient(account_id, license_key)
```
```ruby
Minfraud.configure do |c|
c.account_id = 10
c.license_key = 'LICENSEKEY'
c.enable_validation = true
end
```
### 4. Create a transaction object
The transaction object represents a customer's transaction that you are sending
to the minFraud service for evaluation. There are no mandatory fields, but
including [more information](/minfraud/evaluate-a-transaction/index.md#full-examples)
about the transaction improves the accuracy of the transaction's evaluation. The
following examples use the recommended minimum amount of information you should
submit:
```csharp
var transaction = new Transaction
{
Device = new Device
{
IPAddress = System.Net.IPAddress.Parse("1.1.1.1")
},
Email = new Email
{
Address = "test@maxmind.com",
Domain = "maxmind.com"
},
Billing = new Billing
{
FirstName = "First",
LastName = "Last",
Company = "Company, Inc.",
Address = "1 Billing Address St.",
Address2 = "Unit 1",
City = "Waltham",
Region = "MA",
Country = "US",
Postal = "02451",
PhoneNumber = "555-555-5555",
PhoneCountryCode = "1"
},
CreditCard = new CreditCard
{
IssuerIdNumber = "411111"
},
Shipping = new Shipping
{
FirstName = "First",
LastName = "Last",
Company = "Company Inc.",
Address = "1 Shipping Address St.",
Address2 = "Unit 1",
City = "Waltham",
Region = "MA",
Country = "US",
Postal = "02451",
PhoneNumber = "555-555-5555",
PhoneCountryCode = "1"
}
};
```
```java
Transaction transaction = new Transaction.Builder(
new Device.Builder(InetAddress.getByName("1.1.1.1"))
.build()
).billing(
new Billing.Builder()
.address("1 Billing Address St.")
.address2("Unit 1")
.city("Waltham")
.company("Company, Inc")
.firstName("First")
.lastName("Last")
.phoneCountryCode("1")
.phoneNumber("555-555-5555")
.postal("02451")
.region("MA")
.build()
).creditCard(
new CreditCard.Builder()
.issuerIdNumber("411111")
.build()
).email(
new Email.Builder()
.address("test@maxmind.com")
.domain("maxmind.com")
.build()
).shipping(
new Shipping.Builder()
.address("1 Shipping Address St.")
.address2("Unit 1")
.city("Waltham")
.company("Company, Inc")
.firstName("First")
.lastName("Last")
.phoneCountryCode("1")
.phoneNumber("555-555-5555")
.postal("02451")
.region("MA")
.build()
).build();
```
```javascript
import * as minFraud from '@maxmind/minfraud-api-node';
let transaction;
try {
transaction = new minFraud.Transaction({
device: new minFraud.Device({
ipAddress: '1.1.1.1',
}),
billing: new minFraud.Billing({
address: '1 Billing Address St.',
address2: 'Unit 1',
city: 'Waltham',
company: 'Company, Inc.',
country: 'US',
firstName: 'First',
lastName: 'Last',
phoneCountryCode: '1',
phoneNumber: '555-555-5555',
postal: '02451',
region: 'MA',
}),
creditCard: new minFraud.CreditCard({
issuerIdNumber: '411111',
}),
email: new minFraud.Email({
address: 'test@maxmind.com',
domain: 'maxmind.com',
}),
shipping: new minFraud.Shipping({
address: '1 Shipping Address St.',
address2: 'Unit 1',
city: 'Waltham',
company: 'Company, Inc.',
country: 'US',
firstName: 'First',
lastName: 'Last',
phoneCountryCode: '1',
phoneNumber: '555-555-5555',
postal: '02451',
region: 'MA',
}),
});
} catch (error) {
// handle the error
}
```
```php
$request = $client->withDevice(
ipAddress: '1.1.1.1'
)->withBilling(
firstName: 'First',
lastName: 'Last',
company: 'Company',
address: '1 Billing Address St.',
address2: 'Unit 1',
city: 'Waltham',
region: 'MA',
country: 'US',
postal: '02451',
phoneNumber: '555-555-5555',
phoneCountryCode: '1'
)->withCreditCard(
issuerIdNumber: '411111'
)->withEmail(
address: 'test@maxmind.com',
domain: 'maxmind.com'
)->withShipping(
firstName: 'First',
lastName: 'Last',
company: 'Company',
address: '1 Shipping Address St.',
address2: 'Unit 1',
city: 'Waltham',
region: 'MA',
country: 'US',
postal: '02451',
phoneNumber: '555-555-5555',
phoneCountryCode: '1'
);
```
```python
request = {
'device': {
'ip_address': '1.1.1.1',
},
'billing': {
'first_name': 'First',
'last_name': 'Last',
'company': 'Company, Inc.',
'address': '1 Billing Address St.',
'address_2': 'Unit 1',
'city': 'Waltham',
'region': 'MA',
'country': 'US',
'postal': '02451',
'phone_country_code': '1',
'phone_number': '555-555-5555',
},
'credit_card': {
'issuer_id_number': '411111'
},
'email': {
'address': '977577b140bfb7c516e4746204fbdb01',
'domain': 'maxmind.com'
},
'shipping': {
'first_name': 'First',
'last_name': 'Last',
'company': 'Company, Inc.',
'address': '1 Shipping Address St.',
'address_2': 'Unit 1',
'city': 'Waltham',
'region': 'MA',
'country': 'US',
'postal': '02451',
'phone_country_code': '1',
'phone_number': '555-555-5555',
}
}
```
```ruby
assessment = Minfraud::Assessments.new(
device: {
ip_address: '1.1.1.1',
},
billing: {
first_name: 'First',
last_name: 'Last',
company: 'Company, Inc.',
address: '1 Billing Address St.',
address_2: 'Unit 1',
city: 'Waltham',
region: 'MA',
country: 'US',
postal: '02451',
phone_number: '555-555-5555',
phone_country_code: '1',
},
credit_card: {
issuer_id_number: '411111',
},
email: {
address: 'test@maxmind.com',
domain: 'maxmind.com',
},
shipping: {
first_name: 'First',
last_name: 'Last',
company: 'Company, Inc.',
address: '1 Shipping Address St.',
address_2: 'Unit 1',
city: 'Waltham',
region: 'MA',
country: 'US',
postal: '02451',
phone_number: '555-555-5555',
phone_country_code: '1',
},
)
```
### 5. Submit the transaction object for evaluation
Our client libraries provide a distinct method for each minFraud service. Use
the appropriate method to submit the transaction object to the minFraud Score,
Insights, or Factors service.
```csharp
// minFraud Score
var score = await client.ScoreAsync(transaction);
// minFraud Insights
var insights = await client.InsightsAsync(transaction);
// minFraud Factors
var factors = await client.FactorsAsync(transaction);
```
```java
// minFraud Score
ScoreResponse score = client.score(transaction);
// minFraud Insights
InsightsResponse insights = client.insights(transaction);
// minFraud Factors
FactorsResponse factors = client.factors(transaction);
```
```javascript
// minFraud Score
client.score(transaction).then(scoreResponse => ...);
// minFraud Insights
client.insights(transaction).then(insightsResponse => ...);
// minFraud Factors
client.factors(transaction).then(factorsResponse => ...);
```
```php
// minFraud Score
$scoreResponse = $request->score();
// minFraud Insights
$insightsResponse = $request->insights();
// minFraud Factors
$factorsResponse = $request->factors();
```
```python
# minFraud Score - Synchronous
score_response = client.score(request)
# minFraud Score - Asynchronous
score_response = await async_client.score(request)
# minFraud Insights - Synchronous
insights_response = client.insights(request)
# minFraud Insights - Asynchronous
insights_response = await async_client.insights(request)
# minFraud Factors - Synchronous
factors_response = client.factors(request)
# minFraud Factors - Asynchronous
factors_response = await async_client.factors(request)
```
```ruby
# minFraud Score
score_model = assessment.score.body
# minFraud Insights
insights_model = assessment.insights.body
# minFraud Factors
factors_model = assessment.factors.body
```
## Validation and error handling
By default, our client libraries will throw an exception if any of the
transaction object's values are invalid. The exception is thrown when the object
is constructed; the python library will raise an error when the minFraud service
method is called.
If the minFraud request fails, our client libraries will throw an exception,
raise an error (python), or reject the promise (node).
For more information on errors and exceptions, including their types and
descriptions,
[go to the specific library's documentation page](/minfraud/evaluate-a-transaction/index.md#links-to-maxmind-client-apis).
## Full examples
```csharp
using MaxMind.MinFraud;
using MaxMind.MinFraud.Request;
using System;
using System.Collections.Generic;
using System.Net;
using System.Threading.Tasks;
public class MinFraudExample
{
static void Main()
{
MinFraudAsync().Wait();
}
static public async Task MinFraudAsync()
{
var transaction = new Transaction
{
Device = new Device
{
IPAddress = IPAddress.Parse("1.1.1.1"),
UserAgent = "Mozilla/5.0 (X11; Linux x86_64)",
AcceptLanguage = "en-US,en;q=0.8",
SessionAge = 3600,
SessionId = "a333a4e127f880d8820e56a66f40717c"
},
Event = new Event
{
TransactionId = "txn3134133",
ShopId = "s2123",
Type = EventType.Purchase
},
Account = new Account
{
UserId = "3132",
Username = "fred"
},
Email = new Email
{
Address = "test@maxmind.com",
Domain = "maxmind.com"
},
Billing = new Billing
{
FirstName = "First",
LastName = "Last",
Company = "Company, Inc.",
Address = "1 Billing Address St.",
Address2 = "Unit 1",
City = "Waltham",
Region = "MA",
Country = "US",
Postal = "02451",
PhoneNumber = "555-555-5555",
PhoneCountryCode = "1"
},
Shipping = new Shipping
{
FirstName = "First",
LastName = "Last",
Company = "Company Inc.",
Address = "1 Shipping Address St.",
Address2 = "Unit 1",
City = "Waltham",
Region = "MA",
Country = "US",
Postal = "02451",
PhoneNumber = "555-555-5555",
PhoneCountryCode = "1",
DeliverySpeed = ShippingDeliverySpeed.SameDay
},
Payment = new Payment
{
Processor = PaymentProcessor.Stripe,
WasAuthorized = false,
DeclineCode = "invalid number"
},
CreditCard = new CreditCard
{
IssuerIdNumber = "411111",
BankName = "Test Bank",
BankPhoneCountryCode = "1",
BankPhoneNumber = "555-555-5555",
AvsResult = 'Y',
CvvResult = 'N',
LastDigits = "1234",
Token = "123456abc1234"
},
Order = new Order
{
Amount = 323.21m,
Currency = "USD",
DiscountCode = "FIRST",
AffiliateId = "af12",
SubaffiliateId = "saf42",
ReferrerUri = new Uri("http://www.amazon.com/"),
IsGift = true,
HasGiftMessage = true
},
ShoppingCart = new List
{
new ShoppingCartItem
{
Category = "pets",
ItemId = "ad23232",
Quantity = 2,
Price = 20.43m
},
new ShoppingCartItem
{
Category = "beauty",
ItemId = "bst112",
Quantity = 1,
Price = 100.00m
}
},
CustomInputs = new CustomInputs.Builder
{
{ "float_input", 12.1d},
{ "integer_input", 3123},
{ "string_input", "This is a string input."},
{ "boolean_input", true},
}.Build()
};
// If you are making multiple requests, a single WebServiceClient
// should be shared across requests to allow connection reuse. The
// class is thread safe.
//
// Replace "6" with your account ID and "ABCD567890" with your license
// key.
using (var client = new WebServiceClient(6, "ABCD567890"))
{
// Use `InsightsAsync` if querying Insights; `FactorsAsync` if querying Factors
var score = await client.ScoreAsync(transaction);
Console.WriteLine(score);
}
}
}
```
```java
Transaction request = new Transaction.Builder(
new Device.Builder(InetAddress.getByName("1.1.1.1"))
.acceptLanguage("en-US")
.sessionAge(3600.6)
.sessionId("foobar")
.userAgent("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36")
.build()
).account(
new Account.Builder()
.userId("usr-123")
.username("fraudster9")
.build()
).billing(
new Billing.Builder()
.address("1 Billing Address St.")
.address2("Unit 1")
.city("Waltham")
.company("Company, Inc")
.firstName("First")
.lastName("Last")
.phoneCountryCode("1")
.phoneNumber("555-555-5555")
.postal("02451")
.region("MA")
.build()
).creditCard(
new CreditCard.Builder()
.avsResult('N')
.bankName("Test Bank")
.bankPhoneCountryCode("1")
.bankPhoneNumber("555-555-5555")
.cvvResult('Y')
.issuerIdNumber("411111")
.lastDigits("1234")
.token("123456abc1234")
.build()
).email(
new Email.Builder()
.address("fraud@ster.com")
.domain("ster.com")
.build()
).event(
new Event.Builder()
.shopId("2432")
.time(new Date())
.transactionId("tr1242")
.type(Event.Type.ACCOUNT_CREATION)
.build()
).order(
new Order.Builder()
.affiliateId("af5")
.amount(new BigDecimal(Double.toString(1.1)))
.currency("USD")
.discountCode("10OFF")
.referrerUri(new URI("https://www.google.com/"))
.subaffiliateId("saf9")
.isGift(true)
.hasGiftMessage(true)
.build()
).payment(
new Payment.Builder()
.declineCode("invalid")
.processor(Payment.Processor.ADYEN)
.wasAuthorized(false)
.build()
).shipping(
new Shipping.Builder()
.address("1 Shipping Address St.")
.address2("Unit 1")
.city("Waltham")
.company("Company, Inc")
.firstName("First")
.lastName("Last")
.phoneCountryCode("1")
.phoneNumber("555-555-5555")
.postal("02451")
.region("MA")
.deliverySpeed(Shipping.DeliverySpeed.EXPEDITED)
.build()
).addShoppingCartItem(
new ShoppingCartItem.Builder()
.category("TOYS")
.itemId("t-132")
.price(1.1)
.quantity(100)
.build()
).addShoppingCartItem(
new ShoppingCartItem.Builder()
.category("COSMETICS")
.itemId("c-12312")
.price(3.)
.quantity(1)
.build()
).customInputs(
new CustomInputs.Builder()
.put("float_input", 12.1)
.put("integer_input", 3123)
.put("string_input", "This is a string input.")
.put("boolean_input", true)
.build()
).build();
WebServiceClient client = new WebServiceClient.Builder(6, "ABCD567890").build();
// use `client.insights` or `client.factors` for Insights and Factors respectively
System.out.println(client.score(request));
```
```javascript
import { URL } from 'url'; // Used for order.referrerUri
import * as minFraud from '@maxmind/minfraud-api-node';
// client is reusable
const client = new minFraud.Client('1234', 'LICENSEKEY');
let transaction;
try {
transaction = new minFraud.Transaction({
device: new minFraud.Device({
ipAddress: '1.1.1.1',
acceptLanguage: 'en-US,en;q=0.8',
sessionAge: 3600,
sessionId: 'a333a4e127f880d8820e56a66f40717c',
userAgent: 'Mozilla/5.0 (X11; Linux x86_64)',
}),
event: new minFraud.Event({
shopId: 'shop',
time: new Date(Date.now()),
transactionId: 'txn1234',
type: minFraud.Constants.EventType.PayoutChange,
}),
account: new minFraud.Account({
userId: 'user123',
username: 'userperson',
}),
email: new minFraud.Email({
address: 'foo@bar.com',
domain: 'bar.com',
}),
billing: new minFraud.Billing({
address: '1 Billing Address St.',
address2: 'Unit 1',
city: 'Waltham',
company: 'Company, Inc.',
country: 'US',
firstName: 'First',
lastName: 'Last',
phoneCountryCode: '1',
phoneNumber: '555-555-5555',
postal: '02451',
region: 'MA',
}),
shipping: new minFraud.Shipping({
address: '1 Shipping Address St.',
address2: 'Unit 1',
city: 'Waltham',
company: 'Company, Inc.',
country: 'US',
deliverySpeed: minFraud.Constants.DeliverySpeed.Expedited,
firstName: 'First',
lastName: 'Last',
phoneCountryCode: '1',
phoneNumber: '555-555-5555',
postal: '02451',
region: 'MA',
}),
payment: new minFraud.Payment({
declineCode: 'A',
processor: minFraud.Constants.Processor.ConceptPayments,
wasAuthorized: true,
}),
creditCard: new minFraud.CreditCard({
avsResult: 'A',
bankName: 'Test bank',
bankPhoneCountryCode: '1',
bankPhoneNumber: '555-555-5555',
cvvResult: 'B',
issuerIdNumber: '411111',
lastDigits: '1234',
token: 'a_token',
}),
order: new minFraud.Order({
affiliateId: 'robotnet',
amount: 22.99,
currency: 'USD',
discountCode: 'COUPONS',
hasGiftMessage: true,
isGift: true,
referrerUri: new URL('https://robots.com/swarms'),
subaffiliateId: 'swarm',
}),
shoppingCart: [
new minFraud.ShoppingCartItem({
category: 'screws',
itemId: 'sc123',
price: 9.99,
quantity: 100,
}),
new minFraud.ShoppingCartItem({
category: 'screws',
itemId: 'sc123',
price: 9.99,
quantity: 100,
}),
],
customInputs: [
new minFraud.CustomInput('key', 'value'),
new minFraud.CustomInput('key_2', true),
new minFraud.CustomInput('key_3', 100),
],
});
} catch (error) {
// handle the error
}
// Use `client.insights` or `client.factors` for Insights and Factors respectively
client.score(transaction).then((response) => {
console.log(response.riskScore); // 50
console.log(response.ipAddress.risk); // 50
});
```
```php
with*() call returns a new immutable object. This means
# that if you separate the calls into separate statements without chaining,
# you should assign the return value to a variable each time.
$request = $mf->withDevice(
ipAddress: '1.1.1.1',
sessionAge: 3600.5,
sessionId: 'foobar',
userAgent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36',
acceptLanguage: 'en-US,en;q=0.8'
)->withEvent(
transactionId: 'txn3134133',
shopId: 's2123',
type: 'purchase'
)->withAccount(
userId: '3132',
usernameMd5: '4f9726678c438914fa04bdb8c1a24088'
)->withEmail(
address: 'test@maxmind.com',
domain: 'maxmind.com'
)->withBilling(
firstName: 'First',
lastName: 'Last',
company: 'Company',
address: '1 Billing Address St.',
address2: 'Unit 1',
city: 'Waltham',
region: 'MA',
country: 'US',
postal: '02451',
phoneNumber: '555-555-5555',
phoneCountryCode: '1'
)->withShipping(
firstName: 'First',
lastName: 'Last',
company: 'Company',
address: '1 Shipping Address St.',
address2: 'Unit 1',
city: 'Waltham',
region: 'MA',
country: 'US',
postal: '02451',
phoneNumber: '555-555-5555',
phoneCountryCode: '1',
deliverySpeed: 'same_day'
)->withPayment(
processor: 'stripe',
wasAuthorized: false,
declineCode: 'invalid number'
)->withCreditCard(
issuerIdNumber: '411111',
lastDigits: '1234',
bankName: 'Test Bank',
bankPhoneCountryCode: '1',
bankPhoneNumber: '555-555-5555',
avsResult: 'Y',
cvvResult: 'N',
token: '123456abc1234'
)->withOrder(
amount: 323.21,
currency: 'USD',
discountCode: 'FIRST',
isGift: true,
hasGiftMessage: true,
affiliateId: 'af12',
subaffiliateId: 'saf42',
referrerUri: 'http://www.amazon.com/'
)->withShoppingCartItem(
category: 'pets',
itemId: 'leash-0231',
quantity: 2,
price: 20.43
)->withShoppingCartItem(
category: 'beauty',
itemId: 'msc-1232',
quantity: 1,
price: 100.00
)->withCustomInputs([
'section' => 'news',
'previous_purchases' => 19,
'discount' => 3.2,
'previous_user' => true,
]);
# To get the minFraud Factors response model, use ->factors():
$factorsResponse = $request->factors();
foreach ($factorsResponse->riskScoreReasons as $riskScoreReason) {
print($riskScoreReason->multiplier . "\n");
foreach ($riskScoreReason->reasons as $reason) {
print($reason->code . ': ' . $reason->reason . "\n");
}
}
# To get the minFraud Insights response model, use ->insights():
$insightsResponse = $request->insights();
print($insightsResponse->riskScore . "\n");
print($insightsResponse->creditCard->issuer->name . "\n");
foreach ($insightsResponse->warnings as $warning) {
print($warning->warning . "\n");
}
# To get the minFraud Score response model, use ->score():
$scoreResponse = $request->score();
print($scoreResponse->riskScore . "\n");
foreach ($scoreResponse->warnings as $warning) {
print($warning->warning . "\n");
}
```
```python
import asyncio # Only needed for asynchronous requests
from minfraud import AsyncClient, Client
request = {
'device': {
'ip_address': '1.1.1.1',
'accept_language': 'en-US,en;q=0.8',
'session_age': 3600,
'session_id': 'a333a4e127f880d8820e56a66f40717c',
'user_agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36'
},
'event': {
'shop_id': 's2123',
'type': 'purchase',
'transaction_id': 'txn3134133',
},
'account': {
'user_id': '3132',
'username_md5': '570a90bfbf8c7eab5dc5d4e26832d5b1'
},
'email': {
'address': '977577b140bfb7c516e4746204fbdb01',
'domain': 'maxmind.com'
},
'billing': {
'first_name': 'First',
'last_name': 'Last',
'company': 'Company, Inc.',
'address': '1 Billing Address St.',
'address_2': 'Unit 1',
'city': 'Waltham',
'region': 'MA',
'country': 'US',
'postal': '02451',
'phone_country_code': '1',
'phone_number': '555-555-5555',
},
'shipping': {
'first_name': 'First',
'last_name': 'Last',
'company': 'Company, Inc.',
'address': '1 Shipping Address St.',
'address_2': 'Unit 1',
'city': 'Waltham',
'region': 'MA',
'country': 'US',
'postal': '02451',
'phone_country_code': '1',
'phone_number': '555-555-5555',
'delivery_speed': 'same_day',
},
'credit_card': {
'bank_phone_country_code': '1',
'avs_result': 'Y',
'bank_phone_number': '555-555-5555',
'last_digits': '1234',
'cvv_result': 'N',
'bank_name': 'Test Bank',
'issuer_id_number': '411111',
'token': '123456abc1234'
},
'payment': {
'decline_code': 'invalid number',
'was_authorized': False,
'processor': 'stripe'
},
'shopping_cart': [{
'category': 'pets',
'quantity': 2,
'price': 20.43,
'item_id': 'lsh12'
}, {
'category': 'beauty',
'quantity': 1,
'price': 100.0,
'item_id': 'ms12'
}],
'order': {
'affiliate_id': 'af12',
'referrer_uri': 'http://www.amazon.com/',
'subaffiliate_id': 'saf42',
'discount_code': 'FIRST',
'currency': 'USD',
'amount': 323.21,
'is_gift': True,
'has_gift_message': True
},
'custom_inputs': {
'section': 'news',
'num_of_previous_purchases': 19,
'discount': 3.2,
'previous_user': True
}
}
# This example function uses a synchronous Client object. The object
# can be used across multiple requests.
def sync_example(account_id, license_key):
with Client(account_id, license_key) as client:
print(client.score(request))
print(client.insights(request))
print(client.factors(request))
sync_example(42, 'license_key')
# This example function uses an asynchronous AsyncClient object. The
# object can be used across multiple requests.
async def async_example(account_id, license_key):
async with AsyncClient(account_id, license_key) as client:
print(await client.score(request))
print(await client.insights(request))
print(await client.factors(request))
asyncio.run(async_example(42, 'license_key'))
```
```ruby
require 'minfraud'
# Configure the client.
Minfraud.configure do |c|
c.account_id = 10
c.license_key = 'LICENSEKEY'
c.enable_validation = true
end
# Prepare the request.
assessment = Minfraud::Assessments.new(
device: {
ip_address: '1.1.1.1',
accept_language: 'en-US,en;q=0.8',
session_age: 3600.5,
session_id: 'foo',
user_agent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36',
},
event: {
transaction_id: 'txn3134133',
shop_id: 's2123',
type: :purchase,
},
account: {
user_id: '3132',
username_md5: '4f9726678c438914fa04bdb8c1a24088',
},
email: {
address: 'test@maxmind.com',
domain: 'maxmind.com',
},
billing: {
first_name: 'First',
last_name: 'Last',
company: 'Company, Inc.',
address: '1 Billing Address St.',
address_2: 'Unit 1',
city: 'Waltham',
region: 'MA',
country: 'US',
postal: '02451',
phone_number: '555-555-5555',
phone_country_code: '1',
},
shipping: {
first_name: 'First',
last_name: 'Last',
company: 'Company, Inc.',
address: '1 Shipping Address St.',
address_2: 'Unit 1',
city: 'Waltham',
region: 'MA',
country: 'US',
postal: '02451',
phone_number: '555-555-5555',
phone_country_code: '1',
delivery_speed: :same_day,
},
payment: {
processor: :stripe,
was_authorized: false,
decline_code: 'invalid number',
},
credit_card: {
issuer_id_number: '411111',
last_digits: '1234',
bank_name: 'Test Bank',
bank_phone_country_code: '1',
bank_phone_number: '555-555-5555',
token: 'abcd',
avs_result: 'Y',
cvv_result: 'N',
},
order: {
amount: 323.21,
currency: 'USD',
discount_code: 'FIRST',
is_gift: true,
has_gift_message: true,
affiliate_id: 'af12',
subaffiliate_id: 'saf42',
referrer_uri: 'http://www.amazon.com/',
},
shopping_cart: [
{
category: 'pets',
item_id: 'leash-0231',
quantity: 2,
price: 20.43,
},
{
category: 'beauty',
item_id: 'msc-1232',
quantity: 1,
price: 100.00,
},
],
custom_inputs: {
section: 'news',
previous_purchases: 19,
discount: 3.2,
previous_user: true,
},
)
# To get the Factors response model, use #factors.
factors_model = assessment.factors.body
factors_model.warnings.each { |w| puts w.warning }
factors_model.risk_score_reasons.each do |risk_score_reason|
p risk_score_reason.multiplier
risk_score_reason.reasons.each do |reason|
p "#{reason.code}: #{reason.reason}"
end
end
p factors_model.risk_score
# To get the Insights response model, use #insights.
insights_model = assessment.insights.body
insights_model.warnings.each { |w| puts w.warning }
p insights_model.credit_card.issuer.name
p insights_model.risk_score
# To get the Score response model, use #score.
score_model = assessment.score.body
score_model.warnings.each { |w| puts w.warning }
p score_model.risk_score
```
## Links to MaxMind client APIs
The following APIs are developed and maintained by MaxMind. See
[our guide on developing for the community](/contribute/index.md) if you have questions
about creating or sharing your own unofficial clients or integrations.
| Language or Framework | Package Repository | Documentation | Version Control |
| --------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------- |
| .NET (C#) | [NuGet](https://www.nuget.org/packages/MaxMind.MinFraud) | [GitHub Pages](https://maxmind.github.io/minfraud-api-dotnet/) | [GitHub](https://github.com/maxmind/minfraud-api-dotnet) |
| Java | [Maven Central](https://search.maven.org/search?q=g:com.maxmind.minfraud) | [GitHub Pages](https://maxmind.github.io/minfraud-api-java/) | [GitHub](https://github.com/maxmind/minfraud-api-java) |
| Node.js | [NPM](https://www.npmjs.com/package/@maxmind/minfraud-api-node) | [GitHub Pages](https://maxmind.github.io/minfraud-api-node/) | [GitHub](https://github.com/maxmind/minfraud-api-node) |
| Perl (deprecated) | [metacpan](https://metacpan.org/release/WebService-MinFraud) | [metacpan](https://metacpan.org/pod/WebService::MinFraud) | [GitHub](https://github.com/maxmind/minfraud-api-perl) |
| PHP | [Packagist](https://packagist.org/packages/maxmind/minfraud) | [GitHub Pages](https://maxmind.github.io/minfraud-api-php/) | [GitHub](https://github.com/maxmind/minfraud-api-php) |
| Python | [PyPI](https://pypi.org/project/minfraud/) | [Read the Docs](https://minfraud.readthedocs.io/en/latest/) | [GitHub](https://github.com/maxmind/minfraud-api-python) |
| Ruby | [RubyGems.org](https://rubygems.org/gems/minfraud) | [RubyDoc.info](https://www.rubydoc.info/gems/minfraud/) | [GitHub](https://github.com/maxmind/minfraud-api-ruby) |
# minFraud Legacy Web Service API
Source: https://dev.maxmind.com/minfraud/minfraud-legacy/
> **🚫 Danger**
>
> We have made a number of data changes to the minFraud
> Legacy Standard and Premium, and GeoIP Legacy City and Insights (formerly Omni)
> web services. Please see our
> [blog post](https://blog.maxmind.com/data-changes-to-geoip-legacy-and-minfraud-legacy-web-services-in-may-2022/)
> for more information, and how to prepare.
> **New minFraud APIs are available:** Please see
> [What's New in minFraud Score, minFraud Insights, and minFraud Factors](/minfraud/whats-new-in-minfraud-score-and-minfraud-insights/index.md)
> and our
> [minFraud Insights, minFraud Score, and minFraud Factors API documentation](/minfraud/index.md).
> To learn more about the minFraud Insights, minFraud Score, and minFraud Factors
> services and to purchase credits, please
> [visit the minFraud Overview page](https://www.maxmind.com/en/solutions/fraud-and-risk).
The minFraud web service is available using a simple URI-based API. To use this
service, you must have a valid
[MaxMind license key](https://www.maxmind.com/en/accounts/current/license-key).
## Report Transactions
If you are using our minFraud transaction fraud detection service, we also
encourage you to use our
[report transaction service](/minfraud/report-a-transaction/index.md). By reporting
false positives and instances of fraud to us, you can help us refine our
algorithms, so we can reduce false positives and catch more fraud.
## Device Tracking Add-On
You may optionally include
the [Device Tracking Add-On](/minfraud/track-devices/index.md) to help us identify the
device your customer is using to determine
whether it has been used in previous fraudulent transactions. The device
information is factored into the scores returned through the minFraud service.
## HTTP API
If an API for your language is not available, you can use the “raw” API detailed
below.
The HTTP API requires you to pass a set of parameters as an HTTP GET or POST.
Results are returned in a simple text format documented below.
The URI for this service is `https://minfraud.maxmind.com/minfraud/v1.0/legacy`.
You may be using the original URI, `https://minfraud.maxmind.com/app/ccv2r`.
The `minfraud.maxmind.com` hostname automatically picks the data center
geographically closest to you.
### Security
The API is only available via HTTPS. If you attempt to access this service via
HTTP, you will receive a `403 Forbidden` HTTP response.
We require TLS 1.2 or greater for all requests to our servers to keep your data
secure.
### HTTP status codes
In addition to the error code returned in the response body, this service uses
the HTTP status code to indicate certain error conditions. This lets you act on
these conditions from the HTTP status code, for example in your monitoring or an
internal proxy, without parsing the response body.
| HTTP status | Condition |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `200 OK` | The request was processed. This includes successful lookups and lookups that return a warning code in the response body. |
| `400 Bad Request` | The request was malformed. |
| `401 Unauthorized` | The license key is missing or invalid (`LICENSE_REQUIRED` or `INVALID_LICENSE_KEY`). |
| `402 Payment Required` | Your account is out of queries (`MAX_REQUESTS_REACHED`). |
| `403 Forbidden` | Your account does not have permission to use this service (`PERMISSION_REQUIRED`). |
| `5xx` | A server error occurred. |
Where applicable, the response body returns an `err` value with the relevant
error code. Warning conditions, including `IP_NOT_FOUND`, return a `200 OK`
status.
### Input
The minFraud API accepts input in a query string or as a form post
(application/x-www-form-urlencoded). It accepts the following fields. The name
of each field should be used as the query string or form field name. Field names
_are_ case-sensitive.
The length of the data passed to us does not matter for most fields. We will
truncate inputs as needed. However, for a few fields the length is important,
and this is noted in the table below.
String fields are limited to no more than 255 Unicode characters unless a
shorter length is specified. Of course, many fields also have additional
constraints that limit the length. For example, the `ip_address` field cannot be
longer than the longest valid representation of an IPv6 address.
| Name |
Type (length) |
Description |
|
Required Fields
The following fields are required.
|
| i |
string |
The IP address of the customer placing the order. This should be
passed as a string like “44.55.66.77” or “2001:db8::2:1”.
|
| license_key |
string |
Your
MaxMind license key.
|
|
Billing Address
You should always pass these fields if possible.
|
| city |
string (255) |
The billing city for the customer. |
| region |
string (255) |
The billing region/state for the customer. |
| postal |
string (255) |
The billing postal (zip) code for the customer. |
| country |
string (255) |
The billing country for the customer. This can be passed as the full
country name or as an
ISO 3166 code.
|
|
Shipping Address
These fields are used to check against our database of known high risk
shipping addresses. You should only pass these fields when shipping
physical goods.
|
| shipAddr |
string (255) |
The shipping street address. |
| shipCity |
string (255) |
The shipping address city. |
| shipRegion |
string (255) |
The shipping address region/state. |
| shipPostal |
string (255) |
The shipping address postal (zip) code. |
| shipCountry |
string (255) |
The shipping address country. |
|
User Data
Some of these fields are MD5 hash fields. Such fields should be passed
as an MD5 hash in hex form. Always lower-case the input before
hashing. Do not use any salt when hashing these inputs.
|
| domain |
string (255) |
The domain for the user’s email address. This field should not be
hashed.
|
| custPhone |
string (255) |
The customer’s phone number. Most formats are acceptable. We strip out
all non-numeric characters from the input.
|
| emailMD5 |
string (32) |
The customer’s email address. This field must be a valid email address
or the MD5 of the lowercased email address.
Important: if using the MD5 hash, please be
sure to
normalize it
before calculating its MD5 hash.
|
| usernameMD5 |
string (32) |
An MD5 hash of the user’s username in ASCII encoding. |
|
BIN-related
These fields are used to verify that the customer is in possession of
the credit card.
|
| bin |
string (255) |
The credit card BIN number. This is the first 6 or 8 digits of the
credit card number. It identifies the issuing bank.
|
| binName |
string (255) |
The name of the bank which issued the credit card as provided by the
end-user who initiated the event. This is used to verify that
cardholder is in possession of credit card. You must set the
bin field if you set this one.
|
| binPhone |
string (255) |
The customer service phone number listed on the back of the credit
card as provided by the end-user who initiated the event. This is used
to verify that cardholder is in possession of credit card. You must
set the bin field if you set this one.
|
|
Transaction Linking
These fields are used to link together fraudulent orders from the same
browser across multiple proxies or credit card numbers.
|
| user_agent |
string (255) |
The User-Agent HTTP header. |
| accept_language |
string (255) |
The Accept-Language HTTP header. |
|
Transaction Information
These fields provide additional information about the transaction.
|
| txnID |
string (255) |
Your internal transaction ID for the order. We can use this to locate
a specific transaction in our logs, and it will also show up in email
alerts and notifications from us to you.
|
| order_amount |
decimal (17, 3) |
The customer’s order amount. |
| order_currency |
string (3) |
The currency used for the customer’s order as an
ISO 4217 code.
|
| shopID |
string (255) |
Your internal ID for the shop, affiliate, or merchant this order is
coming from. Required for minFraud users who are resellers, payment
providers, gateways and affiliate networks.
|
| txn_type |
enum |
The transaction type. This can be set to one of the following strings:
- creditcard
- debitcard
- paypal
- google – Google checkout
- other
- lead – lead generation
- survey – online survey
- sitereg – site registration
The lead, survey, and sitereg types are
used for non-purchase transactions.
|
|
Credit Card Check
To provide these fields you must run the AVS and/or CVV checks before
calling minFraud.
|
| avs_result |
enum |
The AVS check result, as returned to you by the credit card processor.
The minFraud service supports the standard
AVS codes.
|
| cvv_result |
enum |
The card verification value (CVV) code as provided by the payment
processor. This should be a single letter.
Do not pass the CVV code itself.
|
|
Miscellaneous
|
| requested_type |
enum |
This can be set to either “standard” or “premium”. By default, we use
the highest level of service available for your account. If you have
both the premium and standard minFraud service, you can choose to use
the standard service to save on costs.
|
### Output
The minFraud service returns its output as a set of fields separated by
semicolons (;). Each field consists of a name and value separated by an equals
sign (=). The field values are not escaped, but will never contain a semicolon
or equals sign.
All strings are returned in the
[ISO-8859-1 encoding](https://en.wikipedia.org/wiki/ISO/IEC_8859-1). This
encoding is also referred to as latin1.
Here is an example of the output with just a few fields:
`riskScore=13.2;distance=6;countryMatch=Yes;countryCode=US;freeMail=Yes`
The API version column specifies the earliest API version in which a field is
available. You can explicitly
[ask for responses in older API formats](/minfraud/minfraud-legacy/index.md). By default,
all new users will receive responses for the version that was current when they
signed up for the service. The latest version is 1.3.
| Name |
Type (length) |
Description |
API version |
|
Risk Score
|
| riskScore |
decimal |
This field contains the risk score, from 0.01 to 100. A higher score
indicates a higher risk of fraud. For example, a score of 20 indicates
a 20% chance that a transaction is fraudulent. We never return a risk
score of 0, since all transactions have the possibility of being
fraudulent.
|
1.1 |
| score |
decimal |
This field has been deprecated, is not supported, and is no longer
present in API version 1.3.
|
1.0 |
| explanation |
string |
This field has been deprecated, is not supported, and is no longer
present in API version 1.3.
This is a brief explanation of the score (not the
riskScore).
|
1.1 |
|
GeoIP Location Checks
These fields are based on the correspondence between the user’s IP
address and the location information they provided.
|
| countryMatch |
enum |
This field can be either Yes or No.
It indicates whether the country of the IP address matched the billing
address country. A mismatch indicates a higher risk of fraud. If no
country input was provided, this field will be left blank.
|
1.0 |
| highRiskCountry |
enum |
This field has been deprecated. |
1.0 |
| distance |
integer |
The distance from the IP address location to the billing location, in
kilometers. A higher distance indicates a higher risk of fraud.
|
1.0 |
| ip_accuracyRadius |
integer |
The radius in kilometers around the specified location where the IP
address is likely to be.
|
1.2 |
| ip_city |
string |
The city or town name as defined by
GeoNames associated with the
IP address.
|
1.0 |
| ip_region |
string |
The
ISO-3166-2 code
for the state/region associated with the IP address. We previously
returned a
FIPS 10-4 code
for all countries other than the United States and Canada. See our
blog post
for more information.
|
1.0 |
| ip_regionName |
string |
The region name as defined by
GeoNames associated with the
IP address.
|
1.2 |
| ip_postalCode |
string |
The postal code associated with the IP address. These are available
for some IP addresses in Australia, Canada, France, Germany, Italy,
Spain, Switzerland, United Kingdom, and the US. We return the first 3
characters for Canadian postal codes. We return the first 2-4
characters (outward code) for postal codes in the United Kingdom.
|
1.2 |
| ip_metroCode |
integer |
Deprecated. This is a no-longer-maintained code for
targeting advertisements in Google.
|
1.2 |
| ip_areaCode |
string |
Deprecated. This field is empty. See our
blog post
for more information.
|
1.2 |
| countryCode |
string |
A
ISO 3166-1
country code for the country associated with the IP address. In
addition to the standard codes, we may also return one of the
following:
- A1 – an anonymous proxy.
- A2 – a satellite provider.
-
EU – an IP in a block used by multiple European
countries.
-
AP – an IP in a block used by multiple
Asia/Pacific region countries.
The US country code is returned for IP addresses
associated with overseas US military bases.
|
1.0 |
| ip_countryName |
string |
The country name as defined by
GeoNames associated with the
IP address.
|
1.2 |
| ip_continentCode |
string (2) |
A two-character code for the continent associated with the IP address.
The possible codes are:
- AF – Africa
- AN – Antarctica
- AS – Asia
- EU – Europe
- NA – North America
- OC – Oceania
- SA – South America
|
1.2 |
| ip_latitude |
decimal |
The approximate latitude of the location associated with the IP
address. This value is not precise and should not be used to identify
a particular address or household. The latitude and longitude are near
the center of the most granular location value returned: postal code,
city, region, or country.
|
1.0 |
| ip_longitude |
decimal |
The approximate longitude of the location associated with the IP
address. This value is not precise and should not be used to identify
a particular address or household.
|
1.0 |
| ip_timeZone |
string |
The time zone associated with the IP address. Time zone names are
taken from the
IANA time zone database.
|
1.2 |
| ip_asnum |
string |
The
autonomous system number
associated with the IP address.
|
1.2 |
| ip_userType |
enum |
The user type associated with the IP address. This will be one of the
following values.
- business
- cafe
- cellular
- college
- contentDeliveryNetwork
- government
- hosting
- library
- military
- residential
- router
- school
- searchEngineSpider
- traveler
|
1.2 |
| ip_netSpeedCell |
enum |
The connection type associated with the IP address. This can be one of
the following values:
- Dialup
- Cable/DSL
- Corporate
- Cellular
|
1.2 |
| ip_domain |
string |
The second level domain associated with the IP address. This will be
something like “example.com” or “example.co.uk”, not
“foo.example.com”.
|
1.2 |
| ip_isp |
string |
The name of the ISP associated with the IP address. |
1.0 |
| ip_org |
string |
The name of the organization associated with the IP address. |
1.0 |
| ip_cityConf |
decimal |
A value from 0-100 representing our confidence that the city is
correct.
|
1.2 |
| ip_regionConf |
decimal |
A value from 0-100 representing our confidence that the region is
correct.
|
1.2 |
| ip_postalConf |
decimal |
A value from 0-100 representing our confidence that the postal code is
correct.
|
1.2 |
| ip_countryConf |
decimal |
A value from 0-100 representing our confidence that the country is
correct.
|
1.2 |
|
Proxy Detection
These fields provide information about whether or not the user’s IP
address is a proxy, and if so, what type of proxy.
|
| anonymousProxy |
enum |
This field can be either Yes or No.
It indicates whether the user’s IP address is an anonymous proxy. An
anonymous proxy indicates a high risk of fraud.
|
1.0 |
| proxyScore |
decimal |
A score from 0.00-4.00 indicating the likelihood that the user’s IP
address is high risk.
| proxyScore |
Likelihood of fraud |
| 0.5 |
15% |
| 1.0 |
30% |
| 2.0 |
60% |
| 3.0+ |
90% |
Note: Anonymous proxies will generally return a
proxyScore of 0.
|
1.0 |
| ip_corporateProxy |
enum |
This field can be either Yes or No.
It indicates whether the user’s IP address is a known corporate proxy.
|
1.2 |
|
Emails and Login Checks
These fields provide information about the email and login info that
was provided in the input.
|
| freeMail |
enum |
This field can be either Yes or No.
It indicates whether the user’s email address is from a free email
provider. Note that this will be set to “No” if no domain is
passed in the input.
|
1.0 |
| carderEmail |
enum |
This field can be either Yes or No.
It indicates whether the user’s email address is in a database of
known high risk emails.
|
1.0 |
| highRiskUsername |
|
This field has been deprecated. It will be removed in a future
release.
|
1.0 |
| highRiskPassword |
|
This field has been deprecated. It will be removed in a future
release.
|
1.0 |
|
Bank Checks
These fields provide information about the user’s credit card and its
issuing bank.
|
| binMatch |
enum |
This field can be either Yes, No,
NotFound, or NA. It indicates
whether the country of the billing address matches the country of the
majority of customers using that BIN. In cases where the location of
customers is highly mixed, the match is to the country of the bank
issuing the card. The NotFound response means that we
could not find a match for the provided bin input field. The
NA response means that you did not provide a
bin in the input.
|
1.0 |
| binCountry |
string (2) |
The two letter
ISO 3166-1 alpha-2
country code associated with the location of the majority of customers
using this credit card as determined by their billing address. In
cases where the location of customers is highly mixed, this defaults
to the country of the bank issuing the card.
This field is returned for premium service level queries. For
standard service level queries the field is only returned if the
binMatch is Yes.
|
1.0 |
| binNameMatch |
enum |
This field can be either Yes, No,
NotFound, or NA. It indicates
whether the credit card’s bank name matches the binName input
field. The NotFound response means that we could not
find a match for the provided bin input field. The
NA response means that you did not provide a
binName in the input.
|
1.1 |
| binName |
string |
The name of the bank which issued the credit card. This is available
for approximately 96% of all BIN numbers.
This field is only returned for premium service level
queries.
|
1.1 |
| binPhoneMatch |
enum |
This field can be either Yes, No,
NotFound, or NA. It indicates
whether the credit card’s bank phone number matches the
binPhone input field. The NotFound response
means that we could not find a match for the provided
bin input field. The NA response means that
you did not provide a binPhone in the input.
|
1.0 |
| binPhone |
string |
The phone number of the bank which issued the credit card. This is
available for approximately 75% of all BIN numbers. In some cases the
phone number we return may be out of date.
This field is only returned for premium service level
queries.
|
1.0 |
| prepaid |
enum |
This field can be either Yes or No.
This indicates whether the card is a prepaid or gift card. If no
bin input was provided, this field will be left blank.
This field is only returned for premium service level
queries.
|
1.3 |
|
Address and Phone Number Checks
These fields provide information about the user’s phone and address.
|
| custPhoneInBillingLoc |
enum |
This field can be either Yes, No, or
NotFound. This indicates whether the customer’s phone
number is in the billing address’s postal code. The
No response means that phone number may be in a
different area, or it is not listed in our database. The
NotFound response indicates that the phone number
prefix is not in our database. Currently we only return
information about US phone numbers. For all other countries, this
field will be left blank.
|
1.0 |
| shipForward |
enum |
This field can be either Yes, No, or
NA. This indicates whether the customer’s shipping
address is in a database of known high risk shipping addresses. The
NA response indicates that we could not parse the
shipping address.
|
1.0 |
| cityPostalMatch |
enum |
This field can be either Yes or No.
This indicates whether the customer’s billing city and state match
their postal code.
|
1.0 |
| shipCityPostalMatch |
enum |
This field can be either Yes or No.
This indicates whether the customer’s shipping city and state match
their postal code.
|
1.0 |
|
Account Information Fields
These fields provide information about your MaxMind account.
|
| queriesRemaining |
integer |
This is the number of minFraud queries remaining in your account.
|
1.0 |
| maxmindID |
string (8) |
This is a unique eight character string identifying this minFraud
request. Please use this ID in bug reports or support requests to
MaxMind so that we can easily identify a particular request.
|
1.0 |
| minfraud_version |
string |
This returns the API version that was used for this request. |
1.3 |
| service_level |
enum |
This returns the service level that was used for this request. This
can be either standard or premium.
|
1.3 |
|
Error Reporting
|
| err |
enum |
If there was an error or warning with this request, this field
contains an error code string. The possible error codes are:
- INVALID_LICENSE_KEY
-
MAX_REQUESTS_REACHED – This is returned when your
account is out of queries.
-
LICENSE_REQUIRED – This is returned if you do not
provide a license key at all.
-
PERMISSION_REQUIRED – This is returned if you do
not have permission to use the service. Please
contact our support team
for more information.
The possible warning codes are:
- COUNTRY_NOT_FOUND
- CITY_NOT_FOUND
- CITY_REQUIRED
- INVALID_EMAIL_MD5
-
IP_NOT_FOUND – This warning will be returned if
the IP address is not valid, if it is not public, or if it is not
in our GeoIP database.
- POSTAL_CODE_REQUIRED
- POSTAL_CODE_NOT_FOUND
|
1.0 |
## Testing minFraud Legacy with the MaxMind Sandbox
MaxMind maintains a Sandbox environment so that you can do basic integration
tests with the web services. In order to set up a Sandbox account you must
already have a paid account, and you must be an account administrator.
[Learn how to set up a Sandbox account on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/set-up-a-maxmind-sandbox-account)
Once you have your Sandbox account set up and activated, follow the steps below.
### Select the proper Legacy version for testing
> Please note that if you would like to test the current version of
> the minFraud service, you should follow the
> [instructions for testing the current minFraud service on the Sandbox](/minfraud/sandbox-environment/index.md).
You can control which version of the Legacy minFraud service your Sandbox
account uses.
Once an account administrator has set up your Sandbox environment and granted
you access, you can login to your Sandbox account and click on “minFraud
Version” in the minFraud section of the left-hand navigation menu
[[direct link](https://sandbox.maxmind.com/en/accounts/current/minfraud/legacy-version),
Sandbox account login required].
Select the version of minFraud you would like to test, and click the blue Submit
button. The latest version of minFraud will be selected by default when you
initialize your Sandbox environment.
### Generate a License Key for the Sandbox
In order to test the web services in the Sandbox environment, you will need to
generate a license key from your Sandbox account.
[Learn how to generate a license key on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/generate-a-maxmind-license-key)
The process is the same for your Sandbox account, but you must login to your
Sandbox account
[[direct link](https://sandbox.maxmind.com/en/accounts/current/license-key),
Sandbox account login required] rather than your regular MaxMind account.
### Point your integration to the Sandbox service endpoints
Use the service endpoint for the Sandbox version of the minFraud Legacy service:
`https://sandbox.maxmind.com/minfraud/v1.0/legacy`
If you are using the original URI, you can also test using that URI on the
Sandbox:
`https://sandbox.maxmind.com/app/ccv2r`
Remember to use the license key generated by your Sandbox account to
authenticate your requests.
### Test data for the Sandbox minFraud Legacy service
You may only submit approved test data to the Sandbox version of the minFraud
services. At this time, the only approved test transaction data are the three IP
addresses listed below. You can submit transactions to Sandbox minFraud Legacy
services with any of the following IP addresses as the required `i` (IP address
input). [Learn more about Legacy inputs above.](/minfraud/minfraud-legacy/index.md#input)
You should receive a minFraud response with risk scores and risk data.
The `proxyScore` output will contain a response within the range defined below:
| Test IP Address Input | Test proxyScore Output Range |
| --------------------- | ---------------------------- |
| `128.101.101.101` | 2 - 4 |
| `74.209.24.1` | 0.5 - 1.99 |
| `65.116.3.80` | 0 - 0.49 |
Here is an example request that should return a valid minFraud response without
any warnings or errors, and with a proxyScore between 2 and 4:
- `https://sandbox.maxmind.com/minfraud/v1.0/legacy?i=128.101.101.101&license_key=&country=US`
You should not submit real transaction data to the Sandbox version of the
minFraud Legacy services, but you can submit transactions with dummy data.
The Sandbox environment imposes volume limits on API requests to prevent abuse.
The Sandbox should not be used to test the capacity of the production web
service in high volume situations.
If you are running into the request limit and need help, please
[reach out to our support team for assistance](https://support.maxmind.com/knowledge-base).
### Learn more about the MaxMind Sandbox
You can
[learn more about the MaxMind Sandbox on our Knowledge Base](https://support.maxmind.com/knowledge-base/account-and-purchasing#sandbox-environment).
# Normalizing Email Addresses for minFraud
Source: https://dev.maxmind.com/minfraud/normalizing-email-addresses-for-minfraud/
When providing an email address as an input to the minFraud services, you can
provide it either as plain text or as an MD5 hash.
If you provide the email as an MD5 hash, it’s important that you normalize it
before generating the hash. Otherwise minor, inconsequential differences could
cause minFraud to consider it a different address.
Our [client APIs](/minfraud/api-documentation/index.md#client-apis) do this for you if
you enable sending the MD5 hash. This is the recommended way to do this.
## Normalizing email addresses
If you are not able to use our client APIs, you can normalize an email address
yourself. Below are the steps to take to do this.
1. Trim whitespace from both ends of the address.
1. Lowercase the address.
1. Find the local part of the email (before the `@`) and the domain (after the
`@`).
1. Apply NFC normalization to the email local part.
1. Trim whitespace from the beginning of the domain.
1. If the domain ends with any number of periods, trim them off.
1. Convert international domain names (IDNs) to ASCII. For example, you can do
this in Java using
[java.net.IDN](https://docs.oracle.com/javase/8/docs/api/java/net/IDN.html).
1. If the domain ends with a repetition of `.com` (`.com.com`, `.com.com.com`,
etc.), replace with a single `.com`.
1. If the domain is `gmail.com` with any leading digits, it is replaced with
`gmail.com` (i.e., `123gmail.com` is replaced with `gmail.com`).
1. Check for typos in the TLD and correct them. For a complete list of typos we
correct, consult the
[normalization code in one of our client APIs](/minfraud/normalizing-email-addresses-for-minfraud/index.md#examples) below.
1. Check for typos in the domain name and correct them. For a complete list of
typos we correct, consult the
[normalization code in one of our client APIs](/minfraud/normalizing-email-addresses-for-minfraud/index.md#examples) below.
1. If the domain is `fastmail.com` or any of the
[fastmail domains](https://www.fastmail.com/how-to/email-for-your-domain/),
replace the email local part with the subdomain (i.e.,
`alias@user.fastmail.com` is replaced with `user@fastmail.com`).
1. If the domain has an equivalent, such as `googlemail.com` to `gmail.com`,
replace it with the equivalent. For the list of equivalent domains we use,
consult the [normalization code in one of our client APIs](/minfraud/normalizing-email-addresses-for-minfraud/index.md#examples) below.
1. Remove alias parts from the local part. For addresses at the `yahoo.com`
domain, or other domains affiliated with Yahoo, this is everything after and
including the first `-` character, if present. For addresses with all other
domains, this is everything after and including the first `+` character, if
present.
1. Remove periods from `gmail.com` local parts.
1. Put the local part and the domain back together to form the normalized email
address.
1. Calculate the MD5 hash.
## Examples
You can review the code in our client APIs to see how to normalize an email
address in various languages.
The links below point to specific commits for reference, but we recommend
consulting the latest code in each repository to ensure you're following the
current normalization logic.
- [.NET (C#)](https://github.com/maxmind/minfraud-api-dotnet/blob/bdc196438d4b1f35bf88431f3b0b1a62353950fb/MaxMind.MinFraud/Request/Email.cs#L395)
- [Java](https://github.com/maxmind/minfraud-api-java/blob/98e3ad44651ee71b319cf42a21a57f2ed80925fc/src/main/java/com/maxmind/minfraud/request/Email.java#L414)
- [JavaScript](https://github.com/maxmind/minfraud-api-node/blob/3c6591930377759fcba345ec6b737c65b4952284/src/request/email.ts#L313)
- [PHP](https://github.com/maxmind/minfraud-api-php/blob/1e361918074957bf8013d744351fa9f1ae733227/src/MinFraud/Util.php#L284)
- [Python](https://github.com/maxmind/minfraud-api-python/blob/fcb5b2a372d533d1c398ffc7f8554d730722234f/src/minfraud/request.py#L375)
- [Ruby](https://github.com/maxmind/minfraud-api-ruby/blob/1a8a243060631cc55d203fac267bdb6ac64e8802/lib/minfraud/components/email.rb#L84)
# Proxy Detection Legacy Web Service
Source: https://dev.maxmind.com/minfraud/proxy-detection/
> **⚠️ Warning**
>
> To learn more about the risk associated with a particular
> IP address, use the [minFraud Score service](/minfraud/evaluate-a-transaction/index.md).
> This service provides the IP Risk Score, a replacement for the proxyScore. To
> identify anonymous IP addresses in support of geotargeting and ad serving
> environments, we recommend using the
> [GeoIP Anonymous IP database](https://www.maxmind.com/en/geoip-anonymous-ip-database).
The proxy detection web service provides a score measuring the risk associated
with an IP address. It is called the IP risk score in our current minFraud
services.
[Learn more about the IP risk score on our knowledge base.](https://support.maxmind.com/knowledge-base/articles/minfraud-ip-risk-score)
## Release Notes
Changes to the proxy detection web service are documented in our
[release notes](/minfraud/release-notes/index.md).
## Device Tracking Add-On
You may optionally include the
[Device Tracking Add-On](/minfraud/track-devices/index.md) to help us identify the device
your customer is using to determine whether it has been used in previous
fraudulent transactions. The device information passed to MaxMind via the Device
Tracking Add-On is factored into the proxyScore returned when you query the HTTP
API.
## HTTP-based API
This web service uses the same hostnames as our [minFraud](/minfraud/index.md) web
service. Its URI is `https://minfraud.maxmind.com/app/ipauth_http`
The `minfraud.maxmind.com` hostname automatically picks the data center
geographically closest to you.
## Security
The API is only available via HTTPS. If you attempt to access this service via
HTTP, you will receive a `403 Forbidden` HTTP response.
We require TLS 1.2 or greater for all requests to our servers to keep your data
secure.
## HTTP status codes
In addition to the error code returned in the `err` field of the response body,
this service uses the HTTP status code to indicate certain error conditions.
This lets you act on these conditions from the HTTP status code, for example in
your monitoring or an internal proxy, without parsing the response body.
| HTTP status | Condition |
| ---------------------- | ------------------------------------------------------------------------------------ |
| `200 OK` | The request was processed. |
| `400 Bad Request` | The request was malformed. |
| `401 Unauthorized` | The license key is missing or invalid (`LICENSE_REQUIRED` or `INVALID_LICENSE_KEY`). |
| `402 Payment Required` | Your account is out of queries (`MAX_REQUESTS_REACHED`). |
| `403 Forbidden` | Your account does not have permission to use this service (`PERMISSION_REQUIRED`). |
| `5xx` | A server error occurred. |
Where applicable, the response body returns an `err` value with the relevant
error code.
## Input
The API requires you to pass a set of parameters as an HTTP GET or POST. Results
are returned in a simple text format documented below.
The three parameters that this service takes are the IP address to look up, the
shopID and
[your MaxMind license key](https://www.maxmind.com/en/accounts/current/license-key).
The shopID is your internal ID for the shop, affiliate, or merchant this order
is coming from, and is required for customers who are resellers, payment
providers, gateways and affiliate networks.
The parameters should be passed in a query string or as a form post
(application/x-www-form-urlencoded). The IP address parameter should be named
`i` (lower case "I"), the shopID parameter should be named `shopID` and the
license key should be named `l` (lower case "L").
The IP address should be passed as a string like "44.55.66.77".
## Output
This service returns data as a set of comma-separated fields. The individual
fields are not escaped or quoted, but they will never contain a comma.
All strings are returned as ASCII.
| Name |
Type (length) |
Description |
| proxyScore |
decimal |
A score from 0.00-4.00 indicating the likelihood that the user's IP
address is an anonymous proxy, open proxy, or VPN.
| proxyScore |
Likelihood of fraud |
| 0.5 |
15% |
| 1.0 |
30% |
| 2.0 |
60% |
| 3.0+ |
90% |
A proxyScore of 0.00 will be returned for a corporate proxy or private
IP and an empty string will be returned for an invalid IP.
|
| err |
enum |
If there was an error or warning with this request, this field
contains an error code string.
The possible error codes are:
-
PERMISSION_REQUIRED – You do not have permission to
use the service. Please
contact our support team
for more information.
-
LICENSE_REQUIRED – You must provide a license key.
-
INVALID_LICENSE_KEY – The license key provided is
invalid.
-
MAX_REQUESTS_REACHED – This error will be returned if
your account is out of queries.
|
## Client Code Examples
Below are some sample clients for this web service.
```perl
#!/usr/bin/env perl
use strict;
use warnings;
use Encode qw( decode );
use Getopt::Long;
use LWP::UserAgent;
use URI;
use URI::QueryParam;
my $license_key = 'YOUR_LICENSE_KEY';
my $ip_address = '24.24.24.24';
GetOptions(
'license:s' => \$license_key,
'ip:s' => \$ip_address,
);
my $uri = URI->new('https://minfraud.maxmind.com/app/ipauth_http');
$uri->query_param( l => $license_key );
$uri->query_param( i => $ip_address );
my $ua = LWP::UserAgent->new( timeout => 5 );
my $response = $ua->get($uri);
die 'Request failed with status ' . $response->code()
unless $response->is_success();
my %proxy = map { split /=/, $_ } split /;/, $response->content();
if ( defined $proxy{err} && length $proxy{err} ) {
die "MaxMind returned an error code for the request: $proxy{err}\n";
}
else {
print "\nMaxMind Proxy data for $ip_address\n\n";
for my $field ( sort keys %proxy ) {
print sprintf( " %-20s %s\n", $field, $proxy{$field} );
}
print "\n";
}
```
```python
#!/usr/bin/env python3
import argparse
import requests
import sys
parser = argparse.ArgumentParser(description='MaxMind Proxy Detection web service client')
parser.add_argument('--license', default='YOUR_LICENSE_KEY')
parser.add_argument('--ip', default='24.24.24.24')
args = parser.parse_args()
payload = {'l': args.license, 'i': args.ip};
response = requests.get('https://minfraud.maxmind.com/app/ipauth_http', params=payload)
if response.status_code != requests.codes.ok:
sys.stderr.write("Request failed with status %s\n" % response.status_code)
sys.exit(1)
proxy = dict( f.split('=') for f in response.text.split(';') )
if 'err' in proxy and len(proxy['err']):
sys.stderr.write("MaxMind returned an error code for the request: %s\n" % proxy['err'])
sys.exit(1)
else:
print("\nMaxMind Proxy data for %s\n" % args.ip)
for (key, val) in proxy.items():
print(" %-20s %s" % (key, val))
print("")
```
```php
#!/usr/bin/php
**ℹ️ Info**
>
> [Sign up to be notified](https://comms.maxmind.com/minfraud-rss-release-notes)
> whenever a new minFraud release note is posted.
## Pages in this section
- 2026-10-26: [New email verification inputs](https://dev.maxmind.com/minfraud/release-notes/2026-10-26-new-email-verification-inputs/index.md)
- 2026-10-16: [Dispositions API now pages with a cursor](https://dev.maxmind.com/minfraud/release-notes/2026-10-16-dispositions-api-now-pages-with-a-cursor/index.md)
- 2026-10-15: [New phone verification inputs](https://dev.maxmind.com/minfraud/release-notes/2026-10-15-new-phone-verification-inputs/index.md)
- 2026-10-13: [Elevated response times for web service requests experienced by some customers resolved](https://dev.maxmind.com/minfraud/release-notes/2026-10-13-elevated-response-times-for-web-service-requests-experienced-by-some-customers-resolved/index.md)
- 2026-09-11: [Elevated response times for web service requests experienced by some customers—resolved](https://dev.maxmind.com/minfraud/release-notes/2026-09-11-elevated-response-times-for-web-service-requests-experienced-by-some-customers-resolved/index.md)
- 2026-07-17: [New residential sub-object added to the anonymizer object](https://dev.maxmind.com/minfraud/release-notes/2026-07-17-new-residential-sub-object-added-to-the-anonymizer-object/index.md)
- 2026-06-30: [minFraud Legacy and Proxy Detection web services now return HTTP status codes for errors](https://dev.maxmind.com/minfraud/release-notes/2026-06-30-minfraud-legacy-and-proxy-detection-web-services-now-return-http-status-codes-for-errors/index.md)
- 2026-05-13: [Improved readability of the risk reasons module within Transactions Details screen](https://dev.maxmind.com/minfraud/release-notes/2026-05-13-improved-readability-of-the-risk-reasons-module-within-transactions-details-screen/index.md)
- 2026-05-13: [Subset of risk score reasons can now be used in custom rules](https://dev.maxmind.com/minfraud/release-notes/2026-05-13-subset-of-risk-score-reasons-can-now-be-used-in-custom-rules/index.md)
- 2026-05-13: [Transaction classification can now be untagged using the `clear` report tag](https://dev.maxmind.com/minfraud/release-notes/2026-05-13-transaction-classification-can-now-be-untagged-using-the-clear-report-tag/index.md)
- 2026-05-13: [Native mobile SDKs now available for device tracking](https://dev.maxmind.com/minfraud/release-notes/2026-05-13-native-mobile-sdks-now-available-for-device-tracking/index.md)
- 2026-05-12: [Email addresses and phone numbers to be hashed before storage](https://dev.maxmind.com/minfraud/release-notes/2026-05-12-email-addresses-and-phone-numbers-to-be-hashed-before-storage/index.md)
- 2026-03-23: [Updates to geolocation confidence factors](https://dev.maxmind.com/minfraud/release-notes/2026-03-23-updates-to-geolocation-confidence-factors/index.md)
- 2026-03-04: [Updates to user count data](https://dev.maxmind.com/minfraud/release-notes/2026-03-04-updates-to-user-count-data/index.md)
- 2026-02-17: [Number of minFraud custom inputs increased to 100](https://dev.maxmind.com/minfraud/release-notes/2026-02-17-number-of-minfraud-custom-inputs-increased-to-100/index.md)
- 2026-01-28: [Updates to autonomous_system_organization, ISP, and organization data](https://dev.maxmind.com/minfraud/release-notes/2026-01-28-updates-to-autonomous-system-organization-isp-and-organization-data/index.md)
- 2025-12-18: [New email domain outputs in the Insights and Factors web services](https://dev.maxmind.com/minfraud/release-notes/2025-12-18-new-email-domain-outputs-in-the-insights-and-factors-web-services/index.md)
- 2025-12-18: [Expanded event type inputs, and new payment method and event party inputs](https://dev.maxmind.com/minfraud/release-notes/2025-12-18-expanded-event-type-inputs-and-new-payment-method-and-event-party-inputs/index.md)
- 2025-12-17: [Subdivision, city, and postal fields blanked in additional countries](https://dev.maxmind.com/minfraud/release-notes/2025-12-17-subdivision-city-and-postal-fields-blanked-in-additional-countries/index.md)
- 2025-11-28: [Subdivision, city, and postal fields blanked in additional countries](https://dev.maxmind.com/minfraud/release-notes/2025-11-28-subdivision-city-and-postal-fields-blanked-in-additional-countries/index.md)
- 2025-11-20: [IP risk snapshot output added to traits object in the Insights web services](https://dev.maxmind.com/minfraud/release-notes/2025-11-20-ip-risk-snapshot-output-added-to-traits-object-in-the-insights-web-services/index.md)
- 2025-11-19: [New anonymizer data added to web services](https://dev.maxmind.com/minfraud/release-notes/2025-11-19-new-anonymizer-data-added-to-web-services/index.md)
- 2025-11-18: [Subdivision, city, and postal fields blanked in selected cities and countries](https://dev.maxmind.com/minfraud/release-notes/2025-11-18-subdivision-city-and-postal-fields-blanked-in-selected-cities-and-countries/index.md)
- 2025-11-06: [Subdivision, city, and postal fields blanked in selected large cities](https://dev.maxmind.com/minfraud/release-notes/2025-11-06-subdivision-city-and-postal-fields-blanked-in-selected-large-cities/index.md)
- 2025-11-06: [Subdivision, city, and postal fields blanked in Tokyo metro area in some cases](https://dev.maxmind.com/minfraud/release-notes/2025-11-06-subdivision-city-and-postal-fields-blanked-in-tokyo-metro-area-in-some-cases/index.md)
- 2025-06-16: [EMAIL_DOMAIN_CREATION_DATE risk score reason added](https://dev.maxmind.com/minfraud/release-notes/2025-06-16-email-domain-creation-date-risk-score-reason-added/index.md)
- 2025-05-05: [Resolved - Postal code validation bug](https://dev.maxmind.com/minfraud/release-notes/2025-05-05-resolved-postal-code-validation-bug/index.md)
- 2025-05-01: [Postal code validation bug](https://dev.maxmind.com/minfraud/release-notes/2025-05-01-postal-code-validation-bug/index.md)
- 2025-02-24: [Risk score reasons out of beta](https://dev.maxmind.com/minfraud/release-notes/2025-02-24-risk-score-reasons-out-of-beta/index.md)
- 2025-02-10: [No longer returning A1 country code in minFraud legacy web services](https://dev.maxmind.com/minfraud/release-notes/2025-02-10-no-longer-returning-a1-country-code-in-minfraud-legacy-web-services/index.md)
- 2024-12-03: [Several Spectrum Business networks reclassified](https://dev.maxmind.com/minfraud/release-notes/2024-12-03-several-spectrum-business-networks-reclassified/index.md)
- 2024-11-12: [Updates to Risk Score Reasons (beta)](https://dev.maxmind.com/minfraud/release-notes/2024-11-12-updates-to-risk-score-reasons-beta/index.md)
- 2024-10-22: [Deprecation of risk factor scores/subscores](https://dev.maxmind.com/minfraud/release-notes/2024-10-22-deprecation-of-risk-factor-scores-subscores/index.md)
- 2024-10-09: [Upcoming improvements to user count data](https://dev.maxmind.com/minfraud/release-notes/2024-10-09-upcoming-improvements-to-user-count-data/index.md)
- 2024-09-12: [Increase in slightly elevated IP risk and proxy scores and remediation](https://dev.maxmind.com/minfraud/release-notes/2024-09-12-increase-in-slightly-elevated-ip-risk-and-proxy-scores-and-remediation/index.md)
- 2024-08-27: [Introducing Risk Score Reasons beta for minFraud Factors customers](https://dev.maxmind.com/minfraud/release-notes/2024-08-27-introducing-risk-score-reasons-beta-for-minfraud-factors-customers/index.md)
- 2024-08-15: [MaxMind minFraud alert emails now include instant feedback links](https://dev.maxmind.com/minfraud/release-notes/2024-08-15-maxmind-minfraud-alert-emails-now-include-instant-feedback-links/index.md)
- 2024-08-08: [Additional filtering options now available for minFraud transactions](https://dev.maxmind.com/minfraud/release-notes/2024-08-08-additional-filtering-options-now-available-for-minfraud-transactions/index.md)
- 2024-07-09: [New phone outputs released for minFraud® Insights and minFraud Factors](https://dev.maxmind.com/minfraud/release-notes/2024-07-09-new-phone-outputs-released-for-minfraud-insights-and-minfraud-factors/index.md)
- 2024-04-08: [Email first seen can be used as a parameter for custom rules](https://dev.maxmind.com/minfraud/release-notes/2024-04-08-email-first-seen-can-be-used-as-a-parameter-for-custom-rules/index.md)
- 2024-04-08: [Upcoming changes to our TLS certificates may impact customers with unusual server configuration](https://dev.maxmind.com/minfraud/release-notes/2024-04-08-upcoming-changes-to-our-tls-certificates-may-impact-customers-with-unusual-server-configuration/index.md)
- 2024-03-13: [API policies are now permanently enforced](https://dev.maxmind.com/minfraud/release-notes/2024-03-13-api-policies-are-now-permanently-enforced/index.md)
- 2024-01-25: [API policies - temporary enforcement on February 7, 2024](https://dev.maxmind.com/minfraud/release-notes/2024-01-25-api-policies-temporary-enforcement-on-february-7-2024/index.md)
- 2024-01-22: [minFraud no longer accepts event times more than one year in the past](https://dev.maxmind.com/minfraud/release-notes/2024-01-22-minfraud-no-longer-accepts-event-times-more-than-one-year-in-the-past/index.md)
- 2023-12-11: [Session age input can be used as a parameter for custom rules](https://dev.maxmind.com/minfraud/release-notes/2023-12-11-session-age-input-can-be-used-as-a-parameter-for-custom-rules/index.md)
- 2023-12-04: [ISP output can be used as a parameter for custom rules](https://dev.maxmind.com/minfraud/release-notes/2023-12-04-isp-output-can-be-used-as-a-parameter-for-custom-rules/index.md)
- 2023-11-29: [Updated static IP scoring for IPv6 addresses](https://dev.maxmind.com/minfraud/release-notes/2023-11-29-updated-static-ip-scoring-for-ipv6-addresses/index.md)
- 2023-11-16: [Free email output can be used as a parameter for custom rules](https://dev.maxmind.com/minfraud/release-notes/2023-11-16-free-email-output-can-be-used-as-a-parameter-for-custom-rules/index.md)
- 2023-11-15: [Create stored lists of email addresses to use in minFraud custom rules](https://dev.maxmind.com/minfraud/release-notes/2023-11-15-create-stored-lists-of-email-addresses-to-use-in-minfraud-custom-rules/index.md)
- 2023-09-29: [Improvements to IP risk score](https://dev.maxmind.com/minfraud/release-notes/2023-09-29-improvements-to-ip-risk-score/index.md)
- 2023-09-26: [Group and join up to 20 conditions in minFraud custom rules](https://dev.maxmind.com/minfraud/release-notes/2023-09-26-group-and-join-up-to-20-conditions-in-minfraud-custom-rules/index.md)
- 2023-08-30: [More Virtual Payment Cards Flagged in minFraud](https://dev.maxmind.com/minfraud/release-notes/2023-08-30-more-virtual-payment-cards-flagged-in-minfraud/index.md)
- 2023-08-17: [API policies - temporary enforcement on October 17, 2023](https://dev.maxmind.com/minfraud/release-notes/2023-08-17-api-policies-temporary-enforcement-on-october-17-2023/index.md)
- 2023-07-20: [Expanded filtering options in minFraud Interactive](https://dev.maxmind.com/minfraud/release-notes/2023-07-20-expanded-filtering-options-in-minfraud-interactive/index.md)
- 2023-07-17: [Data retention increased for minFraud Interactive](https://dev.maxmind.com/minfraud/release-notes/2023-07-17-data-retention-increased-for-minfraud-interactive/index.md)
- 2023-06-12: [Correction regarding London boroughs in our geolocation data](https://dev.maxmind.com/minfraud/release-notes/2023-06-12-correction-regarding-london-boroughs-in-our-geolocation-data/index.md)
- 2023-06-06: [More networks mapped to London boroughs](https://dev.maxmind.com/minfraud/release-notes/2023-06-06-more-networks-mapped-to-london-boroughs/index.md)
- 2023-05-30: [minFraud Transactions searchable by email domain](https://dev.maxmind.com/minfraud/release-notes/2023-05-30-minfraud-transactions-searchable-by-email-domain/index.md)
- 2023-05-15: [minFraud Alerts will be restored](https://dev.maxmind.com/minfraud/release-notes/2023-05-15-minfraud-alerts-will-be-restored/index.md)
- 2023-03-29: [Improvements to minFraud Interactive](https://dev.maxmind.com/minfraud/release-notes/2023-03-29-improvements-to-minfraud-interactive/index.md)
- 2023-03-21: [Velocity Checking on User ID](https://dev.maxmind.com/minfraud/release-notes/2023-03-21-velocity-checking-on-user-id/index.md)
- 2023-03-16: [New License Key Format](https://dev.maxmind.com/minfraud/release-notes/2023-03-16-new-license-key-format/index.md)
- 2022-10-11: [MaxMind Sandbox has Launched](https://dev.maxmind.com/minfraud/release-notes/2022-10-11-maxmind-sandbox-has-launched/index.md)
- 2022-09-26: [Changes to Registered Country data](https://dev.maxmind.com/minfraud/release-notes/2022-09-26-changes-to-registered-country-data/index.md)
- 2022-09-14: [Change to Time Zone Name for Ukraine](https://dev.maxmind.com/minfraud/release-notes/2022-09-14-change-to-time-zone-name-for-ukraine/index.md)
- 2022-09-12: [Geolocation Bug Fix Complete](https://dev.maxmind.com/minfraud/release-notes/2022-09-12-geolocation-bug-fix-complete/index.md)
- 2022-09-07: [Geolocation Coordinate Bug Fix](https://dev.maxmind.com/minfraud/release-notes/2022-09-07-geolocation-coordinate-bug-fix/index.md)
- 2022-05-31: [Data changes to minFraud Legacy web services](https://dev.maxmind.com/minfraud/release-notes/2022-05-31-data-changes-to-minfraud-legacy-web-services/index.md)
- 2022-03-01: [Expanded filtering options in the account portal for minFraud transactions](https://dev.maxmind.com/minfraud/release-notes/2022-03-01-expanded-filtering-options-in-the-account-portal-for-minfraud-transactions/index.md)
- 2022-01-31: [minFraud services now handle 8 digit IINs](https://dev.maxmind.com/minfraud/release-notes/2022-01-31-minfraud-services-now-handle-8-digit-iins/index.md)
- 2022-01-14: [minFraud alerts webhook now supports signed requests](https://dev.maxmind.com/minfraud/release-notes/2022-01-14-minfraud-alerts-webhook-now-supports-signed-requests/index.md)
- 2022-01-10: [minFraud subscores are now minFraud risk factor scores](https://dev.maxmind.com/minfraud/release-notes/2022-01-10-minfraud-subscores-are-now-minfraud-risk-factor-scores/index.md)
- 2021-09-23: [Update to minimum accuracy_radius value](https://dev.maxmind.com/minfraud/release-notes/2021-09-23-update-to-minimum-accuracy-radius-value/index.md)
- 2021-09-08: [Data Updates for Apple iCloud Private Relay](https://dev.maxmind.com/minfraud/release-notes/2021-09-08-data-updates-for-apple-icloud-private-relay/index.md)
- 2021-09-03: [New minFraud features: passing 3-D Secure outcome, custom rule label in minFraud response, “test” disposition for custom rules](https://dev.maxmind.com/minfraud/release-notes/2021-09-03-new-minfraud-features-passing-3-d-secure-outcome-custom-rule-label-in-minfraud-response-test-disposition-for-custom-rules/index.md)
- 2021-05-19: [Updated warning codes in minFraud Score, Insights, and Factors](https://dev.maxmind.com/minfraud/release-notes/2021-05-19-updated-warning-codes-in-minfraud-score-insights-and-factors/index.md)
- 2021-05-13: [Updates to minFraud Alerts](https://dev.maxmind.com/minfraud/release-notes/2021-05-13-updates-to-minfraud-alerts/index.md)
- 2021-02-22: [Normalize Emails Before Hashing for Improved minFraud Scoring](https://dev.maxmind.com/minfraud/release-notes/2021-02-22-normalize-emails-before-hashing-for-improved-minfraud-scoring/index.md)
- 2021-02-03: [New output IP risk reasons](https://dev.maxmind.com/minfraud/release-notes/2021-02-03-new-output-ip-risk-reasons/index.md)
- 2021-01-22: [Change to Vodafone Germany ISP name](https://dev.maxmind.com/minfraud/release-notes/2021-01-22-change-to-vodafone-germany-isp-name/index.md)
- 2020-12-30: [United Kingdom will no longer be flagged is_in_european_union](https://dev.maxmind.com/minfraud/release-notes/2020-12-30-united-kingdom-will-no-longer-be-flagged-is-in-european-union/index.md)
- 2020-10-20: [New Output is_residential_proxy Released for GeoIP Insights Web Service, minFraud Insights, and minFraud Factors](https://dev.maxmind.com/minfraud/release-notes/2020-10-20-new-output-is-residential-proxy-released-for-geoip-insights-web-service-minfraud-insights-and-minfraud-factors/index.md)
- 2020-10-12: [IP Address Optional in minFraud Score, Insights, and Factors Services](https://dev.maxmind.com/minfraud/release-notes/2020-10-12-ip-address-optional-in-minfraud-score-insights-and-factors-services/index.md)
- 2020-10-06: [IP Address Optional in minFraud Score, Insights, and Factors Services](https://dev.maxmind.com/minfraud/release-notes/2020-10-06-ip-address-optional-in-minfraud-score-insights-and-factors-services/index.md)
- 2020-09-14: [Email Now Available as Custom Rules Parameter](https://dev.maxmind.com/minfraud/release-notes/2020-09-14-email-now-available-as-custom-rules-parameter/index.md)
- 2020-09-10: [Billing and Product/Service Permission Types for Standard Users](https://dev.maxmind.com/minfraud/release-notes/2020-09-10-billing-and-product-service-permission-types-for-standard-users/index.md)
- 2020-08-10: [Update to minFraud service server locations](https://dev.maxmind.com/minfraud/release-notes/2020-08-10-update-to-minfraud-service-server-locations/index.md)
- 2020-08-06: [New minFraud Factors risk factors](https://dev.maxmind.com/minfraud/release-notes/2020-08-06-new-minfraud-factors-risk-factors/index.md)
- 2020-06-24: [Report transaction support in minFraud client APIs](https://dev.maxmind.com/minfraud/release-notes/2020-06-24-report-transaction-support-in-minfraud-client-apis/index.md)
- 2020-06-22: [FIDO2 Support for Two-Factor Authentication](https://dev.maxmind.com/minfraud/release-notes/2020-06-22-fido2-support-for-two-factor-authentication/index.md)
- 2020-06-15: [Data Changes to GeoIP Legacy and minFraud Legacy Web Services](https://dev.maxmind.com/minfraud/release-notes/2020-06-15-data-changes-to-geoip-legacy-and-minfraud-legacy-web-services/index.md)
- 2020-05-14: [Anonymous IP flags as parameters for custom rules](https://dev.maxmind.com/minfraud/release-notes/2020-05-14-anonymous-ip-flags-as-parameters-for-custom-rules/index.md)
- 2020-05-08: [Retirement of legacy minFraud SOAP API](https://dev.maxmind.com/minfraud/release-notes/2020-05-08-retirement-of-legacy-minfraud-soap-api/index.md)
- 2020-04-27: [Billing fields and is disposable email as input parameters for custom rules](https://dev.maxmind.com/minfraud/release-notes/2020-04-27-billing-fields-and-is-disposable-email-as-input-parameters-for-custom-rules/index.md)
- 2020-04-06: [New /credit_card/is_business output](https://dev.maxmind.com/minfraud/release-notes/2020-04-06-new-credit-card-is-business-output/index.md)
- 2020-03-24: [New /email/domain/first_seen output](https://dev.maxmind.com/minfraud/release-notes/2020-03-24-new-email-domain-first-seen-output/index.md)
- 2020-03-02: [minFraud Query Form](https://dev.maxmind.com/minfraud/release-notes/2020-03-02-minfraud-query-form/index.md)
- 2020-02-19: [New /email/is_disposable output](https://dev.maxmind.com/minfraud/release-notes/2020-02-19-new-email-is-disposable-output/index.md)
- 2020-02-04: [More outputs on transaction details screen](https://dev.maxmind.com/minfraud/release-notes/2020-02-04-more-outputs-on-transaction-details-screen/index.md)
- 2020-01-31: [Retirement of legacy IIN (BIN) API](https://dev.maxmind.com/minfraud/release-notes/2020-01-31-retirement-of-legacy-iin-bin-api/index.md)
- 2020-01-29: [Tag transactions from transaction details screen](https://dev.maxmind.com/minfraud/release-notes/2020-01-29-tag-transactions-from-transaction-details-screen/index.md)
- 2019-12-23: [The USER_ID_REQUIRED error code is now ACCOUNT_ID_REQUIRED](https://dev.maxmind.com/minfraud/release-notes/2019-12-23-the-user-id-required-error-code-is-now-account-id-required/index.md)
- 2019-12-17: [Query usage report license key filter](https://dev.maxmind.com/minfraud/release-notes/2019-12-17-query-usage-report-license-key-filter/index.md)
- 2019-12-11: [Toggle minFraud Transactions Access](https://dev.maxmind.com/minfraud/release-notes/2019-12-11-toggle-minfraud-transactions-access/index.md)
- 2019-12-11: [Changes to Japan Postal Codes](https://dev.maxmind.com/minfraud/release-notes/2019-12-11-changes-to-japan-postal-codes/index.md)
- 2019-11-08: [Changes to Portugal Postal Codes](https://dev.maxmind.com/minfraud/release-notes/2019-11-08-changes-to-portugal-postal-codes/index.md)
- 2019-10-16: [Retirement of TLS 1.0/1.1 and unencrypted http minFraud requests](https://dev.maxmind.com/minfraud/release-notes/2019-10-16-retirement-of-tls-1-0-1-1-and-unencrypted-http-minfraud-requests/index.md)
- 2019-10-15: [New static_ip_score output in web services](https://dev.maxmind.com/minfraud/release-notes/2019-10-15-new-static-ip-score-output-in-web-services/index.md)
- 2019-10-14: [Final reminder of security-related retirements](https://dev.maxmind.com/minfraud/release-notes/2019-10-14-final-reminder-of-security-related-retirements/index.md)
- 2019-10-03: [Improved cellular IP detection](https://dev.maxmind.com/minfraud/release-notes/2019-10-03-improved-cellular-ip-detection/index.md)
- 2019-10-02: [Account activity log](https://dev.maxmind.com/minfraud/release-notes/2019-10-02-account-activity-log/index.md)
- 2019-09-30: [High risk IP country deprecation](https://dev.maxmind.com/minfraud/release-notes/2019-09-30-high-risk-ip-country-deprecation/index.md)
- 2019-09-19: [New network and user_count outputs in web services](https://dev.maxmind.com/minfraud/release-notes/2019-09-19-new-network-and-user-count-outputs-in-web-services/index.md)
- 2019-09-16: [Planned warning interruption (September 2019)](https://dev.maxmind.com/minfraud/release-notes/2019-09-16-planned-warning-interruption-september-2019/index.md)
- 2019-08-29: [IP and email tenure deprecation](https://dev.maxmind.com/minfraud/release-notes/2019-08-29-ip-and-email-tenure-deprecation/index.md)
- 2019-08-21: [Improved business IP detection](https://dev.maxmind.com/minfraud/release-notes/2019-08-21-improved-business-ip-detection/index.md)
- 2019-08-20: [Planned warning interruption (August 2019)](https://dev.maxmind.com/minfraud/release-notes/2019-08-20-planned-warning-interruption-august-2019/index.md)
- 2019-08-05: [Retirement of legacy IIN (BIN) API service](https://dev.maxmind.com/minfraud/release-notes/2019-08-05-retirement-of-legacy-iin-bin-api-service/index.md)
- 2019-07-24: [Planned warning interruption](https://dev.maxmind.com/minfraud/release-notes/2019-07-24-planned-warning-interruption/index.md)
- 2019-07-22: [Disable IP Risk](https://dev.maxmind.com/minfraud/release-notes/2019-07-22-disable-ip-risk/index.md)
- 2019-06-14: [Initial release of minFraud-node](https://dev.maxmind.com/minfraud/release-notes/2019-06-14-initial-release-of-minfraud-node/index.md)
- 2019-04-18: [Security-related retirements 2019](https://dev.maxmind.com/minfraud/release-notes/2019-04-18-security-related-retirements-2019/index.md)
- 2019-04-08: [2FA release](https://dev.maxmind.com/minfraud/release-notes/2019-04-08-2fa-release/index.md)
- 2018-09-21: [Changes to US coordinate data](https://dev.maxmind.com/minfraud/release-notes/2018-09-21-changes-to-us-coordinate-data/index.md)
- 2018-07-17: [New input parameters for use with custom rules](https://dev.maxmind.com/minfraud/release-notes/2018-07-17-new-input-parameters-for-use-with-custom-rules/index.md)
- 2018-05-25: [New European Union locations added to minFraud Insights and Factors](https://dev.maxmind.com/minfraud/release-notes/2018-05-25-new-european-union-locations-added-to-minfraud-insights-and-factors/index.md)
- 2018-05-18: [Device Tracking Add-On now always uses HTTPS](https://dev.maxmind.com/minfraud/release-notes/2018-05-18-device-tracking-add-on-now-always-uses-https/index.md)
- 2018-04-10: [Credit card is_virtual and device local_time outputs, and payout_change event type now available!](https://dev.maxmind.com/minfraud/release-notes/2018-04-10-credit-card-is-virtual-and-device-local-time-outputs-and-payout-change-event-type-now-available/index.md)
- 2018-02-13: [EU Country outputs added to minFraud Insights and minFraud Factors services](https://dev.maxmind.com/minfraud/release-notes/2018-02-13-eu-country-outputs-added-to-minfraud-insights-and-minfraud-factors-services/index.md)
- 2017-11-24: [Anonymizer types added to minFraud Insights and Factors](https://dev.maxmind.com/minfraud/release-notes/2017-11-24-anonymizer-types-added-to-minfraud-insights-and-factors/index.md)
- 2017-07-24: [Dispositions API released](https://dev.maxmind.com/minfraud/release-notes/2017-07-24-dispositions-api-released/index.md)
- 2017-07-24: [Mapping more mobile networks to regional level](https://dev.maxmind.com/minfraud/release-notes/2017-07-24-mapping-more-mobile-networks-to-regional-level/index.md)
- 2017-07-13: [Custom Inputs added to minFraud Score, Insights, and Factors](https://dev.maxmind.com/minfraud/release-notes/2017-07-13-custom-inputs-added-to-minfraud-score-insights-and-factors/index.md)
- 2017-07-13: [New minFraud Input and Output parameters](https://dev.maxmind.com/minfraud/release-notes/2017-07-13-new-minfraud-input-and-output-parameters/index.md)
- 2017-06-23: [Adding Multiple License Keys Support](https://dev.maxmind.com/minfraud/release-notes/2017-06-23-adding-multiple-license-keys-support/index.md)
- 2017-03-17: [minFraud Transaction History page is now minFraud Transactions Screen](https://dev.maxmind.com/minfraud/release-notes/2017-03-17-minfraud-transaction-history-page-is-now-minfraud-transactions-screen/index.md)
- 2016-12-05: [minFraud's is_postal_in_city available for non-US locations](https://dev.maxmind.com/minfraud/release-notes/2016-12-05-minfraud-s-is-postal-in-city-available-for-non-us-locations/index.md)
- 2016-12-01: [Disposition Outputs for minFraud Score, Insights, and Factors](https://dev.maxmind.com/minfraud/release-notes/2016-12-01-disposition-outputs-for-minfraud-score-insights-and-factors/index.md)
- 2016-11-17: [New /credit_card/token Input](https://dev.maxmind.com/minfraud/release-notes/2016-11-17-new-credit-card-token-input/index.md)
- 2016-10-10: [New event types for minFraud requests](https://dev.maxmind.com/minfraud/release-notes/2016-10-10-new-event-types-for-minfraud-requests/index.md)
- 2016-09-06: [More proxy scores](https://dev.maxmind.com/minfraud/release-notes/2016-09-06-more-proxy-scores/index.md)
- 2016-06-09: [New Device Field](https://dev.maxmind.com/minfraud/release-notes/2016-06-09-new-device-field/index.md)
- 2016-06-06: [Deprecated Fields and New Fields](https://dev.maxmind.com/minfraud/release-notes/2016-06-06-deprecated-fields-and-new-fields/index.md)
- 2016-02-18: [Order Amount Now Used in Risk Score](https://dev.maxmind.com/minfraud/release-notes/2016-02-18-order-amount-now-used-in-risk-score/index.md)
- 2016-01-29: [New minFraud Insights Outputs](https://dev.maxmind.com/minfraud/release-notes/2016-01-29-new-minfraud-insights-outputs/index.md)
- 2015-11-30: [Expanded coverage of prepaid cards](https://dev.maxmind.com/minfraud/release-notes/2015-11-30-expanded-coverage-of-prepaid-cards/index.md)
- 2015-06-29: [New beta versions of minFraud Score and minFraud Insights](https://dev.maxmind.com/minfraud/release-notes/2015-06-29-new-beta-versions-of-minfraud-score-and-minfraud-insights/index.md)
- 2015-03-27: [Discontinuing /app/ws_ipaddr](https://dev.maxmind.com/minfraud/release-notes/2015-03-27-discontinuing-app-ws-ipaddr/index.md)
- 2014-08-04: [WSDL and Port Change Required for Some minFraud SOAP Users](https://dev.maxmind.com/minfraud/release-notes/2014-08-04-wsdl-and-port-change-required-for-some-minfraud-soap-users/index.md)
- 2013-09-17: [Adding IPv6 access for web endpoints](https://dev.maxmind.com/minfraud/release-notes/2013-09-17-adding-ipv6-access-for-web-endpoints/index.md)
- 2013-07-03: [Upcoming IP address changes for MaxMind services](https://dev.maxmind.com/minfraud/release-notes/2013-07-03-upcoming-ip-address-changes-for-maxmind-services/index.md)
# Report a transaction
Source: https://dev.maxmind.com/minfraud/report-a-transaction/
Reporting transactions as chargebacks, suspected fraud, spam/abuse, and/or false
positive (not fraud) to MaxMind helps us detect about 10-50% more fraud and
reduce false positives for you.
You can report a transaction manually through the account portal’s
[web form](https://www.maxmind.com/en/accounts/current/minfraud/report-transactions)
or your
[minFraud Transactions page](https://www.maxmind.com/en/accounts/current/minfraud-interactive/transactions).
This guide will show you how to programmatically report a transaction using our
official client libraries.
## Implementation
MaxMind offers and highly recommends using
[official client libraries](/minfraud/evaluate-a-transaction/index.md#links-to-maxmind-client-apis)
to access the Report Transaction API. If you cannot or do not wish to use our
client libraries, please review our
[minFraud Report Transaction API Documentation](/minfraud/report-a-transaction/index.md#api-documentation) for details
on our JSON API.
### 1. Install the minFraud client library
We have a collection of officially supported libraries for you to interact with
the minFraud API:
```csharp
// Install via NuGet
Install-Package MaxMind.MinFraud
```
```java
// Install via Maven, recommended
com.maxmind.minfraud
minfraud
4.4.0
// Or install via Gradle
repositories {
mavenCentral()
}
dependencies {
implementation 'com.maxmind.minfraud:minfraud:4.4.0'
}
```
```javascript
// Install via npm
npm install @maxmind/minfraud-api-node
// Or install via yarn
yarn add @maxmind/minfraud-api-node
```
```php
# Install via Composer
composer require maxmind/minfraud:~3.0
```
```python
# Install via pip
pip install minfraud
```
```ruby
# Install as a gem
gem install minfraud
# Or add this to your Gemfile
gem 'minfraud'
```
### 2. Create and submit a transaction report object
A transaction report only needs two fields, a transaction identifier, which can
be the `ip_address`, the `maxmind_id`, the `minfraud_id`, or the
`transaction_id`, and a `tag`. A `tag` can be one of the following values:
| Tag | Description |
| --------------- | --------------------------------------------------------------------------------------------------------------------- |
| Chargeback | Used to associate a chargeback with a transaction |
| Clear | Used to clear a previous transaction report tag if new information indicates the initial classification was incorrect |
| Not fraud | Used to report a transaction that was later identified as a false positive |
| Spam or Abuse | Used to report a transaction that was linked to spam or abuse |
| Suspected fraud | Used to report a high risk transaction where fraud has not yet been confirmed |
We highly encourage you to include the MaxMind ID or minFraud ID that identifies
the minFraud Standard/Premium request or minFraud Score/Insights/Factors request
respectively. Alternatively, you can send us the transaction ID you originally
passed to the minFraud service.
The transaction report object may optionally contain a chargeback code and notes
about the transaction you would like to share with MaxMind. MaxMind manually
reviews many reported transactions, so any additional details you provide to
help us understand context are extremely helpful.
```csharp
int accountId = 10;
string licenseKey = "LICENSEKEY";
var client = new WebServiceClient(accountId, licenseKey);
// A valid Tag and at least one of the following are required parameters:
// IPAddress, MaxMindId, MinFraudId, TransactionId.
var report = new TransactionReport
{
Tag = TransactionReportTag.Chargeback,
// The following key/values are not mandatory but are encouraged
IPAddress = IPAddress.Parse("1.1.1.1"),
MaxMindId = "ABCD1234",
MinFraudId = new Guid("01c25cb0-f067-4e02-8ed0-a094c580f5e4"),
TransactionId = "txn123",
ChargebackCode = "BL",
Notes = "Suspicious account behavior"
};
await client.ReportAsync(report);
```
```java
int accountId = 10;
String licenseKey = "LICENSEKEY";
WebServiceClient client = new WebServiceClient.Builder(accountId, licenseKey).build();
// A valid tag and at least one of the following are required parameters:
// ipAddress, maxmindId, minfraudId, transactionId.
TransactionReport transaction = new TransactionReport.Builder(Tag.CHARGEBACK)
// The following key/values are not mandatory but are encouraged
.ipAddress(InetAddress.getByName("1.1.1.1"))
.maxmindId("ABCD1234")
.minfraudId(UUID.fromString("01c25cb0-f067-4e02-8ed0-a094c580f5e4"))
.transactionId("txn123")
.chargebackCode("BL")
.notes("Suspicious account behavior")
.build();
client.reportTransaction(transaction);
```
```javascript
import * as minFraud from '@maxmind/minfraud-api-node';
const accountId = '10';
const licenseKey = 'LICENSEKEY';
const client = new minFraud.Client(accountId, licenseKey);
// A valid tag and at least one of the following are required parameters:
// ipAddress, maxmindId, minfraudId, transactionId.
const transactionReport = new minFraud.TransactionReport({
tag: minFraud.Constants.Tag.CHARGEBACK,
// The following key/values are not mandatory but are encouraged
ipAddress: '1.1.1.1',
maxmindId: 'ABCD1234',
minfraudId: '01c25cb0-f067-4e02-8ed0-a094c580f5e4',
transactionId: 'txn123',
chargebackCode: 'BL',
notes: 'Suspicious account behavior',
});
client.reportTransaction(transactionReport).then(() => ...);
```
```php
require_once 'vendor/autoload.php';
use MaxMind\MinFraud\ReportTransaction;
$accountId = 10;
$licenseKey = 'LICENSEKEY';
$rt = new ReportTransaction($accountId, $licenseKey);
// A valid tag and at least one of the following are required parameters:
// ipAddress, maxmindId, minfraudId, transactionId.
$rt->report(
tag: 'chargeback',
// The following key/values are not mandatory but are encouraged
ipAddress: '1.1.1.1',
maxmindId: 'ABCD1234',
minfraudId: '01c25cb0-f067-4e02-8ed0-a094c580f5e4',
transactionId: 'txn123',
chargebackCode: 'BL',
notes: 'Suspicious account behavior'
);
```
```python
from minfraud import Client
account_id = 10
license_key = 'LICENSEKEY'
with Client(account_id, license_key) as client:
# A valid tag and at least one of the following are required parameters:
# ip_address, maxmind_id, minfraud_id, transaction_id.
transaction_report = {
'tag': 'chargeback',
# The following key/values are not mandatory but are encouraged
'ip_address': '1.1.1.1',
'maxmind_id': 'ABCD1234',
'minfraud_id': '01c25cb0-f067-4e02-8ed0-a094c580f5e4',
'transaction_id': 'txn123',
'chargeback_code': 'BL',
'notes': 'Suspicious account behavior',
}
client.report(transaction_report)
# If you want to use asynchronous requests
import asyncio
from minfraud import AsyncClient
async def report():
async with AsyncClient(account_id, license_key) as client:
# A valid tag and at least one of the following are required parameters:
# ip_address, maxmind_id, minfraud_id, transaction_id.
transaction_report = {
'tag': 'chargeback',
# The following key/values are not mandatory but are encouraged
'ip_address': '1.1.1.1',
'maxmind_id': 'ABCD1234',
'minfraud_id': '01c25cb0-f067-4e02-8ed0-a094c580f5e4',
'transaction_id': 'txn123',
'chargeback_code': 'BL',
'notes': 'Suspicious account behavior',
}
await client.report(transaction_report)
asyncio.run(report())
```
```ruby
Minfraud.configure do |c|
c.account_id = 10
c.license_key = 'LICENSEKEY'
c.enable_validation = true
end
# A valid tag and at least one of the following are required parameters:
# ip_address, maxmind_id, minfraud_id, transaction_id.
txn = Minfraud::Components::Report::Transaction.new(
tag: :chargeback,
# The following key/values are not mandatory but are encouraged
ip_address: '1.1.1.1',
maxmind_id: 'ABCD1234',
minfraud_id: '01c25cb0-f067-4e02-8ed0-a094c580f5e4',
transaction_id: 'txn123',
chargeback_code: 'BL',
notes: 'Suspicious account behavior',
)
reporter = Minfraud::Report.new(transaction: txn)
reporter.report_transaction
```
## Validation and error handling
By default, our client libraries will throw an exception if any of the
transaction report object's values are invalid. The exception is thrown when the
object is constructed; the python library will raise an error when the minFraud
service method is called.
If the report transaction request fails, our client libraries will throw an
exception, raise an error (python), or reject the promise (node).
For more information on errors and exceptions, including their types and
descriptions,
[go to the specific library's documentation page](/minfraud/evaluate-a-transaction/index.md#links-to-maxmind-client-apis).
## API Documentation
The HTTP API requires you to pass a set of parameters as JSON via an HTTP POST.
The URI for this service is
`https://minfraud.maxmind.com/minfraud/v2.0/transactions/report`.
The `minfraud.maxmind.com` hostname automatically picks the data center
geographically closest to you.
For a machine-readable description of the Report Transaction request fields and
responses, see the
[minFraud OpenAPI specification](https://github.com/maxmind/openapi/blob/main/bundled/minfraud.yaml)
([raw file](https://raw.githubusercontent.com/maxmind/openapi/main/bundled/minfraud.yaml)).
### Authorization and Security
The HTTP Authorization header is required for authorization. The username is
your
[MaxMind account ID](https://www.maxmind.com/en/accounts/current/license-key).
The password is your
[MaxMind license key](https://www.maxmind.com/en/accounts/current/license-key).
> **⚠️ Warning**
>
> You must be approved for a trial or purchase credit for
> use with our web services in order to receive an account ID and license key.
We use
[basic HTTP authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).
The APIs which require authentication are only available via HTTPS. Always use
HTTPS, so that your credentials are never transmitted unencrypted. If you
attempt to access this service via HTTP, you will receive a `403 Forbidden` HTTP
response.
We require TLS 1.2 or greater for all requests to our servers to keep your data
secure.
### Request Headers
The `Content-Type` header should always be `application/json`.
### Request Body
The minFraud API accepts input as JSON in the body of an HTTP POST. The JSON
document should consist of a single object. That object may contain the
following keys:
| Data field name | Type | Data field description |
| ------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ip_address** | string | _Conditionally required.[^1]_ The IP address of the customer placing the order. This should be passed as a string like “44.55.66.77” or “2001:db8::2:1”. |
| **tag** | string | **Required.** A string indicating the likelihood that a transaction may be fraudulent, or `clear` to retract a previous report. Possible values: `not_fraud`, `suspected_fraud`, `spam_or_abuse`, `chargeback`, or `clear`. |
| **chargeback_code** | string | _Optional._ A string which is provided by your payment processor indicating the [reason for the chargeback](https://en.wikipedia.org/wiki/Chargeback#Reason_codes). It must not contain a NUL character. |
| **maxmind_id** | string (8) | _Conditionally required.[^1]_ A unique eight character string identifying a minFraud Standard or Premium request. These IDs are returned in the `maxmindID` field of a response for a successful minFraud request. |
| **minfraud_id** | string (36) | _Conditionally required.[^1]_ A UUID that identifies a minFraud Score, minFraud Insights, or minFraud Factors request. This ID is returned at `/id` in the response. |
| **notes** | string | _Optional._ Your notes on the fraud tag associated with the transaction. We manually review many reported transactions to improve our scoring for you, so any additional details to help us understand context are helpful. Must be 1000 Unicode characters or fewer. It must not contain a NUL character. |
| **transaction_id** | string | _Conditionally required.[^1]_ The transaction ID you originally passed to minFraud. It must not contain a NUL character. |
[^1]:
You must provide at least one of `ip_address`, `maxmind_id`, `minfraud_id`,
or `transaction_id`. You are encouraged to provide as many as you have
available to help ensure your transaction is correctly matched.
### Response
HTTP status codes are used to relay success and error messages. A successful
POST will return a 204 (No Content) status code.
When the server returns an error (4xx or 5xx), the response may include a JSON
document in the body. This document is a single object with the keys `code` and
`error`. The `code` field is a static error code for machine use. The value of
any given code will never change, though codes can be added or removed. The
`error` field is a human-readable description of the error and may change at any
time.
Not all errors include a JSON body. Some `4xx` errors, such as a `403` for a
plain HTTP request, and many `5xx` errors, which typically happen outside of our
web service request handling code, do not include one. You should check the
`Content-Type` of an error response before attempting to decode the body as
JSON.
In addition to the errors documented below, client code should also be prepared
to handle any valid HTTP 4xx or 5xx status code.
| Error Code | HTTP Status | Description |
| ----------------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| JSON_INVALID | 400 Bad Request | The request body is not a valid JSON object. |
| MAXMIND_ID_INVALID | 400 Bad Request | You have supplied an invalid `maxmind_id`. This field is case sensitive. Check your `maxmind_id` to ensure that it is 8 characters in length and made up only of digits and upper case letters. This value must come from the successful response to a previous minFraud request. |
| MINFRAUD_ID_INVALID | 400 Bad Request | You have supplied an invalid `minfraud_id`. Check your `minfraud_id` to ensure that it is a valid UUID as returned in the minFraud Score, minFraud Insights, or minFraud Factors response. |
| PARAMETER_UNKNOWN | 400 Bad Request | You have supplied an unknown parameter. Check the keys in your JSON data to ensure that you have not misspelled any of the field names or passed a field name which is not listed in [the available input fields](/minfraud/report-a-transaction/index.md#request-body). |
| NOTES_INVALID | 400 Bad Request | Your request includes a `notes` field that exceeds 1000 Unicode characters or contains a NUL character. |
| TAG_REQUIRED | 400 Bad Request | Your request does not include a `tag` field. |
| TAG_INVALID | 400 Bad Request | Your request includes an invalid `tag` field. |
| TRANSACTION_ID_REQUIRED | 400 Bad Request | Your request must include one of the following fields: `ip_address`, `maxmind_id`, `minfraud_id`, or `transaction_id`. |
| IP_ADDRESS_INVALID | 400 Bad Request | You have not supplied a valid IPv4 or IPv6 address. |
| IP_ADDRESS_RESERVED | 400 Bad Request | You have supplied an IP address which belongs to a reserved or private range. |
| ``\_INVALID | 400 Bad Request | A request field has the wrong JSON type. This applies to every request field, including fields with their own row, such as `tag` and `notes`. `` is the field name in upper case, for example `TRANSACTION_ID_INVALID` or `CHARGEBACK_CODE_INVALID`. `TRANSACTION_ID_INVALID` and `CHARGEBACK_CODE_INVALID` are also returned when the field contains a NUL character. |
| AUTHORIZATION_INVALID | 401 Unauthorized | You have supplied an invalid [MaxMind account ID and/or license key](https://www.maxmind.com/en/accounts/current/license-key) in the [Authorization](/minfraud/report-a-transaction/index.md#authorization-and-security) header. |
| LICENSE_KEY_REQUIRED | 401 Unauthorized | You have not supplied a [MaxMind license key](https://www.maxmind.com/en/accounts/current/license-key) in the [Authorization](/minfraud/report-a-transaction/index.md#authorization-and-security) header. |
| ACCOUNT_ID_REQUIRED | 401 Unauthorized | You have not supplied a [MaxMind account ID](https://support.maxmind.com/knowledge-base/articles/find-your-maxmind-account-id) in the [Authorization](/minfraud/report-a-transaction/index.md#authorization-and-security) header. |
| PERMISSION_REQUIRED | 403 Forbidden | You do not have permission to use the service. Please [contact our support team](https://support.maxmind.com/knowledge-base) for more information. |
| (none) | 413 Content Too Large | This status is returned when the request body is larger than 65,536 bytes. The response does not have a JSON body. |
| (none) | 429 Too Many Requests | MaxMind rate-limited the request, usually because of excessive earlier error responses. The response may not include a JSON body. |
| SERVER_ERROR | 500 Internal Server Error | There was an error when processing this request. |
| (none) | 503 Service Unavailable | There is a problem with the web service server. You can try this request again later. |
### Example using curl
```bash
curl -H "Content-Type: application/json" \
--user 1:foo \
-X POST \
-v \
-d '{"ip_address":"1.2.3.4","tag":"suspected_fraud","transaction_id":"1"}' \
https://minfraud.maxmind.com/minfraud/v2.0/transactions/report
```
# Testing minFraud in the MaxMind Sandbox
Source: https://dev.maxmind.com/minfraud/sandbox-environment/
MaxMind maintains a Sandbox environment so that you can do basic integration
tests with the web services. In order to set up a Sandbox account you must
already have a paid account, and you must be an account administrator.
[Learn how to set up a Sandbox account on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/set-up-a-maxmind-sandbox-account)
Once you have your Sandbox account set up and activated, follow the steps below.
## Generate a License Key for the Sandbox
In order to test the web services in the Sandbox environment, you will need to
generate a license key from your Sandbox account.
[Learn how to generate a license key on our Knowledge Base.](https://support.maxmind.com/knowledge-base/articles/generate-a-maxmind-license-key)
The process is the same for your Sandbox account, but you must login to your
Sandbox account
[[direct link](https://sandbox.maxmind.com/en/accounts/current/license-key),
Sandbox account login required] rather than your regular MaxMind account.
## Build your integration
Consult our [quick start guide](/minfraud/evaluate-a-transaction/index.md) or our
[list of client APIs](/minfraud/evaluate-a-transaction/index.md#links-to-maxmind-client-apis)
to develop your integration.
## Point your integration to the Sandbox service endpoints
Use the service endpoints for the Sandbox version of the web services, as listed
in the table below:
| Sandbox Service | HTTP Method | Endpoint |
| --------------- | ----------- | ---------------------------------------------------- |
| Score | `POST` | `https://sandbox.maxmind.com/minfraud/v2.0/score` |
| Insights | `POST` | `https://sandbox.maxmind.com/minfraud/v2.0/insights` |
| Factors | `POST` | `https://sandbox.maxmind.com/minfraud/v2.0/factors` |
Remember to use the license key generated by your Sandbox account to
authenticate your requests.
## Test data for the Sandbox minFraud service
> The Sandbox will return risk scores and risk data, but this data
> is not accurate and should not be used to evaluate the efficacy of the minFraud
> scoring engine, or for geolocation or IP intelligence. It is designed for
> testing purposes only.
You may only submit approved test data to the Sandbox version of the minFraud
services. At this time, the only approved test transaction data are the three IP
addresses listed below. You can submit transactions to Sandbox minFraud services
with any of the following IP addresses as the
[`/device/ip_address`](/minfraud/api-documentation/requests/index.md#schema--request--device__ip_address)
input. You should receive a minFraud response with risk scores. The IP risk
score output
([`/ip_address/risk`](/minfraud/api-documentation/responses/index.md#schema--response--ip-address__risk))
will contain a response within the range defined below:
| Test IP Address Input | Test IP Risk Score Output Range |
| --------------------- | ------------------------------- |
| `128.101.101.101` | 40 - 99 |
| `74.209.24.1` | 5 - 39.99 |
| `65.116.3.80` | 0.01 - 4.99 |
Also, if you include the `/event/time` input, it must be within 12 hours of the
request time to ensure the expected IP risk score ranges are returned.
Please note that the Sandbox environment may not return all the risk data that
the minFraud service would return, and the risk scores and risk data it does
return will not be accurate. The Sandbox environment should be used for basic
integration testing, to confirm that you are passing inputs in a valid format
and that you are able to process the basic format of minFraud responses.
[Learn more on our Knowledge Base about the kinds of outputs you can expect to receive from real minFraud transactions.](https://support.maxmind.com/knowledge-base/articles/pass-inputs-to-minfraud#recommended-minimum-inputs)
You should not submit real transaction data to the Sandbox version of the
minFraud services, but you can submit transactions with dummy data.
## Test Legacy versions of minFraud using the Sandbox
If you are a minFraud Legacy user, you can test Legacy versions of the minFraud
services using your Sandbox account.
[Learn how to test with different versions of the minFraud service.](/minfraud/minfraud-legacy/index.md#select-the-proper-legacy-version-for-testing)
The Sandbox environment imposes volume limits on API requests to prevent abuse.
The Sandbox should not be used to test the capacity of the production web
service in high volume situations.
If you are running into the request limit and need help, please
[reach out to our support team for assistance](https://support.maxmind.com/knowledge-base).
## Learn more about the MaxMind Sandbox
You can
[learn more about the MaxMind Sandbox on our Knowledge Base](https://support.maxmind.com/knowledge-base/account-and-purchasing#sandbox-environment).
# Track Devices
Source: https://dev.maxmind.com/minfraud/track-devices/
The Device Tracking Add-On for the minFraud services identifies devices as they
move across networks and enhances the ability of the minFraud services to detect
fraud. If a fraudster changes proxies while they are using your site or app, or
between sessions, you may observe an increased risk score in the minFraud output
associated with their transactions.
We may increase the risk score if we detect order velocity on the device. We
also return a
[Device ID](/minfraud/api-documentation/responses/index.md#schema--response--device__id)
in minFraud Insights and Factors so that you can do your own modeling around
Device ID.
## Guides
- [Web](/minfraud/track-devices/web/index.md): Track devices on your website using JavaScript.
- [Android](/minfraud/track-devices/android/index.md): Track devices in your Android app using Kotlin or Java.
- [iOS](/minfraud/track-devices/ios/index.md): Track devices in your iOS app using Swift or Objective-C.
## Explicit device linking
By default, the minFraud service matches devices using IP addresses. This works
well in most cases, but IP-based matching can be less reliable when multiple
users share the same IP address. Common scenarios include:
- **Shared or corporate IPs** where many employees or users share a single
public IP address.
- **Carrier-Grade NAT (CGNAT)** where an ISP assigns the same public IP to many
subscribers.
- **VPNs** where multiple users route traffic through the same VPN endpoint.
Explicit device linking solves this by using a `tracking_token` to match devices
with high confidence, independent of the IP address.
### How it works
The client-side tracking code returns a tracking token string. When you pass
this token to the minFraud API in the
[`/device/tracking_token`](/minfraud/api-documentation/requests/index.md#schema--request--device)
field, the service uses it to match the device directly. When a valid token is
found, the device is matched with high confidence regardless of IP address
changes.
### Implementation steps
1. Collect the tracking token on the client side using the appropriate SDK for
your platform.
2. Pass the token to your backend (e.g., via a hidden form field, session
storage, or API call).
3. Include the token in your minFraud API request's `device` object as
`tracking_token`.
See the [Web](/minfraud/track-devices/web/index.md#explicit-device-linking-examples),
[Android](/minfraud/track-devices/android/index.md#explicit-device-linking-examples), and
[iOS](/minfraud/track-devices/ios/index.md#explicit-device-linking-examples) guides for
platform-specific examples.
### Token handling
- The tracking token is an **opaque string**. Do not parse it or make
assumptions about its format, as the format may change without notice.
- Tokens should be treated as **transient**. Generate a fresh token for each
session or transaction rather than storing tokens long-term.
# Android Device Tracking
Source: https://dev.maxmind.com/minfraud/track-devices/android/
> **⚠️ Warning**
>
> The MaxMind Device SDK for Android is currently in beta.
The MaxMind Device SDK for Android collects device data and sends it to MaxMind
so that the minFraud service can assign a Device ID and begin collecting
fingerprint information.
## Requirements
- Android API 27+ (Android 8.1+)
- A recent stable version of Kotlin
- AndroidX libraries
## Installation
Add the MaxMind Device SDK dependency to your app-level `build.gradle.kts` or
`build.gradle` file. The coroutine examples below also require
`androidx.lifecycle:lifecycle-runtime-ktx` and
`org.jetbrains.kotlinx:kotlinx-coroutines-android`. Your app must declare these
dependencies because the SDK does not include them.
```kotlin
// build.gradle.kts (Kotlin DSL)
dependencies {
// Check https://search.maven.org/artifact/com.maxmind.device/device-sdk for the latest version.
implementation("com.maxmind.device:device-sdk:0.3.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.11.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.11.0")
}
```
```groovy
// build.gradle (Groovy DSL)
dependencies {
// Check https://search.maven.org/artifact/com.maxmind.device/device-sdk for the latest version.
implementation 'com.maxmind.device:device-sdk:0.3.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.11.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.11.0'
}
```
Check
[Maven Central](https://search.maven.org/artifact/com.maxmind.device/device-sdk)
for the latest version.
## Initialization
Initialize the SDK in your `Application` class. Replace `MAXMIND_ACCOUNT_ID`
with your
[MaxMind account ID](https://support.maxmind.com/knowledge-base/articles/find-your-maxmind-account-id).
```kotlin
import android.app.Application
import com.maxmind.device.DeviceTracker
import com.maxmind.device.config.SdkConfig
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
val config = SdkConfig.Builder(MAXMIND_ACCOUNT_ID).build()
DeviceTracker.initialize(this, config)
}
}
```
## Collect and send device data
Call `collectAndSend()` to collect device data and send it to MaxMind. This is a
suspend function designed for use with Kotlin coroutines.
Run the following examples from an AndroidX activity or fragment with a
`lifecycleScope`.
```kotlin
import android.util.Log
import androidx.lifecycle.lifecycleScope
import com.maxmind.device.DeviceTracker
import kotlinx.coroutines.launch
lifecycleScope.launch {
DeviceTracker.getInstance().collectAndSend()
.onSuccess { _ ->
Log.d("MaxMind", "Device data sent successfully")
}
.onFailure { error ->
Log.e("MaxMind", "Failed to send device data", error)
}
}
```
A callback-based API is also available. Java callers need a Kotlin bridge to
read the tracking token because Kotlin's `Result` has limited Java
interoperability. See the
[Java bridge example](https://github.com/maxmind/device-android/tree/v0.3.1#java-example)
in the SDK documentation.
## Explicit device linking examples
Capture the `trackingToken` from the `collectAndSend()` result and pass it to
your backend for inclusion in the minFraud API request.
```kotlin
import android.util.Log
import androidx.lifecycle.lifecycleScope
import com.maxmind.device.DeviceTracker
import kotlinx.coroutines.launch
lifecycleScope.launch {
DeviceTracker.getInstance().collectAndSend()
.onSuccess { trackingResult ->
val token = trackingResult.trackingToken
// Send the tracking token to your backend
sendTokenToBackend(token)
}
.onFailure { error ->
Log.e("MaxMind", "Failed to send device data", error)
}
}
```
On your backend, include the token in the minFraud API request:
```json
{
"device": {
"ip_address": "2001:db8::ff00:42:8329",
"tracking_token": "token-value-from-client"
}
}
```
For full SDK documentation, see the
[device-android README](https://github.com/maxmind/device-android#readme).
# iOS Device Tracking
Source: https://dev.maxmind.com/minfraud/track-devices/ios/
> **⚠️ Warning**
>
> The MaxMind Device SDK for iOS is currently in beta.
The MaxMind Device SDK for iOS collects device data and sends it to MaxMind so
that the minFraud service can assign a Device ID and use it to detect fraud
across sessions. The SDK exposes both a Swift API and an Objective-C API;
Objective-C classes use an `MM` prefix.
## Requirements
- iOS 15.0+
- Swift 5.9+
- Xcode 15.0+
## Installation
Add the MaxMind Device SDK as a Swift Package dependency. In Xcode, choose
**File > Add Package Dependencies…** and enter the repository URL
`https://github.com/maxmind/device-ios.git`.
Or add it to your `Package.swift`:
```swift
dependencies: [
// Check https://github.com/maxmind/device-ios/releases for the latest version.
.package(url: "https://github.com/maxmind/device-ios.git", from: "0.1.0")
]
```
Check the [device-ios releases](https://github.com/maxmind/device-ios/releases)
for the latest version.
## Initialization
Initialize the SDK with your
[MaxMind account ID](https://support.maxmind.com/knowledge-base/articles/find-your-maxmind-account-id).
Replace `MAXMIND_ACCOUNT_ID` with your account ID.
```swift
import MinFraudDevice
let config = SDKConfig(accountID: MAXMIND_ACCOUNT_ID)
let tracker = DeviceTracker(config: config)
```
```objc
@import MinFraudDevice;
MMSDKConfig *config = [[MMSDKConfig alloc] initWithAccountID:MAXMIND_ACCOUNT_ID];
MMDeviceTracker *tracker = [[MMDeviceTracker alloc] initWithConfig:config];
```
## Collect and send device data
Call `collectAndSend()` to collect device data and send it to MaxMind. The Swift
API uses Swift concurrency (`async`/`await`); the Objective-C API uses a
completion handler.
```swift
import MinFraudDevice
do {
let result = try await tracker.collectAndSend()
print("Device data sent successfully")
} catch {
print("Failed to send device data: \(error)")
}
```
```objc
[tracker collectAndSendWithCompletion:^(MMTrackingResult *result, NSError *error) {
if (error) {
NSLog(@"Failed to send device data: %@", error);
return;
}
NSLog(@"Device data sent successfully");
}];
```
## Explicit device linking examples
Capture the `trackingToken` from the `collectAndSend()` result and pass it to
your backend for inclusion in the minFraud API request.
```swift
import MinFraudDevice
do {
let result = try await tracker.collectAndSend()
let token = result.trackingToken
// Send the tracking token to your backend
sendTokenToBackend(token)
} catch {
print("Failed to send device data: \(error)")
}
```
```objc
[tracker collectAndSendWithCompletion:^(MMTrackingResult *result, NSError *error) {
if (error) {
NSLog(@"Failed to send device data: %@", error);
return;
}
// Send the tracking token to your backend
[self sendTokenToBackend:result.trackingToken];
}];
```
On your backend, include the token in the minFraud API request:
```json
{
"device": {
"ip_address": "2001:db8::ff00:42:8329",
"tracking_token": "token-value-from-client"
}
}
```
For full SDK documentation, see the
[device-ios README](https://github.com/maxmind/device-ios#readme).
# Web Device Tracking
Source: https://dev.maxmind.com/minfraud/track-devices/web/
The Device Tracking Add-On is JavaScript code for you to add to your website. It
runs on a visiting device so that the minFraud service can assign a Device ID
and begin collecting fingerprint information. We recommend including the
JavaScript below on your product and landing pages as well as all the pages
within your purchase flow. This will help detect fraudsters if they change or
enable proxies while browsing your website.
To speed page load time, JavaScript should be placed in the footer of the HTML
webpage.
Note that, in order to be effective, the Device Tracking Add-On must, at a
minimum, be included on the page where the IP address is captured for a minFraud
query.
> **⚠️ Warning**
>
> If you anticipate volume greater than 500 page views per
> second, please [contact us](https://support.maxmind.com/knowledge-base).
## Implementation
Replace `MAXMIND_ACCOUNT_ID` with your
[MaxMind account ID](https://support.maxmind.com/knowledge-base/articles/find-your-maxmind-account-id).
### Classic snippet
> **⚠️ Warning**
>
> The classic snippet does not support
> [explicit device linking](/minfraud/track-devices/web/index.md#explicit-device-linking-examples), as it provides no
> way to read the tracking token. New integrations should use the
> [module snippet](/minfraud/track-devices/web/index.md#module-snippet) or the [npm package](/minfraud/track-devices/web/index.md#npm-package).
```html
```
### Module snippet
If your site targets modern browsers (those supporting
[JavaScript modules](https://caniuse.com/es6-module)), you can use the module
version of the device tracking script. This avoids the use of global variables
and provides direct access to the tracking result.
```html
```
### npm package
If your site uses a JavaScript bundler or build system (e.g., Webpack, Vite,
Next.js), you can install the device tracking module as an npm package.
```sh
npm install @maxmind/device-tracking
```
```javascript
import { trackDevice } from '@maxmind/device-tracking';
await trackDevice({
accountId: MAXMIND_ACCOUNT_ID,
});
```
See the [package README](https://github.com/maxmind/device-tracking#readme) for
full API documentation.
## Explicit device linking examples
The following examples show how to capture the tracking token on the client and
send it to your backend for inclusion in a minFraud API request. For more
background on explicit device linking, see [Track
Devices](/minfraud/track-devices/index.md).
### Module snippet with token capture
```html
```
### npm package with token capture
```javascript
import { trackDevice } from '@maxmind/device-tracking';
const { trackingToken } = await trackDevice({
accountId: MAXMIND_ACCOUNT_ID,
});
// Send the tracking token to your backend for inclusion in the minFraud request
await fetch('/your-api/transaction', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ trackingToken }),
});
```
### Backend API request
On your backend, include the token in the minFraud API request:
```json
{
"device": {
"ip_address": "2001:db8::ff00:42:8329",
"tracking_token": "token-value-from-client"
}
}
```
## Protecting device tracking from ad blockers
Ad blockers can stop the device tracking script from loading, which decreases
the coverage and effectiveness of device tracking.
To reduce this, you can serve the device tracking script from a hostname on your
own domain instead of from `device.maxmind.com`. We set this up with you as a
one-time change, and it does not change how you query the minFraud service.
Because the setup is hands-on, this option is available for higher-volume and
enterprise accounts. As a general guide, accounts sending more than 50,000
queries per month, or accounts with a dedicated customer success manager, are
eligible.
To get started,
[contact us](https://support.maxmind.com/knowledge-base/submit-a-support-request)
or reach out to your customer success manager.
We recommend implementing the
[explicit device linking](/minfraud/track-devices/web/index.md#explicit-device-linking-examples) described above
before or at the same time as moving to your own hostname.
### Choosing a hostname
We recommend a hostname that does not reference MaxMind or device tracking. For
example, use `mm.your-company.com` rather than `maxmind.your-company.com` or
`device.your-company.com`.
Use this hostname only for MaxMind device tracking, not for anything else on
your site.
### How setup works
1. You give us a hostname on your own domain.
2. We add the hostname to our system and send you DNS records to add to your
domain.
3. You add the DNS records and let us know, and we validate them.
4. After validation succeeds, you update the device tracking code on your site
to use the new hostname. If your site uses a Content Security Policy, update
it as well (see
[CSP requirements](/minfraud/track-devices/web/index.md#content-security-policy-csp-requirements)).
5. Device tracking requests should start working on the new hostname shortly
after. Send us the URL of a page that includes the script so that we can
verify the integration.
### Updating your integration
Replace `TRACKING_HOSTNAME` with the hostname you set up with us.
Your existing code may hardcode the old hostname in more than one place, so
search your integration for it and replace every occurrence.
The module and npm examples below also capture the tracking token. The token
capture is optional; in the npm example, point the `fetch` at your own endpoint
or remove it.
For the module snippet, use the hostname in the `import()` URL and pass it as
the `host` option:
```html
```
For the npm package, pass the `host` option. The package uses it for both the
script URL and the tracking request, so there is nothing else to change:
```javascript
import { trackDevice } from '@maxmind/device-tracking';
const { trackingToken } = await trackDevice({
accountId: MAXMIND_ACCOUNT_ID,
host: 'TRACKING_HOSTNAME',
});
// Optional: send the tracking token to your backend
await fetch('/your-api/transaction', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ trackingToken }),
});
```
For the classic snippet, set `apiHost` and use it in the script `src`:
```html
```
In all three cases, the hostname you set must be bare, without a scheme or path.
## Content Security Policy (CSP) requirements
If your site uses a Content Security Policy, you will need to add the following
directives to allow the device tracking script to load and communicate with
MaxMind's servers:
- `script-src`: `device.maxmind.com`
- `connect-src`: `d-ipv4.mmapiws.com`, `d-ipv6.mmapiws.com`
If you serve device tracking from
[a hostname on your own domain](/minfraud/track-devices/web/index.md#protecting-device-tracking-from-ad-blockers),
use that hostname in both directives instead: it replaces `device.maxmind.com`
in `script-src` and both `d-ipv4.mmapiws.com` and `d-ipv6.mmapiws.com` in
`connect-src`.
## Cookie and web storage usage
The device tracking add-on uses cookies and local storage as methods of
distinguishing unique devices across visits and domains.
The add-on sets two types of cookies, both named `__mmapiwsid` with two-year
expiration:
1. **First-party cookie**: Set for the effective second-level domain of your
site; for instance, on `www.maxmind.com`, the cookie would be set for
`maxmind.com`.
2. **Third-party cookie**: Set by MaxMind's servers to enable cross-domain
device tracking. This allows the same device to be identified when it visits
different customer websites using our device tracking.
The local storage key is also named `__mmapiwsid` and provides an additional
method of device identification.
MaxMind may use other browser storage techniques in the future to enhance the
performance of the device tracking add-on.
# What's New in minFraud Score, minFraud Insights, and minFraud Factors
Source: https://dev.maxmind.com/minfraud/whats-new-in-minfraud-score-and-minfraud-insights/
MaxMind minFraud Score, minFraud Insights, and minFraud Factors provide a modern
RESTful way to access the minFraud data services. This document outlines the
major changes for developers when using these services.
For more information about ongoing enhancements to the minFraud services, see
our [release notes](/minfraud/release-notes/index.md).
## General Changes
The minFraud web services now follow REST principles.
Authentication is done using
[basic authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)
over a TLS connection rather than passing the license key as a query parameter.
All requests are made by a POST of a structured JSON document to the web
service.
When an error occurs, we now return an appropriate HTTP error code instead of
simply returning a 200 with an error in the document. We also return a JSON
document with details about the error in most cases.
Successful responses also return a JSON document. All documents, both successful
and error, are in the form of a JSON object.
## Data Changes
### Inputs
[Download this PDF](https://get.maxmind.com/hubfs/Marketing/minFraud/minFraud%20services%20input_output%20comparison%20table.pdf)
to get an overview and comparison of all minFraud products' inputs. You can also
view our [Request API documentation](/minfraud/api-documentation/requests/index.md) for a
complete description of each input.
### minFraud Score Outputs
minFraud Score does not provide any new data outputs. Rather it provides a
[simple JSON document](/minfraud/api-documentation/responses/index.md) containing the
transaction’s `risk_score`, `id`, `credits_remaining`, and any warnings related
to the input provided.
### minFraud Insights Outputs
minFraud Insights response data builds on our previous web service outputs,
improving organization and consistency while adding several new data points.
Beyond the new outputs listed below, the service provides
[GeoIP Insights data](/geoip/docs/web-services/responses/index.md#geoip-insights-body-example)
for the IP address in the `ip_address` object.
`proxyScore` has been replaced with the IP address risk, `/ip_address/risk`.
Whereas proxyScore ranged from 0-4, the IP address risk ranges from 0.01 to 99,
similar to `risk_score`.
`countryMatch` has been replaced with `/billing_address/is_in_ip_country` and
`/shipping_address/is_in_ip_country`.
### New Outputs
[Download this PDF](https://get.maxmind.com/hubfs/Marketing/minFraud%20comparison%20charts/minFraud%20services%20comparison%20chart.pdf)
to get an overview and comparison of all minFraud products' outputs. You can
also view our
[Response API documentation](/minfraud/api-documentation/responses/index.md) for a
complete description of each output.
### Deprecated Outputs
The following outputs have been removed without a direct replacement.
- `ip_corporateProxy`
- `highRiskCountry`
- `highRiskUsername`
- `highRiskPassword`
- `custPhoneInBillingLoc`
## More Information
For more information on these web services, see the full
[API documentation](/minfraud/api-documentation/index.md).
# Working with Transaction Dispositions
Source: https://dev.maxmind.com/minfraud/working-with-transaction-dispositions/
With minFraud Interactive, customers can create Custom Rules that are used to
assign a disposition to every transaction received in a minFraud request. Custom
Rules can set a transaction’s disposition to `accept`, `reject`, or
`manual_review`. For more information on Custom Rules and Dispositions, see the
documentation on our
[knowledge base](https://support.maxmind.com/knowledge-base/articles/use-custom-rules-and-dispositions-minfraud-maxmind).
After transactions are received, customers can use the account portal to review
all transactions dispositioned as `manual_review`. Transactions can then either
be `accept`ed or `reject`ed, and/or have a note added.
[Learn how to use the account portal to do manual review on our knowledge base.](https://support.maxmind.com/knowledge-base/articles/review-a-minfraud-transaction).
In order for these manual updates made in the account portal to be useful, they
need to find their way back into customers’ systems. The Dispositions API allows
customers to get a list of the manual updates and notes made to their
transactions.
**You only need to implement the Dispositions API if you (1) use the account
portal to make manual changes to dispositions, and (2) require those changes to
propagate to your own system.**
## Making a disposition request
To make a disposition request, you need the request URI and parameters, and
[your MaxMind account ID and license key](https://www.maxmind.com/en/accounts/current/license-key).
For a machine-readable description of the Dispositions API's request parameters
and responses, see the
[minFraud OpenAPI specification](https://github.com/maxmind/openapi/blob/main/bundled/minfraud.yaml)
([raw file](https://raw.githubusercontent.com/maxmind/openapi/main/bundled/minfraud.yaml)).
### Request URI and parameters
API calls should be made with an HTTP GET request to
`https://minfraud.maxmind.com/minfraud/disposition/v1.0/updates`.
Each request needs one of these URL parameters:
- `updates_after`: an RFC 3339 timestamp. It is an exclusive lower bound for the
updates. MaxMind returns only updates made after this time. Send it on your
first request.
- `cursor`: the `next_cursor` value from the previous response. MaxMind returns
the updates after the position that `next_cursor` marks. Send it on every
later request.
Send `updates_after` or `cursor`, not both.
URL-encode the `updates_after` value. If it has a `+` offset, send it as `%2B`,
or the service reads the `+` as a space and rejects the timestamp.
For example, to get updates after March 15, 2021 at 9 AM UTC, your request would
look like:
`https://minfraud.maxmind.com/minfraud/disposition/v1.0/updates?updates_after=2021-03-15T09:00:00.00000Z`
To get the next page, send the `next_cursor` value from the previous response:
`https://minfraud.maxmind.com/minfraud/disposition/v1.0/updates?cursor=00054acc27a57911deadbeef000000000000000000000050`
### Authorization and Security
The HTTP Authorization header is required for authorization. The username is
your
[MaxMind account ID](https://www.maxmind.com/en/accounts/current/license-key).
The password is your
[MaxMind license key](https://www.maxmind.com/en/accounts/current/license-key).
The authorization realm is `minfraud-disposition`.
> **⚠️ Warning**
>
> You must be approved for a trial or purchase credit for
> use with our web services in order to receive an account ID and license key.
We use basic HTTP authentication. The APIs which require authentication are only
available via HTTPS. Always use HTTPS, so that your credentials are never
transmitted unencrypted. If you attempt to access this service via HTTP, you
will receive a `403 Forbidden` HTTP response.
### Request headers
The `Accept` and `Accept-Charset` headers are optional. The service ignores them
and always returns JSON encoded as UTF-8.
### Command Line Example Using curl
This example will get updates after March 15, 2021 at 9AM UTC. Please replace
`{account_id}` and `{license_key}` with your
[account ID and license key](https://www.maxmind.com/en/accounts/current/license-key)
```bash
curl -u "{account_id}:{license_key}" \
https://minfraud.maxmind.com/minfraud/disposition/v1.0/updates\?updates_after\=2021-03-15T09:00:00.00000Z
```
## Response to successful requests
### Headers (successful)
The `Content-Type` header for a successful response is
`application/vnd.maxmind.com-disposition-updates+json; charset=UTF-8; version=1.0`.
A `Content-Length` header will be provided.
### Body (successful)
Data will be returned as a JSON document in UTF-8 encoding. The document will
include three keys: `last_update_timestamp`, `next_cursor`, and `updates`.
The `last_update_timestamp` value provides the relevant timestamp the last
returned transaction was sorted by, in RFC 3339 format (NB: this value is not
necessarily the earlier of the `*_last_updated` keys of the last included
transaction; this is why it’s being provided explicitly). If `updates` is empty,
this is the time of your `updates_after` value, or the `last_update_timestamp`
of the response that gave you the `cursor`.
The `next_cursor` value is an opaque string that marks the position of the last
transaction in `updates`. If `updates` is empty, it is the position of your
request. Send it as `cursor` in your next request. Do not parse or build this
value.
The `updates` value provides an array of transactions for which the disposition
and/or note have been manually updated, or, the transaction’s manual review
period has expired. The transactions will be sorted from least recently updated
to most recently updated, using the earliest updated timestamp (either the
disposition or note) after the request's position (the `updates_after` time, or
the point that `cursor` marks) for each transaction.
A response holds the earliest updated transactions after the request's position,
not the most recent. To get all of the updates:
1. Send `updates_after` with the time from which you want updates.
2. Send the `next_cursor` value from each response as `cursor` in your next
request.
3. When `updates` is empty, you have received all of the updates available now.
An update becomes available one minute or more after it happens. Send the
response's `next_cursor` value later to check for more.
A response to a `cursor` request holds at most 1000 updated transactions.
MaxMind can change this number. A response to an `updates_after` request can
hold more, because it holds every update that shares its last timestamp.
If you page by sending `last_update_timestamp` as `updates_after`, your requests
keep working. To change to `cursor`, send your stored `last_update_timestamp` as
`updates_after` once, then follow the steps above.
Once you use `cursor`, store `next_cursor` as your position, not
`last_update_timestamp`. Several updates can have the same timestamp, and a
`cursor` response can hold only some of them. For example, if three updates
share the response's `last_update_timestamp` and the response holds one, a
request with that value as `updates_after` never returns the other two.
A transaction can appear in more than one response. For example, if its note
changes after its disposition, it appears once for the disposition update and
again for the note update. Process updates so that handling one again has no
further effect.
Each transaction in the updates array will contain the following keys:
| Key | Value Type | Description |
| --------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `minfraud_id` | UUID | The transaction’s unique identifier. |
| `action` | String | The most recent transaction disposition action. In addition to `accept`, `reject`, and `manual_review`, you may also see `expired_review`, which indicates the manual review period (1 week) expired before the transaction was reviewed. Will be `null` if the transaction has a note update but no disposition. |
| `action_last_updated` | Timestamp | The date and time the disposition action was last updated, in RFC 3339 format with microsecond precision. Will be `null` if the transaction has no disposition. |
| `note` | String | The most recent transaction note. Limited to 500 characters. Will be `null` if not currently set. |
| `note_last_updated` | Timestamp | The date and time the note was last updated, in RFC 3339 format with microsecond precision. If a note has never been set, this will be `null`. |
As a note to implementers, we are considering adding additional keys to this
object in future versions of this API.
### Example response to a successful request
```json
{
"last_update_timestamp": "2017-03-15T22:06:22.492945Z",
"next_cursor": "00054acc27a57911deadbeef000000000000000000000050",
"updates": [
{
"minfraud_id": "deadbeef-0000-0000-0000-000000000003",
"action": "manual_review",
"action_last_updated": "2017-03-04T20:14:42.757200Z",
"note": null,
"note_last_updated": "2017-03-05T16:52:31.995250Z"
},
{
"minfraud_id": "deadbeef-0000-0000-0000-000000000002",
"action": "reject",
"action_last_updated": "2017-03-14T21:39:57.854300Z",
"note": null,
"note_last_updated": "2017-03-15T11:37:42.83235Z"
},
{
"minfraud_id": "deadbeef-0000-0000-0000-000000000000",
"action": "accept",
"action_last_updated": "2017-03-14T22:04:01.04425Z",
"note": null,
"note_last_updated": null
},
{
"minfraud_id": "deadbeef-0000-0000-0000-000000000020",
"action": "manual_review",
"action_last_updated": "2017-03-15T22:04:11.044250Z",
"note": "Panda, can you check this out?",
"note_last_updated": "2017-03-15T22:04:25.828250Z"
},
{
"minfraud_id": "deadbeef-0000-0000-0000-000000000030",
"action": "accept",
"action_last_updated": "2017-03-15T22:05:42.954231Z",
"note": "Customer was traveling abroad.",
"note_last_updated": "2017-03-15T22:05:58.132423Z"
},
{
"minfraud_id": "deadbeef-0000-0000-0000-000000000050",
"action": "expired_review",
"action_last_updated": "2017-03-15T22:06:22.492945Z",
"note": "Customer didn't answer several phone calls.",
"note_last_updated": "2017-03-15T22:06:56.848123Z"
}
]
}
```
## Response to unsuccessful requests
### Headers (unsuccessful)
The `Content-Type` header for an unsuccessful response is
`application/vnd.maxmind.com-error+json; charset=UTF-8; version=1.0`.
A `Content-Length` header will be provided.
### Body (unsuccessful)
In the event an error occurs (the response indicates a 4xx or 5xx HTTP status),
the response may include a JSON document in the body. Many 5xx errors, which
typically happen outside of our web service handling code, do not include one.
Before attempting to decode the body as JSON, you should verify that the
`Content-Type` of the error response is
`application/vnd.maxmind.com-error+json; charset=UTF-8; version=1.0`.
If the JSON document is included in the response body, it will be a single
object with the keys `code` and `error`. The `code` field is a static error code
for machine use. The value of any given `code` will never change, though `code`s
can be added or removed. The `error` field is a human-readable description of
the error and may change at any time.
In addition to the errors documented below, client code should also be prepared
to handle any valid HTTP 4xx or 5xx status code.
| Code | HTTP Status | Error |
| --------------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| UPDATES_AFTER_REQUIRED | 400 Bad Request | You have not supplied the `updates_after` or `cursor` URI parameter. |
| TIMESTAMP_INVALID | 400 Bad Request | The `updates_after` field must be in RFC 3339 format. |
| CURSOR_INVALID | 400 Bad Request | The `cursor` value is not valid. Send a `next_cursor` value from a previous response. |
| CURSOR_AND_UPDATES_AFTER_PROVIDED | 400 Bad Request | You have supplied both the `updates_after` and `cursor` URI parameters. Send only one. |
| AUTHORIZATION_INVALID | 401 Unauthorized | You have supplied an invalid [MaxMind account ID and/or license key](https://www.maxmind.com/en/accounts/current/license-key) in the [Authorization](/minfraud/working-with-transaction-dispositions/index.md#authorization-and-security) header. |
| LICENSE_KEY_REQUIRED | 401 Unauthorized | You have not supplied a [MaxMind license key](https://www.maxmind.com/en/accounts/current/license-key) in the [Authorization](/minfraud/working-with-transaction-dispositions/index.md#authorization-and-security) header. |
| ACCOUNT_ID_REQUIRED | 401 Unauthorized | You have not supplied a [MaxMind account ID](https://support.maxmind.com/knowledge-base/articles/find-your-maxmind-account-id) in the [Authorization](/minfraud/working-with-transaction-dispositions/index.md#authorization-and-security) header. |
| PERMISSION_REQUIRED | 403 Forbidden | You do not have permission to use the service. Please [contact our support team](https://support.maxmind.com/knowledge-base) for more information. |
| (none) | 429 Too Many Requests | MaxMind rate-limited the request, usually because of excessive earlier error responses. The response may not include a JSON body. |
| SERVER_ERROR | 500 Internal Server Error | There was an error when processing this request. |
| (none) | 503 Service Unavailable | There is a problem with the web service server. You can try this request again later. |
### Example response to an unsuccessful request
```json
{
"code": "ACCOUNT_ID_REQUIRED",
"error": "An account ID and license key are required to use this service."
}
```
# Contribute to the MaxMind Community
Source: https://dev.maxmind.com/contribute/
We welcome the efforts of our community of users to develop robust, unofficial
tools for use with our products and services. One of the reasons that we keep
our APIs open is to encourage development and collaboration as you put our data
to use.
## Getting Started
Before you begin developing tools for use across the community, you should fully
familiarize yourself with the relevant official APIs and specifications:
- [minFraud service REST API](/minfraud/api-documentation/index.md)
- [GeoIP and GeoLite service REST API](/geoip/docs/web-services/index.md)
- [OpenAPI specifications for MaxMind web services](https://github.com/maxmind/openapi)
- [GeoIP and GeoLite MMDB format specification](https://github.com/maxmind/MaxMind-DB/blob/main/MaxMind-DB-spec.md)
You may also want to look at some of the unofficial APIs that we’ve featured.
While MaxMind does not support or maintain unofficial APIs, you can get a
feeling for the quality of contributions that we feature:
- [minFraud service Magento 2 Plugin](https://weltpixel.com/products/magento2-maxmind-fraud-prevention-minfraud)
- [GeoIP and GeoLite web services Unofficial APIs](/geoip/docs/web-services/index.md#third-party-client-apis)
- [GeoIP and GeoLite database Unofficial APIs](/geoip/docs/databases/index.md#unofficial-client-apis)
- [GeoIP and GeoLite database Unofficial Integrations (for MMDB format)](/geoip/docs/databases/index.md#unofficial-integrations)
You can also peruse our organization and projects on GitHub to get a sense of
how we develop for MaxMind’s products and services. Some good examples to look
at are:
- [Ruby MMDB Reader](https://github.com/maxmind/MaxMind-DB-Reader-ruby)
- [minFraud .NET API](https://github.com/maxmind/minfraud-api-dotnet)
## What Tools are Useful to Build
Well-developed client APIs in languages we don’t already support are especially
useful. We also appreciate efforts to develop plugins for popular content
management systems, as well as analytics and shopping cart software. In order
for your tools to be featured on our developer portal, they must work with one
of our paid products or services (GeoIP or minFraud). GeoLite databases and
service integrations should be compatible with GeoIP products and services with
minor modifications.
## Sharing Your Tools
If you would like us to feature an API or tool that you’ve developed for use
with our products and services, please
[contact our support team](https://support.maxmind.com/knowledge-base) with a
brief description of the tool and a link to the code and documentation. We do
not guarantee that we will feature all contributions on our site, but we’re
always interested to see what you come up with.
## Refer Users to MaxMind
If you develop a useful third-party integration built to use MaxMind data, you
may be interested in referring your users to MaxMind through our Affiliate
Program.
You can
[learn more about the MaxMind Affiliate Program for developers on our Knowledge Base](https://support.maxmind.com/knowledge-base/account-and-purchasing#affiliate-program),
including how to apply.
# License Key Validation API
Source: https://dev.maxmind.com/license-key-validation-api/
MaxMind provides a License Key Validation API, a tool for developers and
organizations seeking to verify the validity of MaxMind license keys within
their systems. This API endpoint is designed to check the existence and the
format of a license key. It does not provide information about the license key's
access to MaxMind products or the account to which it is associated. Using other
endpoints to check for the validity of a license key would fail as accounts have
access to particular services only.
You can use this API for building tools to scan your code for secrets to ensure
that secrets are not published in improper locations. One example of such a tool
is [trufflehog](https://github.com/trufflesecurity/trufflehog). Using such a
tool, you can prevent license keys accidentally ending up in unexpected places
and enhance the security of your applications.
You can use the
[License Key Validation OpenAPI specification](https://github.com/maxmind/openapi/blob/main/bundled/license-key-validation.yaml)
([raw file](https://raw.githubusercontent.com/maxmind/openapi/main/bundled/license-key-validation.yaml))
with API tools and code generators.
## Request
### Request URI
API calls should be made with an HTTP POST request to:
`https://secret-scanning.maxmind.com/secrets/validate-license-key`
### Authorization/Security
There is no authorization needed for this endpoint. The request is made using
the license key itself.
### Request Body
The Content Type of the request must be `application/x-www-form-urlencoded`. No
other content types are accepted at the moment.
The request body must include the following field:
| Key | Value Type | Description |
| ------------- | ---------- | ------------------------------------------------------------------------------- |
| `license_key` | string | The `license_key` field must contain the license key that you want to validate. |
If the body has no `license_key` field, the server returns `400 Bad Request`
with the code `LICENSE_KEY_INVALID`.
Here is an example of how to make the request using curl:
```bash
curl https://secret-scanning.maxmind.com/secrets/validate-license-key \
-d "license_key=your_license_key_here"
```
Please replace "your_license_key_here" with the actual license key you want to
validate.
## Response
HTTP status codes are used to relay success and error messages. A successful
POST will return a 204 (No Content) status code.
When the server returns an error (4xx or 5xx), the response may include a JSON
document in the body. This document is a single object with the keys `code` and
`error`. The `code` field is a static error code for machine use. The value of
any given code will never change, though codes can be added or removed. The
`error` field is a human-readable description of the error and may change at any
time.
### Response Body (for successful requests)
When the license key is successfully validated, the server will return a status
of `204 No Content`.
### Response Body (for unauthorized license keys)
When the license key is in the correct format but could not be validated in our
database, the server will return a JSON object with the following structure:
```json
{
"code": "AUTHORIZATION_INVALID",
"error": "Your account ID or license key could not be authenticated."
}
```
The HTTP status will be `401 Unauthorized`.
### Response Body (for unsuccessful requests)
In the event of an error occurring such as a bad request that has a license key
with a bad format, the server will return a JSON object with the following
structure:
```json
{
"code": "LICENSE_KEY_INVALID",
"error": "'foo-bad-license-key' is not a valid license_key when calling /secrets/validate-license-key."
}
```
The HTTP status will be a `400 Bad Request`.
### Response Body (for accounts without permission)
If the account that owns the license key does not have permission to use this
service, the server returns a JSON object with the following structure:
```json
{
"code": "PERMISSION_REQUIRED",
"error": "You do not have permission to use this service interface."
}
```
The HTTP status will be `403 Forbidden`. This response means that MaxMind
recognizes the license key. An unknown key gets a `401 Unauthorized` response
instead.
### Response Body (for large requests)
If the request body is larger than 65,536 bytes, the server returns a
`413 Content Too Large` status. The response does not have a JSON body.
### Response Body (for server errors)
If MaxMind cannot process the request, the server returns a JSON object with the
code `SERVER_ERROR` and a `500 Internal Server Error` status. You may also
receive a `503 Service Unavailable` status, which does not have a JSON body. In
both cases, you can try the request again later.
# MaxMind Server IP Addresses
Source: https://dev.maxmind.com/maxmind-server-ip-addresses/
> **⚠️ Warning**
>
> In January 2024, we began using R2 presigned URLs for all
> database downloads. Database downloads will no longer use the IP addresses
> specified below.
>
> For information about IP addresses used to serve database downloads see
> [the appropriate section below](/maxmind-server-ip-addresses/index.md#database-download-ip-addresses).
>
> [Read our release note for more information.](/geoip/release-notes/2024-01-17-presigned-urls-for-database-downloads/index.md)
This page lists the IP addresses that may be used for minFraud, GeoIP, and
GeoLite web service requests by our \*.maxmind.com API hostnames. We strongly
encourage you to use DNS rather than hardcode our IPs. Not all IPs listed on
this page will be in use at a given time. The IPs returned in DNS could change
at any time. Note that the IPs below don’t apply to the `www.maxmind.com`
hostname, which could use any IP and changes frequently.
- 162.159.134.22
- 162.159.135.22
- 2606:4700:7::a29f:8616
- 2606:4700:7::a29f:8716
Last updated: October 10, 2023 10:10 AM -04:00
## Monitoring Changes
MaxMind provides [**RSS**](/maxmind-server-ip-addresses/index.xml) and
[**JSON**](/maxmind-server-ip-addresses.json) feeds, allowing you to monitor
changes to our minFraud, GeoIP, and GeoLite web service server IP addresses.
## Database download IP addresses
MaxMind uses Cloudflare to serve our GeoIP and GeoLite database downloads.
[You can view a list of Cloudflare IP ranges that may be used to serve MaxMind database downloads on their website.](https://www.cloudflare.com/ips/)
Cloudflare also maintains
[an API that can be used to retrieve the list of Cloudflare IP ranges](https://developers.cloudflare.com/api/resources/ips/methods/list/).