cc-host-dataset / README.md
tamnd's picture
Add chunk=001/prefix=v crawl=CC-MAIN-2026-21 (5326096 rows)
bcf3a4c verified
|
Raw
History Blame Contribute Delete
6.49 kB
---
configs:
- config_name: default
data_files:
- split: train
path: "data/crawl=CC-MAIN-2026-21/subset=urls/**/*.parquet"
license: odc-by
task_categories:
- feature-extraction
- text-classification
language:
- multilingual
tags:
- common-crawl
- web-crawl
- url-index
- parquet
- warc
- seo
- web-graph
- open-data
size_categories:
- 1B<n<10B
pretty_name: CC Host Dataset
---
# CC Host Dataset — CC-MAIN-2026-21
A per-URL index of the entire [Common Crawl](https://commoncrawl.org/) with host-level rank signals.
Every URL captured by the crawler becomes one row, enriched with 20 raw CDX fields and harmonic centrality rank from the CC web graph.
The dataset covers roughly **1.9 billion URLs** across ~262 million hosts.
**22 / 280** shards committed for crawl `CC-MAIN-2026-21` — new shards added every ~4 minutes.
## Stats
| Metric | Value |
|---|---|
| Crawl | `CC-MAIN-2026-21` |
| Shards committed | 22 / 280 |
| URLs indexed | ~— |
## Schema
Each row is one URL capture. Twenty fields come from CC CDX Parquet; six come from the CC web-graph rank table.
### Identity
| Field | Type | Description |
|---|---|---|
| `url` | string | Full crawled URL |
| `surt` | string | SURT canonical form — sort key for CDX range lookups |
| `host` | string | Forward hostname (`www.example.com`) |
| `rd` | string | Registered domain / eTLD+1 (`example.com`) |
| `tld` | string | Effective TLD (`com`, `co.uk`) |
| `proto` | string | `http` or `https` |
### Fetch result
| Field | Type | Description |
|---|---|---|
| `st` | int32 | HTTP status code |
| `redir` | string | Final redirect target URL (empty if none) |
| `ts` | string | Fetch timestamp — ISO-8601 |
| `bytes` | int64 | WARC record length in bytes |
### Content
| Field | Type | Description |
|---|---|---|
| `mime` | string | Detected MIME type (`text/html`, `application/pdf`, …) |
| `mime_d` | string | Declared MIME from `Content-Type` header |
| `charset` | string | Character set from `Content-Type` |
| `lang` | string | Content language(s), comma-separated BCP-47 |
| `trunc` | string | Truncation reason (`bytes`, `disconnect`, …) or empty |
| `digest` | string | SHA-1 content hash — use for dedup and change detection |
### WARC pointer
| Field | Type | Description |
|---|---|---|
| `warc_f` | string | Relative WARC file path on `data.commoncrawl.org` |
| `warc_o` | int64 | Byte offset into the WARC file |
| `robots_ok` | bool | `robotstxt_forceget` — robots.txt allowed the crawl |
| `crawl` | string | CC crawl ID (`CC-MAIN-2026-21`) |
### Rank signals (from CC web graph)
| Field | Type | Description |
|---|---|---|
| `harmonic_pos` | int64 | Position in harmonic centrality ranking (1 = most central) |
| `harmonic_val` | float64 | Raw harmonic centrality score |
| `pagerank_pos` | int64 | PageRank position |
| `pagerank_val` | float64 | Raw PageRank score |
| `graph_id` | string | Web-graph release ID |
## Usage
### DuckDB — no download required
```sql
-- Install httpfs extension once
INSTALL httpfs; LOAD httpfs;
-- Top English hosts by rank
SELECT host, rd, harmonic_pos, count(*) AS urls
FROM read_parquet(
'hf://datasets/open-index/cc-host-dataset/data/crawl=CC-MAIN-2026-21/subset=urls/*.parquet'
)
WHERE st = 200 AND lang LIKE '%en%'
GROUP BY host, rd, harmonic_pos
ORDER BY harmonic_pos
LIMIT 20;
```
### Fetch raw HTML for any URL (WARC byte-range)
```python
import requests, gzip, duckdb
row = duckdb.sql("""
SELECT url, warc_f, warc_o, bytes
FROM read_parquet('hf://datasets/open-index/cc-host-dataset/data/crawl=CC-MAIN-2026-21/subset=urls/hosts-a.parquet')
WHERE url = 'https://www.example.com/'
""").fetchone()
url, warc_f, warc_o, length = row
resp = requests.get(
f"https://data.commoncrawl.org/{warc_f}",
headers={"Range": f"bytes={warc_o}-{warc_o + length - 1}"}
)
html = gzip.decompress(resp.content)
print(html[:500].decode(errors="replace"))
```
### Detect content changes across crawls
```python
import duckdb
result = duckdb.sql("""
WITH new AS (
SELECT url, digest
FROM read_parquet('hf://datasets/open-index/cc-host-dataset/data/crawl=CC-MAIN-2026-21/subset=urls/hosts-a.parquet')
WHERE st = 200
),
old AS (
SELECT url, digest
FROM read_parquet('hf://datasets/open-index/cc-host-dataset/data/crawl=CC-MAIN-2026-17/subset=urls/hosts-a.parquet')
WHERE st = 200
)
SELECT count(*) AS changed_urls,
round(count(*) * 100.0 / (SELECT count(*) FROM new), 2) AS pct_changed
FROM new JOIN old USING (url)
WHERE new.digest != old.digest
""").fetchone()
print(f"{result[0]:,} URLs changed ({result[1]}%)")
```
### Multi-crawl comparison with hive partitioning
```sql
-- DuckDB extracts 'crawl' and 'subset' as columns automatically
SELECT crawl, count(*) AS urls, count(DISTINCT host) AS hosts
FROM read_parquet(
'hf://datasets/open-index/cc-host-dataset/data/**/*.parquet',
hive_partitioning = true
)
GROUP BY crawl
ORDER BY crawl DESC;
```
### Python / HuggingFace datasets
```python
from datasets import load_dataset
ds = load_dataset(
"open-index/cc-host-dataset",
split="train",
streaming=True
)
for row in ds:
print(row["url"], row["host"], row["harmonic_pos"])
break
```
## How it was built
1. **CDX extract** — all 302 CC CDX Parquet files (~570 MB each, ~184 GB total) are downloaded in parallel with pure-Go workers.
`parquet-go` column projection reads only the 20 needed columns; the rest are skipped.
Each row is fanned to one of 28 per-prefix gzip-JSONL writers in a single pass.
2. **Rank split** — the CC web-graph host rank table (~5 GB gzipped TSV) is downloaded once and split into 28 per-prefix files.
3. **Shard build** — for each prefix, the rank map is loaded into memory (~300 MB), the JSONL stream is iterated, and each row is joined with the rank entry for its host.
Output is one Parquet file per prefix, compressed with ZSTD level 3.
4. **Publish** — each shard is committed to HuggingFace immediately after it is built.
Commit path: `data/crawl={crawl}/subset=urls/hosts-{prefix}.parquet`.
The dataset is usable before all shards complete.
Built with [`ccrawl`](https://github.com/tamnd/ccrawl-cli) v0.2.4.
## License
Data is derived from [Common Crawl](https://commoncrawl.org/), released under the [Open Data Commons Attribution License (ODC-By)](https://opendatacommons.org/licenses/by/1-0/).
You must attribute Common Crawl when using or redistributing this dataset.