IP Geolocation Compact — MMDB
On this page
City-level IP geolocation as a single binary database you query by IP address with any standard MMDB reader. One file answers both IPv4 and IPv6. Each record carries a location, a confidence area, and cellular and hosting signals. Lookup files in the same ZIP turn the IDs into coordinates, place names in 10 languages and polygons.
- Format MMDB
- Archive
bigdatacloud-compact-mmdb.zip - 16 files
- IPv4 + IPv6 in one file
- Updated daily
At a glance
- A lookup returns
LocationId,ConfidenceAreaId,IsCellular,HostingLikelihood,ConfidenceScoreandDeploymentExtentKmfor the range containing the IP.Locations.csv,ConfidenceAreas.csvand place names in 10 languages (German, English, Spanish, French, Italian, Japanese, Korean, Portuguese, Russian and Chinese), compiled and maintained by BigDataCloud, are in the same ZIP and turn the IDs into coordinates, place names and polygons. Each language falls back to the English name where a translation isn't published.- What it's for
City-level location inside your internal systems, with no API call per lookup.
- Other packages add
BGP prefixes, RIR registry ranges and an ASN per IP in Network Data (see Network MMDB); hyper-local, in-city location on wired networks, each ASN's most active operational area, and proxy, Tor and VPN lists in Complete (see Complete MMDB).
- Scale
Tens of millions of IPv4 and IPv6 ranges.
Manifest.csvhas the exact counts for each release.- Licence
Flat Data Standard Licence: internal use by your company and its employees only.
Files in the archive
| File | What it holds | Key / join column |
|---|---|---|
bigdatacloud-compact.mmdb | One record per Compact range, for IPv4 and IPv6 | Lookup by IP; record keys LocationId, ConfidenceAreaId |
Locations.csv | Coordinates, ISO codes, GeoNames IDs, postcode and time zone per location | LocationId |
ConfidenceAreas.csv | Confidence area polygon (WKT) per area | ConfidenceAreaId |
Geonames-{lang}.csv × 10 | Place names by GeoNames ID, one file per language: de, en, es, fr, it, ja, ko, pt, ru, zh | GeonamesId |
README.txt | Package overview and links | — |
Manifest.csv | Build time, data timestamps, row totals and distributions, then one row per other file in that ZIP, including NOTICE.txt where present, with its byte count | — |
NOTICE.txt | Third-party data attributions | — |
Keys
bigdatacloud-compact.mmdb
Compact
The database maps each IP range to its record, so a lookup returns the keys below directly; there are no range keys.
| Key | Type | Example | Description |
|---|---|---|---|
LocationId | integer | 150626 | Key into Locations.csv in this ZIP. Supplied where collected network information is statistically significant. |
ConfidenceAreaId | integer | 1742 | Key into ConfidenceAreas.csv in this ZIP. Supplied where collected network information is statistically significant. |
IsCellular | boolean | false | true if the network appears to be cellular. |
HostingLikelihood | integer | 0 | Likelihood, from 0 to 10, that the IP is in a hosting or datacentre environment rather than a residential or mobile network. Higher values mean a greater likelihood of non-human or automated use. See Understanding the Hazard Report. |
ConfidenceScore | integer | 3 | How reliable the location estimate is, from 0 to 5: 0–1 Low, 2–3 Medium, 4–5 High. It reflects how closely our service-area estimate matches real-world observations; High is the most reliable. It says nothing about the size of the confidence area. See Understanding the confidence value. |
DeploymentExtentKm | integer | 250 | Typical spread, in km, of where this network's dynamically assigned addresses are used about 80% of the time. It isn't an error radius; use the confidence area for the full footprint. Supplied only where collected network information is statistically significant. |
Lookup files
Compact
Locations.csv, ConfidenceAreas.csv, Geonames-{lang}.csv and Manifest.csv are defined in the Lookup files reference: Locations · ConfidenceAreas · Geonames · Manifest.
How the files join
- bigdatacloud-compact.mmdb: LocationId → Locations.csv LocationId (optional)
- bigdatacloud-compact.mmdb: ConfidenceAreaId → ConfidenceAreas.csv ConfidenceAreaId (optional)
- Locations.csv: SubdivisionGeonamesId → Geonames-{lang}.csv GeonamesId (optional)
- Locations.csv: CityGeonamesId → Geonames-{lang}.csv GeonamesId (optional)
- Locations.csv: LocalityGeonamesId → Geonames-{lang}.csv GeonamesId (optional)
| From | Key | To (in this ZIP) |
|---|---|---|
bigdatacloud-compact.mmdb record | LocationId | Locations.csv LocationId |
bigdatacloud-compact.mmdb record | ConfidenceAreaId | ConfidenceAreas.csv ConfidenceAreaId |
Locations.csv | SubdivisionGeonamesId,CityGeonamesId,LocalityGeonamesId | Geonames-{lang}.csv GeonamesId |
Manifest.csv describes the release, and NOTICE.txt holds third-party data attributions.
To geolocate an IP: look it up in bigdatacloud-compact.mmdb, then join LocationId to Locations.csv (and its GeoNames IDs to the language file you need) and ConfidenceAreaId to ConfidenceAreas.csv.
Sample data
Sample records from the 11 October 2026 release. Values change with each daily update.
139.130.4.5 {"LocationId": 150626, "ConfidenceAreaId": 1742, "IsCellular": false, "HostingLikelihood": 0, "ConfidenceScore": 3}
1.37.82.10 {"LocationId": 2001, "ConfidenceAreaId": 690, "IsCellular": true, "HostingLikelihood": 0, "ConfidenceScore": 4, "DeploymentExtentKm": 250}
2001:8000::1 {"LocationId": 2319, "ConfidenceAreaId": 221465, "IsCellular": false, "HostingLikelihood": 0, "ConfidenceScore": 4, "DeploymentExtentKm": 1000}
2001:1890:152a:5b00::1 {"LocationId": 59587, "ConfidenceAreaId": 221659, "IsCellular": false, "HostingLikelihood": 0, "ConfidenceScore": 2}
192.168.1.1 no recordEach record carries only the keys that hold a value. DeploymentExtentKm is supplied where collected network information is statistically significant, as for 1.37.82.10 and 2001:8000::1. Joined, 139.130.4.5 resolves to AU, AU-VIC, Melbourne (-37.82, 145.16), confidence area 1742, and 1.37.82.10 to Meycauayan, PH-03, Philippines.
Behaviour and edge cases
- Supplied keys
Each record carries the keys that apply to it, and each key description says when it is supplied. Check that a key is present before you use it.
- Private and reserved addresses
Addresses such as
10.0.0.0/8,127.0.0.0/8,100.64.0.0/10,169.254.0.0/16,192.168.0.0/16,::1andfc00::/7return no record.- IPv4 and IPv6
One file answers both. IPv4 lives at
::/96, so::a.b.c.dand IPv4-mapped::ffff:a.b.c.daddresses answer from the IPv4 data (::ffff:139.130.4.5returns the same record as139.130.4.5).- IDs belong to the package
LocationIdandConfidenceAreaIdare specific to Compact and to each release, so join them only to lookup files from the same download. GeoNames IDs are the same in every package.- File conventions
The lookup files in this ZIP are UTF-8 with CRLF line endings,
Manifest.csvincluded. TheGeonames-*.csvfiles start with a BOM, so use a BOM-aware reader. MMDB metadata:database_typeisBigDataCloud-Compact, andbuild_epochis the same moment asBuild CompleteinManifest.csv. Full lists: lookup file conventions and MMDB conventions.
Download
Download from your BigDataCloud account, or automate it with your API key:
curl -fL -o bigdatacloud-compact-mmdb.zip "https://www.bigdatacloud.com/download?package=compact&format=mmdb&key=YOUR_API_KEY"Prefer not to put the key in URLs?
Send the key in the x-bdc-key header and download in two steps: read the link from the Location header, then fetch it without your key.
URL=$(curl -s -D - -o /dev/null -H 'x-bdc-key: YOUR_API_KEY' \
"https://www.bigdatacloud.com/download?package=compact&format=mmdb" \
| awk 'tolower($1)=="location:" { sub(/\r$/, "", $2); print $2 }')
curl -fo bigdatacloud-compact-mmdb.zip "${URL:?no download link: check the key and package}"Don't add -L to this command: curl would send your key on with the download.
This saves bigdatacloud-compact-mmdb.zip (files). Scheduling, checksums and parameters: Downloads & automation.
Updates and integrity
- Updated daily. Download on any schedule that suits you; updates are included in your subscription.
Manifest.csvrecords the build time (Build Complete), the data timestamps and the row totals, then one row per other file in that ZIP, includingNOTICE.txtwhere present, with its byte count, so you can check a complete download and load. To check the ZIP itself, see Check a download.
Code samples
Look up one IP and join to place names (Python). Install a reader with pip install maxminddb. Loading Locations.csv into a dictionary like this uses a lot of memory; for production, load the lookup files into a database or key-value store.
import csv
import maxminddb
def load_csv(path, key):
# utf-8-sig skips the byte-order mark some files start with
with open(path, newline="", encoding="utf-8-sig") as f:
return {row[key]: row for row in csv.DictReader(f)}
# Lookup files from this ZIP
locations = load_csv("Locations.csv", "LocationId")
names = load_csv("Geonames-en.csv", "GeonamesId")
with maxminddb.open_database("bigdatacloud-compact.mmdb") as db:
record = db.get("139.130.4.5") # None for private or reserved addresses
if record and "LocationId" in record:
loc = locations[str(record["LocationId"])]
city = names.get(loc["CityGeonamesId"], {}).get("Name")
print(loc["CountryIso"], loc["SubdivisionIso"], city,
loc["Latitude"], loc["Longitude"], record.get("ConfidenceAreaId"))
# AU AU-VIC Melbourne -37.82 145.16 1742MMDB reader libraries are available for most languages, and they all work the same way: open the file, look up the IP, read the keys.