ipinfo.mmdb.gz
The full record, as MaxMind DB (IPv4 and IPv6)
- Best for
- Lookups inside your app: one address in, one record out, in microseconds.
- Open with
- Any MaxMind reader: maxminddb (Python), maxmind (Node), geoip2, mmdbctl
Parts catalogue
Every file of this week’s release, with its size, row count and SHA-256. Same data as the API. Keep it, query it offline, ship it inside your product.
01 · Main release
Everything we know about every range, in five formats, each one gzipped. Start with the MMDB if you just need lookups.
The full record, as MaxMind DB (IPv4 and IPv6)
Flat columns, one row per range
Nested JSON record per range
Normalised tables, views and an ASN profile table
CREATE TABLE + INSERT for SQLite, PostgreSQL and MySQL
Every file is gzipped to keep downloads fast: 9.5 GB for the whole release. Unpack with gunzip (or zcat to stream).
02 · Networks
One row or object per AS: owner, registry identity, rank, neighbours, RPKI, abuse rate, PeeringDB data.
One row per autonomous system
One JSON profile per autonomous system
03 · Focused databases
Subsets of the full record for one job. Smaller files, same release, same accuracy.
| Database | MMDB | CSV |
|---|---|---|
| abuseAbuse contact per range9,041,478 rows | ||
| asn-ipASN, route and RPKI per range1,488,551 rows | ||
| carrierMobile carrier ranges30,498 rows | ||
| companyRegistered owner of each block9,653,085 rows | ||
| country-asnCountry and ASN1,257,842 rows | ||
| countryCountry only890,727 rows | ||
| datacenterHosting and cloud ranges1,661,035 rows | ||
| geolocationLocation fields only7,782,489 rows | ||
| hosted-domainsPopular domains served from each range1,058,094 rows | ||
| privacyVPN, proxy, Tor, relay and hosting flags only5,139,115 rows | ||
| zipliteThe short answer: company, country, city, ASN, flags, threat16,353,514 rows |
04 · GeoLite2 drop-in
Our country, geolocation and ASN files are MaxMind DB (MMDB) files, like GeoLite2: the nginx module and the MaxMind DB readers you already use open them as they are. Point them at our file, rename a few fields, done.
# ngx_http_geoip2_module
# GeoLite2-Country.mmdb → country.mmdb
# country iso_code → country_code
geoip2 /etc/nginx/country.mmdb {
$geoip2_country_code country_code;
}
# GeoLite2-City.mmdb → geolocation.mmdb
# city names en → city
geoip2 /etc/nginx/geolocation.mmdb {
$geoip2_city city;
}
# pip install maxminddb
import maxminddb
# GeoLite2-City.mmdb → geolocation.mmdb
db = maxminddb.open_database('geolocation.mmdb')
rec = db.get('8.8.8.8')
# ['country']['iso_code'] → ['country_code'], ['city']['names']['en'] → ['city']
print(rec['country_code'], rec.get('city'))
// npm i maxmind
import maxmind from 'maxmind';
// GeoLite2-ASN.mmdb → asn-ip.mmdb
const db = await maxmind.open('asn-ip.mmdb');
const rec = db.get('8.8.8.8');
// autonomous_system_number → asn, autonomous_system_organization → as_name
console.log(rec.asn, rec.as_name);
curl -LO https://ipinfo.zip/download/country.mmdb
curl -LO https://ipinfo.zip/download/geolocation.mmdb
curl -LO https://ipinfo.zip/download/asn-ip.mmdb
# crontab (UTC): 0 6 * * 1
| GeoLite2 path | IPINFO.ZIP field |
|---|---|
| country. | country_ |
| country. | country |
| continent. | continent_ |
| continent. | continent |
| country. | is_ |
| GeoLite2 path | IPINFO.ZIP field |
|---|---|
| country. | country_ |
| subdivisions[0]. | region |
| city. | city |
| city. | geoname_ |
| postal. | postal |
| location. | latitude |
| location. | longitude |
| location. | timezone |
| location. | accuracy_ |
| GeoLite2 path | IPINFO.ZIP field |
|---|---|
| autonomous_ | asn |
| autonomous_ | as_ |
05 · Usage
The MMDB works with every MaxMind reader. The CSV and NDJSON work with anything. The SQLite file has a view that joins everything.
# pip install maxminddb (after: gunzip ipinfo.mmdb.gz)
import maxminddb
with maxminddb.open_database('ipinfo.mmdb') as db:
ip = db.get('8.8.8.8')
print(ip['location']['country_code'], ip['asn']['asn'])
// npm i maxmind (after: gunzip ipinfo.mmdb.gz)
import maxmind from 'maxmind';
const db = await maxmind.open('ipinfo.mmdb');
const ip = db.get('8.8.8.8');
console.log(ip.location.country_code, ip.asn.asn);
// go get github.com/oschwald/maxminddb-golang/v2
db, err := maxminddb.Open("ipinfo.mmdb")
if err != nil {
log.Fatal(err)
}
defer db.Close()
var rec map[string]any
db.Lookup(netip.MustParseAddr("8.8.8.8")).Decode(&rec)
fmt.Println(rec["location"])
<?php
// composer require maxmind-db/reader
require 'vendor/autoload.php';
$db = new MaxMind\Db\Reader('ipinfo.mmdb');
$ip = $db->get('8.8.8.8');
echo $ip['location']['country_code'], ' ', $ip['asn']['asn'];
-- gunzip -k ipinfo.sqlite.gz && sqlite3 ipinfo.sqlite
SELECT * FROM ip_ranges
WHERE end_int >= 134744072 -- 8.8.8.8 as an integer
ORDER BY end_int LIMIT 1;
curl -LO https://ipinfo.zip/download/ipinfo.mmdb.gz
echo "df6faaa49803e1f68479a354171919be605384440c6ee47e1c699c55afc6e1c4 ipinfo.mmdb.gz" | sha256sum -c
gunzip ipinfo.mmdb.gz
mmdbctl read 8.8.8.8 ipinfo.mmdb
zcat ipinfo.csv.gz | head -3
zcat ipinfo.ndjson.gz | jq -c 'select(.is_tor)' | head
06 · Record layout
The MMDB, NDJSON and API share the same nested record. The CSV flattens it into columns.
| Field | Type | Description |
|---|---|---|
| ip | string | The address you asked about, normalised (IPv6 compressed, IPv4-mapped unwrapped). |
| network | string | CIDR of the smallest range in the database that contains the address. |
| type | string | IPv4 or IPv6. |
| tags | string[] | Every true is_* flag as a short tag, in a fixed order (e.g. hosting, vpn, tor). |
| is_bogon | boolean | Reserved, private, documentation or unallocated space that should never appear on the internet. |
| is_announced | boolean | The covering prefix was visible in the global BGP table when this week's release was built. |
| is_datacenter | boolean | Hosting, cloud, colocation or CDN space. |
| is_cloud_provider | boolean | Published ranges of a public cloud (AWS, Google Cloud, Azure, Oracle…). |
| is_mobile | boolean | Cellular network (mobile carrier geofeed, carrier tag or mobile-only operator). |
| is_satellite | boolean | Satellite internet access (e.g. Starlink). |
| is_anycast | boolean | Anycast prefix: the same address is served from many places. |
| is_ixp | boolean | Internet exchange peering LAN. |
| is_crawler | boolean | Published ranges of a search engine, AI crawler or uptime monitor. |
| is_scanner | boolean | Known internet-wide scanner (research or commercial). |
| is_vpn | boolean | VPN exit server, from provider server lists and resolved hostnames. |
| is_proxy | boolean | Open or public proxy seen on proxy lists. |
| is_residential_proxy | boolean | Residential address seen relaying bot or proxy traffic recently. |
| is_tor | boolean | Tor relay (exit or not). |
| is_relay | boolean | Privacy relay egress (iCloud Private Relay, Cloudflare WARP…). |
| is_anonymous | boolean | Any of VPN, proxy, Tor or relay. |
| is_abuser | boolean | Listed by at least one abuse or blocklist feed in the last 30 days. |
| is_attacker | boolean | Listed for attacks: brute force, exploitation, scanning or botnet control. |
| is_threat | boolean | Threat score of 50 or more. |
| is_drop | boolean | Inside a Spamhaus DROP netblock or an ASN-DROP network. |
| is_mail_blocklisted | boolean | On a mail blocklist that lists the address itself (UCEPROTECT level 1, PSBL, blocklist.de mail). Network-wide listings do not set it. |
| is_leased | boolean | Leased (rented) address space: registered to one holder, announced and used by another network, often through a leasing marketplace such as IPXO. |
| usage_type | string | IP2Location-style code: DCH, CDN, ISP, MOB, COM, ORG, EDU, GOV, MIL, LIB, SES or RSV. |
| connection_type | string | How the address connects: Cable/DSL, Cellular, Satellite or Corporate. |
| user_type | string | Who uses it: residential, business, hosting, cellular, college, government, military, consumer_privacy_network, content_delivery_network or search_engine_spider. |
| rir | string | Regional internet registry: ARIN, RIPE, APNIC, LACNIC or AFRINIC. |
| hostname | string | Known server name (VPN or Tor servers only; there is no PTR crawl). |
| location.country_code | string | ISO 3166-1 alpha-2 country code. |
| location.country | string | Country name in English. |
| location.continent | string | Two-letter continent code. |
| location.state | string | State, region or province. |
| location.city | string | City. |
| location.zip | string | Postal code, when a source gives one. |
| location.latitude | number | Latitude in decimal degrees. |
| location.longitude | number | Longitude in decimal degrees. |
| location.accuracy | string | Placement confidence from the agreement between sources: COUNTRY (no city), LOW, MEDIUM, HIGH or VERY_HIGH. |
| location.accuracy_radius | number | Radius in km within which the address most likely sits. |
| location.timezone | string | IANA time zone. |
| location.local_time | string | Current local time with UTC offset (added by the API). |
| location.is_eu_member | boolean | Country is in the European Union. |
| location.currency_code | string | ISO 4217 currency of the country. |
| location.calling_code | string | International calling code. |
| asn.asn | integer | Autonomous system number announcing the address. |
| asn.name | string | Short AS name. |
| asn.org | string | Organisation holding the AS. |
| asn.domain | string | Main domain of the AS operator. |
| asn.country | string | Country the AS is registered in. |
| asn.type | string | isp, hosting, business, education, government or banking. |
| asn.rir | string | Registry of the AS. |
| asn.registered | string | Date the AS number was assigned (YYYY-MM-DD). |
| asn.rank | integer | Global rank by customer cone size (1 = largest). |
| asn.abuser_score | number | Share of the AS addresses on abuse lists (0..1). |
| asn.abuser_level | string | Label of the AS abuse rate: Very Low, Low, Elevated, High or Very High. |
| asn.route | string | Announced prefix covering the address. |
| asn.rpki_status | string | Route origin validation: valid, invalid or unknown. |
| company.name | string | Organisation the block is registered to (registry whois / RDAP). |
| company.domain | string | Main domain of that organisation. |
| company.type | string | isp, hosting, business, education, government or banking. |
| company.network | string | The registered block (start - end). |
| company.netname | string | Registry network name. |
| company.abuser_score | number | Share of the block on abuse lists (0..1). |
| company.abuser_level | string | Label of the block abuse rate: Very Low, Low, Elevated, High or Very High. |
| abuse.name | string | Abuse contact name. |
| abuse.email | string | Abuse contact e-mail. |
| abuse.phone | string | Abuse contact phone. |
| abuse.address | string | Abuse contact postal address. |
| registry.rir | string | Registry that delegated the block. |
| registry.allocated | string | Date of delegation. |
| registry.status | string | allocated or assigned. |
| registry.registrant.name | string | Registrant of the IP block. |
| routing.route | string | Announced BGP prefix. |
| routing.origin_asns | integer[] | Origin AS numbers (several when the prefix is multi-origin). |
| routing.rpki_status | string | Route origin validation against published ROAs. |
| routing.visibility | number | Share of RIPE RIS peers that see the route (0..1). |
| routing.first_seen | string | First day the prefix was seen announced. |
| routing.last_seen | string | Last day the prefix was seen announced. |
| threat.score | integer | 0–100, weighted from blocklists, DROP, Tor exits and abuse reports. |
| threat.level | string | none, low, medium, high or critical. |
| threat.categories | string[] | attacker, bruteforce, botnet_c2, spam, malware, compromised, malicious_network… |
| abuser.lists | string[] | Blocklists that currently list the address. |
| mail_blocklists | string[] | Mail blocklists that list the address, including network-wide listings (UCEPROTECT level 2) that only describe its neighbourhood. |
| privacy.service | string | VPN or relay brand when known. |
| datacenter.datacenter | string | Hosting or cloud provider name. |
| datacenter.region | string | Cloud region when published. |
| vpn.service | string | VPN brand. |
| vpn.type | string | How the VPN exit was detected: enumerated (provider list), observed, interpolated or whois. |
| proxy.type | string | open, public, http, https, socks, residential or tunnel. |
| tor.exit | boolean | The Tor relay allows exit traffic. |
| relay.service | string | Privacy relay operator. |
| carrier.name | string | Mobile carrier. |
| carrier.mcc | string | Mobile country code. |
| carrier.mnc | string | Mobile network code. |
| crawler.name | string | Crawler or monitor name. |
| scanner.name | string | Scanner organisation. |
| drop.sblid | string | Spamhaus SBL reference of the DROP entry. |
| lease.broker | string | Leasing marketplace or lessor named in the registry object (e.g. IPXO), when known. |
| lease.network | string | The leased block as registered (the lessee's sub-allocation). |
| lease.registry_country | string | Country of the holder's allocation. For leased space it often differs from where the block is used. |
| lease.holder_country | string | Country written on the leased block's own registry object (IPXO uses EU). |
| abuse_density.subnet24_ips | integer | Announced addresses in this address's /24. |
| abuse_density.subnet24_abusive | integer | Addresses of this /24 flagged as abusive (abuser, attacker, threat, DROP or mail blocklist). |
| abuse_density.subnet24_abusive_share | number | subnet24_abusive / subnet24_ips, from 0 to 1. |
| abuse_density.asn_ips | integer | Announced IPv4 addresses of the origin AS. |
| abuse_density.asn_abusive | integer | IPv4 addresses of the origin AS flagged as abusive. |
| abuse_density.asn_abusive_share | number | asn_abusive / asn_ips, from 0 to 1. |
| release | string | Release date of the dataset that answered (YYYY-MM-DD). |
| elapsed_ms | number | Server-side lookup time in milliseconds. |
MMDB compaction: false booleans, null fields and the tags list are omitted; the API restores them.