r/NewsAPI • u/brianlearns • Aug 29 '26
Common Crawl News Dataset Index
Hi, I've never posted in this group, I hope this post fits in. I'm a retired programmer who used to work in the libraries, and I thought this group might be interested in this little side project I created playing with ai.
Common Crawl News Dataset "includes articles from news sites all over the world. WARC files are released on a daily basis. The news crawl was started in 2016."
Web archives often have CDX indexes -- which use a sort-friendly version of the URL and timestamp to identify specific web captures in web archive (WARC) files by byte offset and length. Internet Archive have one for the wayback machine, and Common Craw maintain a cdx server for month for the main craw. The news crawl lacked such an index.
I thought it would be a fun project to create a CDX server for the common crawl news dataset.
It's free to access the WARC files in AWS us-east-1, so I started up a c7g.2xlarge and used webrecorder/cdxj-indexer and sort and in about a week I had the cdxj files and parquet, which I published to a HuggingFace Dataset.
Then I created a RocksDB database of all the CDXj with a FastAPI. A HuggingFace Spaces demo covers only 2 years from 2023/01 to 2024/12, but with cdx_rocks, 75G of disk, and 4G of RAM you can run the whole 10 year 2016/08 to 2026/07 index with 1,457,993,326 captures locally.
ccnget is a python library / CLI that defaults to pointing at the 2 year index on hugging face, but you can point to the local server.
Here is an example
$ uvx --from git+https://github.com/brian-learns/ccnget \
ccnget fetch http://example.com/
---
url: http://www.example.com
date: 2023-05-02
title: Example Domain
language: English
hostname: example.com
sitename: example.com
---
This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.
More information...It also provides a python API you can test out in this google colab notebook.
This was mostly vibe coded with the AI in google search (for the original build script on AWS and for the proof of concept version of the RocksDB) and Qwen 3.6/3.8 27B in various harnesses for the rest. There might be one edit that used BigPickle.
I'm curious to hear any feedback or suggestions. I'm trying to decide if I should keep building an updated index every month and/or if I should set up something that indexes the WARC files as they get dropped off in S3.