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, ConfidenceScore and DeploymentExtentKm for the range containing the IP. Locations.csv, ConfidenceAreas.csv and 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.csv has the exact counts for each release.

Licence

Flat Data Standard Licence: internal use by your company and its employees only.

Files in the archive

FileWhat it holdsKey / join column
bigdatacloud-compact.mmdbOne record per Compact range, for IPv4 and IPv6Lookup by IP; record keys LocationId, ConfidenceAreaId
Locations.csvCoordinates, ISO codes, GeoNames IDs, postcode and time zone per locationLocationId
ConfidenceAreas.csvConfidence area polygon (WKT) per areaConfidenceAreaId
Geonames-{lang}.csv × 10Place names by GeoNames ID, one file per language: de, en, es, fr, it, ja, ko, pt, ru, zhGeonamesId
README.txtPackage overview and links—
Manifest.csvBuild 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.txtThird-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.

KeyTypeExampleDescription
LocationIdinteger150626Key into Locations.csv in this ZIP. Supplied where collected network information is statistically significant.
ConfidenceAreaIdinteger1742Key into ConfidenceAreas.csv in this ZIP. Supplied where collected network information is statistically significant.
IsCellularbooleanfalsetrue if the network appears to be cellular.
HostingLikelihoodinteger0Likelihood, 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.
ConfidenceScoreinteger3How 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.
DeploymentExtentKminteger250Typical 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

README.txt gives an overview of the package. Manifest.csv is release metadata. NOTICE.txt holds third-party data attributions.bigdatacloud-compact.mmdbrecordPKIP lookupFKLocationId?FKConfidenceAreaId?IsCellularHostingLikelihoodConfidenceScoreDeploymentExtentKmLocations.csvPKLocationIdFKSubdivisionGeonamesId?FKCityGeonamesId?FKLocalityGeonamesId?+7 more columnsGeonames-{lang}.csv× 10 languagesPKGeonamesIdNameConfidenceAreas.csvPKConfidenceAreaIdGeometryWktREADME.txtpackage overviewManifest.csvrelease metadataDescription+4 more columnsNOTICE.txtthird-party data attributionsLocationIdConfidenceAreaIdGeonamesId
README.txt gives an overview of the package.Manifest.csv is release metadata. NOTICE.txtholds third-party data attributions.bigdatacloud-compact.mmdbrecordPKIP lookupFKLocationId?FKConfidenceAreaId?IsCellularHostingLikelihoodConfidenceScoreDeploymentExtentKmLocations.csvPKLocationIdFKSubdivisionGeonamesId?FKCityGeonamesId?FKLocalityGeonamesId?+7 more columnsGeonames-{lang}.csv× 10 languagesPKGeonamesIdNameConfidenceAreas.csvPKConfidenceAreaIdGeometryWktREADME.txtpackage overviewManifest.csvrelease metadataDescription+4 more columnsNOTICE.txtthird-party data attributionsLocationIdConfidenceAreaIdGeonamesId
PK primary keyFK foreign key (? = optional) many zero or one
FromKeyTo (in this ZIP)
bigdatacloud-compact.mmdb recordLocationIdLocations.csv LocationId
bigdatacloud-compact.mmdb recordConfidenceAreaIdConfidenceAreas.csv ConfidenceAreaId
Locations.csvSubdivisionGeonamesId,CityGeonamesId,LocalityGeonamesIdGeonames-{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 record

Each 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, ::1 and fc00::/7 return no record.

IPv4 and IPv6

One file answers both. IPv4 lives at ::/96, so ::a.b.c.d and IPv4-mapped ::ffff:a.b.c.d addresses answer from the IPv4 data (::ffff:139.130.4.5 returns the same record as 139.130.4.5).

IDs belong to the package

LocationId and ConfidenceAreaId are 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.csv included. The Geonames-*.csv files start with a BOM, so use a BOM-aware reader. MMDB metadata: database_type is BigDataCloud-Compact, and build_epoch is the same moment as Build Complete in Manifest.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.csv records the build time (Build Complete), the data timestamps and the row totals, then one row per other file in that ZIP, including NOTICE.txt where 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 1742

MMDB reader libraries are available for most languages, and they all work the same way: open the file, look up the IP, read the keys.

Related