Datasets:
README: quick starts, drop open-index mention
Browse files34 unmodified lines3536373839404142434445464748495051525334 unmodified linesCounts (2026-11-28): comments 44.06M, stories 6.36M, jobs 18k, polls 2.3k, poll options 16k.## Use```pythonimport duckdbduckdb.sql("select count(*) from 'hf://datasets/adhikasp/hackernews/data/year=2025/*/data.parquet' where type='comment'")```Each monthly file has a single row group, so a query reads a whole file (max ~97 MB); filter by path to read less.## Notes- Items fetched live can still change (scores, new kids, deletions). The current and previous month are refreshed on each update; older months are stable.- Gaps in `id` are items the API returns as null (never existed or purged).- Hacker News content belongs to its authors and Y Combinator; this is a mirror of what the public API serves. For a full-archive alternative updated every 5 minutes see `open-index/hacker-news`.Source/fetcher: `hn-data-fetcher` (PyPI, GitHub `adhikasp/hn-data-fetcher`).34 unmodified lines353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111234 unmodified linesCounts (2026-11-28): comments 44.06M, stories 6.36M, jobs 18k, polls 2.3k, poll options 16k.## Quick startPick whichever fits. Each month is one file (max ~97 MB), so filter by path to read less.**DuckDB (no download, reads straight from the Hub)**```pythonimport duckdbduckdb.sql("""select by, count(*) n from 'hf://datasets/adhikasp/hackernews/data/year=2025/*/data.parquet'where type='comment' group by 1 order by n desc limit 10""").show()```**DuckDB CLI**```sqlINSTALL httpfs; LOAD httpfs;SELECT title, score FROM 'hf://datasets/adhikasp/hackernews/data/year=2026/month=11/data.parquet'WHERE type='story' ORDER BY score DESC LIMIT 10;```**Polars (lazy, only fetches what it needs)**```pythonimport polars as pllf = pl.scan_parquet("hf://datasets/adhikasp/hackernews/data/year=2025/*/data.parquet")lf.filter(pl.col("type") == "story").select("title", "score").sort("score", descending=True).head(10).collect()```**pandas**```pythonimport pandas as pddf = pd.read_parquet("hf://datasets/adhikasp/hackernews/data/year=2026/month=11/data.parquet")```**Hugging Face `datasets` (streaming, nothing stored)**```pythonfrom datasets import load_datasetds = load_dataset("adhikasp/hackernews", split="train", streaming=True)for row in ds.take(3): print(row["id"], row["type"], row["title"])```**Download a slice**```bashhf download adhikasp/hackernews --repo-type dataset --include "data/year=2025/*" --local-dir hn# or one month with plain curlcurl -LO "https://huggingface.co/datasets/adhikasp/hackernews/resolve/main/data/year=2026/month=11/data.parquet"```**Whole dataset** (7.3 GiB): `hf download adhikasp/hackernews --repo-type dataset --local-dir hn`, then `duckdb.sql("select count(*) from 'hn/data/*/*/data.parquet'")`.Mirror without the Hub: `https://hacker-news.adhikasp.id/year=2025/month=1/data.parquet` (same files).### Handy queries```sql-- most-discussed stories of a monthselect title, score, descendants from 'hf://datasets/adhikasp/hackernews/data/year=2025/month=1/data.parquet'where type='story' order by descendants desc limit 10;-- comments per month in a yearselect month, count(*) from 'hf://datasets/adhikasp/hackernews/data/year=2025/*/data.parquet'where type='comment' group by 1 order by 1;```## Notes- Items fetched live can still change (scores, new kids, deletions). The current and previous month are refreshed on each update; older months are stable.- Gaps in `id` are items the API returns as null (never existed or purged).- Hacker News content belongs to its authors and Y Combinator; this is a mirror of what the public API serves.Source/fetcher: `hn-data-fetcher` (PyPI, GitHub `adhikasp/hn-data-fetcher`).
README.md+63-4