IP Geolocation Compact — CSV

On this page

City-level IP geolocation as a set of CSV tables you load into your own database or pipeline. Each IPv4 and IPv6 range 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 CSV
  • Archive bigdatacloud-compact-csv.zip
  • 17 files
  • IPv4 + IPv6
  • Updated daily

At a glance

What's in it

IP ranges with LocationId, ConfidenceAreaId, IsCellular, HostingLikelihood, ConfidenceScore and DeploymentExtentKm; locations; confidence areas; place names in 10 languages (German, English, Spanish, French, Italian, Japanese, Korean, Portuguese, Russian and Chinese), compiled and maintained by BigDataCloud. Each language falls back to the English name where a translation isn't published.

What it's for

City-level location for your company's own fraud checks, analytics and reporting.

Other packages add

BGP prefixes, RIR registry ranges and an ASN per IP in Network Data (see Network CSV); 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 CSV).

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
Ranges-IPv4.csvIPv4 ranges with location, confidence area and network signalsLocationId,ConfidenceAreaId
Ranges-IPv6.csvIPv6 ranges, same columnsLocationId,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—

Fields

Ranges-IPv4.csv / Ranges-IPv6.csv

Compact

One row per IP range. Both files have the same columns.

FieldTypeExampleDescription
RangeStartip139.130.4.0First address in the range (inclusive). IPv4 in dotted-quad form; IPv6 in compressed text form (2001:8000::).
RangeEndip139.130.4.31Last address in the range (inclusive). Same notation.
LocationIdint150626Key into Locations.csv. Supplied where collected network information is statistically significant.
ConfidenceAreaIdint1742Key into ConfidenceAreas.csv. Supplied where collected network information is statistically significant.
IsCellularboolFalseTrue if the network appears to be cellular.
HostingLikelihoodint0Likelihood, 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.
ConfidenceScoreint3How 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.
DeploymentExtentKmint250Typical 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.Ranges-IPv4.csvRanges-IPv6.csvsame schemaRangeStartRangeEndFKLocationId?FKConfidenceAreaId?+4 more columnsLocations.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.Ranges-IPv4.csvRanges-IPv6.csvsame schemaRangeStartRangeEndFKLocationId?FKConfidenceAreaId?+4 more columnsLocations.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
FromColumnTo
Ranges-IPv4.csv,Ranges-IPv6.csvLocationIdLocations.csv LocationId
Ranges-IPv4.csv,Ranges-IPv6.csvConfidenceAreaIdConfidenceAreas.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: find the Ranges row where RangeStart ≤ IP ≤ RangeEnd, then join LocationId to Locations.csv (and its GeoNames IDs to the language file you need) and ConfidenceAreaId to ConfidenceAreas.csv. Compact ranges don't carry an ASN; for IP-to-ASN, see Network CSV.

Sample data

Sample rows from the 11 October 2026 release. Values change with each daily update.

Ranges-IPv4.csv: a reserved-space row, a Melbourne range and a cellular range in the Philippines

RangeStart,RangeEnd,LocationId,ConfidenceAreaId,IsCellular,HostingLikelihood,ConfidenceScore,DeploymentExtentKm
0.0.0.0,0.0.1.255,,,False,0,0,
139.130.4.0,139.130.4.31,150626,1742,False,0,3,
1.37.82.0,1.37.82.255,2001,690,True,0,4,250

Ranges-IPv6.csv: a Melbourne range and a range in Rochester, New York

RangeStart,RangeEnd,LocationId,ConfidenceAreaId,IsCellular,HostingLikelihood,ConfidenceScore,DeploymentExtentKm
2001:8000::,2001:8000:fff:ffff:ffff:ffff:ffff:ffff,2319,221465,False,0,4,1000
2001:1890:152a:5b00::,2001:1890:152a:5bff:ffff:ffff:ffff:ffff,59587,221659,False,0,2,

Locations.csv

LocationId,Latitude,Longitude,ContinentIso,CountryIso,SubdivisionIso,SubdivisionGeonamesId,CityGeonamesId,LocalityGeonamesId,Postcode,Timezone
150626,-37.82,145.16,AU,AU,AU-VIC,2145234,2158177,7932624,3130,Australia/Melbourne
2001,14.77,121,AS,PH,PH-03,7521305,1699802,1699802,,Asia/Manila

Joined result for 139.130.4.5 (from the DuckDB example below): range 139.130.4.0–139.130.4.31, AU, AU-VIC, Melbourne, -37.82, 145.16, confidence area 1742. 1.37.82.10 joins to Meycauayan, PH-03, Philippines.

Behaviour and edge cases

Supplied fields

Each row fills the fields that apply to it, and each field description says when it is supplied. Check that a field has a value before you use it.

Private and reserved addresses

Where Ranges-* have rows for private and reserved space (for example 0.0.0.0–0.0.1.255, and the start of Ranges-IPv6.csv), the row carries IsCellular, HostingLikelihood and ConfidenceScore. LocationId and ConfidenceAreaId are supplied where collected network information is statistically significant.

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

UTF-8. The Geonames-*.csv files start with a BOM, so use a BOM-aware reader. Lines end in CRLF in every file, Manifest.csv included. Text fields can be double-quoted. Booleans are True/False. Full list: CSV conventions.

Download

Download from your BigDataCloud account, or automate it with your API key:

curl -fL -o bigdatacloud-compact-csv.zip "https://www.bigdatacloud.com/download?package=compact&format=csv&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=csv" \
  | awk 'tolower($1)=="location:" { sub(/\r$/, "", $2); print $2 }')
curl -fo bigdatacloud-compact-csv.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-csv.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 (DuckDB, IPv4). DuckDB reads the CSV files directly, so you don't need to load them into a database first.

import duckdb

con = duckdb.connect()
# IPv4 dotted-quad -> integer, so ranges can be compared numerically
con.sql("""
CREATE MACRO ip4(ip) AS
  (split_part(ip,'.',1)::BIGINT << 24) + (split_part(ip,'.',2)::BIGINT << 16)
+ (split_part(ip,'.',3)::BIGINT << 8)  +  split_part(ip,'.',4)::BIGINT
""")
print(con.sql("""
SELECT r.RangeStart, r.RangeEnd, l.CountryIso, l.SubdivisionIso,
       g.Name AS City, l.Latitude, l.Longitude, r.ConfidenceAreaId
FROM read_csv('Ranges-IPv4.csv', all_varchar = true) r
LEFT JOIN read_csv('Locations.csv', all_varchar = true) l USING (LocationId)
LEFT JOIN read_csv('Geonames-en.csv', all_varchar = true) g
       ON g.GeonamesId = l.CityGeonamesId
WHERE ip4('139.130.4.5') BETWEEN ip4(r.RangeStart) AND ip4(r.RangeEnd)
""").fetchall())
# [('139.130.4.0', '139.130.4.31', 'AU', 'AU-VIC', 'Melbourne', '-37.82', '145.16', '1742')]

For IPv6 or high volumes, load the files into your database once, store range bounds as numbers or your database's IP type, and index them.

Related