Datasets:
Commit ·
bd82bff
0
Parent(s):
Duplicate from open-index/hacker-news
Browse filesCo-authored-by: Duc-Tam Nguyen <tamnd@users.noreply.huggingface.co>
This view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributesAdded+60
- README.mdAdded+553
- data/2006/2006-10.parquetAdded+3
- data/2006/2006-11.parquetAdded+3
- data/2006/2006-12.parquetAdded+3
- data/2007/2007-01.parquetAdded+3
- data/2007/2007-02.parquetAdded+3
- data/2007/2007-03.parquetAdded+3
- data/2007/2007-04.parquetAdded+3
- data/2007/2007-05.parquetAdded+3
- data/2007/2007-06.parquetAdded+3
- data/2007/2007-07.parquetAdded+3
- data/2007/2007-08.parquetAdded+3
- data/2007/2007-09.parquetAdded+3
- data/2007/2007-10.parquetAdded+3
- data/2007/2007-11.parquetAdded+3
- data/2007/2007-12.parquetAdded+3
- data/2008/2008-01.parquetAdded+3
- data/2008/2008-02.parquetAdded+3
- data/2008/2008-03.parquetAdded+3
- data/2008/2008-04.parquetAdded+3
- data/2008/2008-05.parquetAdded+3
- data/2008/2008-06.parquetAdded+3
- data/2008/2008-07.parquetAdded+3
- data/2008/2008-08.parquetAdded+3
- data/2008/2008-09.parquetAdded+3
- data/2008/2008-10.parquetAdded+3
- data/2008/2008-11.parquetAdded+3
- data/2008/2008-12.parquetAdded+3
- data/2009/2009-01.parquetAdded+3
- data/2009/2009-02.parquetAdded+3
- data/2009/2009-03.parquetAdded+3
- data/2009/2009-04.parquetAdded+3
- data/2009/2009-05.parquetAdded+3
- data/2009/2009-06.parquetAdded+3
- data/2009/2009-07.parquetAdded+3
- data/2009/2009-08.parquetAdded+3
- data/2009/2009-09.parquetAdded+3
- data/2009/2009-10.parquetAdded+3
- data/2009/2009-11.parquetAdded+3
- data/2009/2009-12.parquetAdded+3
- data/2010/2010-01.parquetAdded+3
- data/2010/2010-02.parquetAdded+3
- data/2010/2010-03.parquetAdded+3
- data/2010/2010-04.parquetAdded+3
- data/2010/2010-05.parquetAdded+3
- data/2010/2010-06.parquetAdded+3
- data/2010/2010-07.parquetAdded+3
- data/2010/2010-08.parquetAdded+3
- data/2010/2010-09.parquetAdded+3
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.avro filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ckpt filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.lz4 filter=lfs diff=lfs merge=lfs -text*.mds filter=lfs diff=lfs merge=lfs -text*.mlmodel filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.npy filter=lfs diff=lfs merge=lfs -text*.npz filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pickle filter=lfs diff=lfs merge=lfs -text*.pkl filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -text*.safetensors filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tar filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.wasm filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text# Audio files - uncompressed*.pcm filter=lfs diff=lfs merge=lfs -text*.sam filter=lfs diff=lfs merge=lfs -text*.raw filter=lfs diff=lfs merge=lfs -text# Audio files - compressed*.aac filter=lfs diff=lfs merge=lfs -text*.flac filter=lfs diff=lfs merge=lfs -text*.mp3 filter=lfs diff=lfs merge=lfs -text*.ogg filter=lfs diff=lfs merge=lfs -text*.wav filter=lfs diff=lfs merge=lfs -text# Image files - uncompressed*.bmp filter=lfs diff=lfs merge=lfs -text*.gif filter=lfs diff=lfs merge=lfs -text*.png filter=lfs diff=lfs merge=lfs -text*.tiff filter=lfs diff=lfs merge=lfs -text# Image files - compressed*.jpg filter=lfs diff=lfs merge=lfs -text*.jpeg filter=lfs diff=lfs merge=lfs -text*.webp filter=lfs diff=lfs merge=lfs -text# Video files - compressed*.mp4 filter=lfs diff=lfs merge=lfs -text*.webm filter=lfs diff=lfs merge=lfs -text123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553---license: odc-bytask_categories:- text-generation- feature-extraction- text-classification- question-answeringlanguage:- enpretty_name: Hacker News - Complete Archivesize_categories:- 10M<n<100Mtags:- hacker-news- forum- text- parquet- community- tech- comments- live-updatedconfigs:- config_name: default data_files: - split: train path: data/*/*.parquet- config_name: today data_files: - split: train path: today/**/*.parquet---
# Hacker News - Complete Archive
> Every Hacker News item since 2006, live-updated every 5 minutes
## Table of Contents
- [What is it?](#what-is-it)- [What is being released?](#what-is-being-released)- [Breakdown by today](#breakdown-by-today)- [Breakdown by year](#breakdown-by-year)- [How to download and use this dataset](#how-to-download-and-use-this-dataset)- [Dataset statistics](#dataset-statistics)- [Content breakdown](#content-breakdown)- [Community insights](#community-insights)- [How it works](#how-it-works)- [Dataset card](#dataset-card-for-hacker-news---complete-archive) - [Dataset summary](#dataset-summary) - [Dataset structure](#dataset-structure) - [Dataset creation](#dataset-creation) - [Considerations for using the data](#considerations-for-using-the-data)- [Additional information](#additional-information)
## What is it?
This dataset contains the complete [Hacker News](https://news.ycombinator.com) archive: every story, comment, Ask HN, Show HN, job posting, and poll ever submitted to the site. Hacker News is one of the longest-running and most influential technology communities on the internet, operated by [Y Combinator](https://www.ycombinator.com) since 2007. It has become the de facto gathering place for founders, engineers, researchers, and technologists to share and discuss what matters in technology.
The archive currently spans from **2006-10** to **2026-04-14 08:50 UTC**, with **47,692,166 items** committed. New items are fetched every 5 minutes and committed directly as individual Parquet files through an automated live pipeline, so the dataset stays current with the site itself.
We believe this is one of the most complete and regularly updated mirrors of Hacker News data available on Hugging Face. The data is stored as monthly Parquet files sorted by item ID, making it straightforward to query with DuckDB, load with the `datasets` library, or process with any tool that reads Parquet.
## What is being released?
The dataset is organized as one Parquet file per calendar month, plus 5-minute live files for today's activity. Every 5 minutes, new items are fetched from the source and committed directly as a single Parquet block. At midnight UTC, the entire current month is refetched from the source as a single authoritative Parquet file, and today's individual 5-minute blocks are removed from the `today/` directory.
```data/ 2006/2006-10.parquet first month with HN data 2006/2006-12.parquet 2007/2007-01.parquet ... 2026/2026-04.parquet most recent complete month 2026/2026-04.parquet current month, ongoing til 2026-04-13today/ 2026/04/14/00/00.parquet 5-min live blocks (YYYY/MM/DD/HH/MM.parquet) 2026/04/14/00/05.parquet ... 2026/04/14/08/50.parquet most recent committed blockstats.csv one row per committed monthstats_today.csv one row per committed 5-min block```
Along with the Parquet files, we include `stats.csv` which tracks every committed month with its item count, ID range, file size, fetch duration, and commit timestamp. This makes it easy to verify completeness and track the pipeline's progress.
## Breakdown by today
The chart below shows items committed to this dataset by hour today (**2026-04-14**, **3,203 items** across **9 hours**, last updated **2026-04-14 08:55 UTC**).
``` 00:00 ██████████████████████████████ 419 01:00 █████████████████████████████░ 417 02:00 ██████████████████████████░░░░ 365 03:00 ████████████████████████░░░░░░ 343 04:00 ████████████████████████░░░░░░ 349 05:00 ███████████████████████░░░░░░░ 329 06:00 █████████████████████░░░░░░░░░ 300 07:00 ███████████████████████████░░░ 391 08:00 ████████████████████░░░░░░░░░░ 290```
## Breakdown by year
The chart below shows items committed to this dataset by year.
``` 2006 █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 62 2007 █��░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 93.8K 2008 ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 320.9K 2009 ███░░░░░░░░░░░░░░░░░░░░░░░░░░░ 608.4K 2010 ██████░░░░░░░░░░░░░░░░░░░░░░░░ 1.0M 2011 ████████░░░░░░░░░░░░░░░░░░░░░░ 1.4M 2012 ██████████░░░░░░░░░░░░░░░░░░░░ 1.6M 2013 █████████████░░░░░░░░░░░░░░░░░ 2.0M 2014 ███████████░░░░░░░░░░░░░░░░░░░ 1.8M 2015 █████████████░░░░░░░░░░░░░░░░░ 2.0M 2016 ████████████████░░░░░░░░░░░░░░ 2.5M 2017 █████████████████░░░░░░░░░░░░░ 2.7M 2018 ██████████████████░░░░░░░░░░░░ 2.8M 2019 ████████████████████░░░░░░░░░░ 3.1M 2020 ████████████████████████░░░░░░ 3.7M 2021 ███████████████████████████░░░ 4.2M 2022 █████████████████████████████░ 4.4M 2023 ██████████████████████████████ 4.6M 2024 ████████████████████████░░░░░░ 3.7M 2025 █████████████████████████░░░░░ 3.9M 2026 ████████░░░░░░░░░░░░░░░░░░░░░░ 1.3M```
## How to download and use this dataset
You can load the full dataset, a specific year, or even a single month. The dataset uses the standard Hugging Face Parquet layout, so it works out of the box with DuckDB, the `datasets` library, `pandas`, and `huggingface_hub`.
### Using DuckDB
DuckDB can read Parquet files directly from Hugging Face without downloading anything first. This is the fastest way to explore the data:
The `type` column is stored as a small integer: `1` = story, `2` = comment, `3` = poll, `4` = pollopt, `5` = job. The `"by"` column (author username) must be quoted in DuckDB because `by` is a reserved keyword.
```sql-- Top 20 highest-scored stories of all timeSELECT id, title, "by", score, url, timeFROM read_parquet('hf://datasets/open-index/hacker-news/data/*/*.parquet')WHERE type = 1 AND title != ''ORDER BY score DESCLIMIT 20;```
```sql-- Monthly submission volume for a specific yearSELECT strftime(time, '%Y-%m') AS month, count(*) AS items, count(*) FILTER (WHERE type = 1) AS stories, count(*) FILTER (WHERE type = 2) AS commentsFROM read_parquet('hf://datasets/open-index/hacker-news/data/2024/*.parquet')GROUP BY monthORDER BY month;```
```sql-- Most discussed stories by total comment countSELECT id, title, "by", score, descendants AS comments, urlFROM read_parquet('hf://datasets/open-index/hacker-news/data/2025/*.parquet')WHERE type = 1 AND descendants > 0ORDER BY descendants DESCLIMIT 20;```
```sql-- Who posts the most Ask HN questions?SELECT "by", count(*) AS postsFROM read_parquet('hf://datasets/open-index/hacker-news/data/*/*.parquet')WHERE type = 1 AND title LIKE 'Ask HN:%'GROUP BY "by"ORDER BY posts DESCLIMIT 20;```
```sql-- Track how often a topic appears on HN over timeSELECT extract(year FROM time) AS year, count(*) AS mentionsFROM read_parquet('hf://datasets/open-index/hacker-news/data/*/*.parquet')WHERE type = 1 AND lower(title) LIKE '%rust%'GROUP BY yearORDER BY year;```
```sql-- Top linked domains, year over yearSELECT extract(year FROM time) AS year, regexp_extract(url, 'https?://([^/]+)', 1) AS domain, count(*) AS storiesFROM read_parquet('hf://datasets/open-index/hacker-news/data/*/*.parquet')WHERE type = 1 AND url != ''GROUP BY year, domainQUALIFY row_number() OVER (PARTITION BY year ORDER BY stories DESC) <= 5ORDER BY year, stories DESC;```
### Using `datasets`
```pythonfrom datasets import load_dataset
# Stream the full history without downloading everything firstds = load_dataset("open-index/hacker-news", split="train", streaming=True)for item in ds: print(item["id"], item["type"], item["title"])
# Load a specific year into memoryds = load_dataset( "open-index/hacker-news", data_files="data/2024/*.parquet", split="train",)print(f"{len(ds):,} items in 2024")
# Load today's live blocks (updated every 5 minutes)ds = load_dataset( "open-index/hacker-news", name="today", split="train", streaming=True,)```
### Using `huggingface_hub`
```pythonfrom huggingface_hub import snapshot_download
# Download only 2024 data (about 1.5 GB)snapshot_download( "open-index/hacker-news", repo_type="dataset", local_dir="./hn/", allow_patterns="data/2024/*",)```
For faster downloads, install `pip install huggingface_hub[hf_transfer]` and set `HF_HUB_ENABLE_HF_TRANSFER=1`.
### Using the CLI
```bash# Download a single monthhuggingface-cli download open-index/hacker-news \ data/2024/2024-01.parquet \ --repo-type dataset --local-dir ./hn/```
### Using pandas + DuckDB
```pythonimport duckdb
conn = duckdb.connect()
# Score distribution: what does a "typical" HN story look like?# type=1 is story (stored as integer: 1=story, 2=comment, 3=poll, 4=pollopt, 5=job)df = conn.sql(""" SELECT percentile_disc(0.50) WITHIN GROUP (ORDER BY score) AS p50, percentile_disc(0.90) WITHIN GROUP (ORDER BY score) AS p90, percentile_disc(0.99) WITHIN GROUP (ORDER BY score) AS p99, percentile_disc(0.999) WITHIN GROUP (ORDER BY score) AS p999 FROM read_parquet('hf://datasets/open-index/hacker-news/data/*/*.parquet') WHERE type = 1""").df()print(df)```
## Dataset statistics
You can query the per-month statistics directly from the `stats.csv` file included in the dataset:
```sqlSELECT * FROM read_csv_auto('hf://datasets/open-index/hacker-news/stats.csv')ORDER BY year, month;```
The `stats.csv` file tracks each committed month with the following columns:
| Column | Description ||--------|-------------|| `year`, `month` | Calendar month || `lowest_id`, `highest_id` | Item ID range covered by this file || `count` | Number of items in the file || `dur_fetch_s` | Seconds to fetch from the data source || `dur_commit_s` | Seconds to commit to Hugging Face || `size_bytes` | Parquet file size on disk || `committed_at` | ISO 8601 timestamp of when this month was committed |
## Content breakdown
Hacker News has five item types. The vast majority of content is comments, followed by stories (which include Ask HN, Show HN, and regular link submissions). Jobs, polls, and poll options make up a small fraction.
| Type | Count | Share ||------|------:|------:|| comment | 41,604,069 | 87.2% || story | 6,077,916 | 12.7% || job | 18,093 | 0.0% || poll | 2,241 | 0.0% || pollopt | 15,453 | 0.0% |
Of all stories submitted to Hacker News, **84.7%** link to an external URL. The rest are text-only posts: Ask HN questions, Show HN launches, and other self-posts where the discussion itself is the content.
The average story generates **23.8 comments** in its discussion thread. The most-discussed story of all time received 9,275 comments, which gives a sense of how deep conversations can go on particularly controversial or interesting topics.
### Story scores
Scores on Hacker News follow a steep power law. Most stories receive only a few points, but a small number break out and reach the front page with hundreds or thousands of upvotes.
| Metric | Value ||--------|------:|| Average score | 1.5 || Median score | 0 || Highest score ever | 6,015 || Stories with 100+ points | 175,933 || Stories with 1,000+ points | 2,169 |
The median score of 0 reflects the fact that many stories are submitted but never gain traction. However, the long tail is where things get interesting: over 6,077,916 stories have been submitted, and the top 0.03% (those with 1,000+ points) represent the content that defined conversations across the technology industry.
### Most-shared domains
The domains most frequently linked from Hacker News stories tell a clear story about what the community values. GitHub dominates, reflecting HN's deep roots in open source and software development. Major publications like the New York Times and Ars Technica show the community's interest in journalism and long-form analysis.
| # | Domain | Stories ||--:|--------|--------:|| 1 | github.com | 200,836 || 2 | www.youtube.com | 135,530 || 3 | medium.com | 124,697 || 4 | www.nytimes.com | 77,983 || 5 | en.wikipedia.org | 54,642 || 6 | techcrunch.com | 54,277 || 7 | twitter.com | 50,935 || 8 | arstechnica.com | 47,250 || 9 | www.theguardian.com | 44,543 || 10 | www.bloomberg.com | 37,951 |
### Most active story submitters
These are the users who have submitted the most stories over the lifetime of Hacker News. Many of them have been active for over a decade, consistently curating and sharing content with the community.
| # | User | Stories ||--:|------|--------:|| 1 | rbanffy | 36,896 || 2 | Tomte | 26,258 || 3 | tosh | 24,251 || 4 | bookofjoe | 20,778 || 5 | mooreds | 20,635 || 6 | pseudolus | 19,969 || 7 | PaulHoule | 19,197 || 8 | todsacerdoti | 18,887 || 9 | ingve | 17,115 || 10 | thunderbong | 16,125 || 11 | jonbaer | 14,194 || 12 | rntn | 13,410 || 13 | doener | 12,960 || 14 | Brajeshwar | 12,725 || 15 | LinuxBender | 11,058 |
## How it works
The pipeline is built in Go and uses [DuckDB](https://duckdb.org) for Parquet conversion. Historical data is sourced from [ClickHouse](https://clickhouse.com); live data is fetched directly from the [HN Firebase API](https://hacker-news.firebaseio.com/v2).
**Historical backfill.** The pipeline iterates through every month from October 2006 to the most recent complete month. For each month, it queries the ClickHouse source with a time-bounded SQL query, exports the result as a Parquet file sorted by `id` using DuckDB with Zstandard compression at level 22, and commits it to this repository along with an updated `stats.csv` and `README.md`. Months already tracked in `stats.csv` are skipped, making the process fully resumable.
**Live polling.** Every 5 minutes, the pipeline calls the HN Firebase API to fetch new items by ID range. Items are grouped into their 5-minute time windows, written as individual Parquet files at `today/YYYY/MM/DD/HH/MM.parquet` using DuckDB, and committed to Hugging Face immediately. Using the HN API directly means live blocks reflect real-time data with no indexing lag.
**Day rollover.** At midnight UTC, the entire current month is refetched from the ClickHouse source in a single query and written as an authoritative Parquet file. Today's individual 5-minute blocks are deleted from the repository in the same atomic commit. Refetching instead of merging ensures the monthly file is always complete and deduplicated, regardless of any local state.
## Thanks
The data in this dataset comes from the [ClickHouse Playground](https://sql.clickhouse.com), a free public SQL endpoint maintained by [ClickHouse, Inc.](https://clickhouse.com) that mirrors the official [Hacker News Firebase API](https://github.com/HackerNewsAPI/HN-API). ClickHouse uses Hacker News as one of their canonical demo datasets. Without their public endpoint, building and maintaining a complete, regularly updated archive like this would not be practical.
The original content is created by the Hacker News community and is operated by [Y Combinator](https://www.ycombinator.com). This is an independent mirror and is not affiliated with or endorsed by Y Combinator or ClickHouse, Inc.
# Dataset card for Hacker News - Complete Archive
## Dataset summary
This dataset is a complete mirror of the [Hacker News](https://news.ycombinator.com) archive, sourced from the [ClickHouse Playground](https://sql.clickhouse.com) which itself mirrors the official [HN Firebase API](https://github.com/HackerNewsAPI/HN-API). The data covers every item ever posted to the site, from the earliest submissions in October 2006 through today.
The dataset is intended for research, analysis, and training. Common use cases include:
- **Language model pretraining and fine-tuning** on high-quality technical discussions- **Sentiment and trend analysis** across two decades of technology discourse- **Community dynamics research** on one of the internet's most influential forums- **Information retrieval** benchmarks using real-world questions and answers- **Content recommendation** and ranking model development
## Dataset structure
### Data instances
Here is an example item from the dataset. This is a story submission with a link to an external URL:
```json{ "id": 1, "deleted": 0, "type": 1, "by": "pg", "time": "2006-10-09T18:21:51+00:00", "text": "", "dead": 0, "parent": 0, "poll": 0, "kids": [15, 234509, 487171], "url": "http://ycombinator.com", "score": 57, "title": "Y Combinator", "parts": [], "descendants": 0, "words": ["y", "combinator"]}```
And here is a comment, showing how discussion threads are connected via the `parent` field:
```json{ "id": 15, "deleted": 0, "type": 2, "by": "sama", "time": "2006-10-09T19:51:01+00:00", "text": "\"the way to get good software is to find ...", "dead": 0, "parent": 1, "poll": 0, "kids": [17], "url": "", "score": 0, "title": "", "parts": [], "descendants": 0, "words": []}```
### Data fields
Every Parquet file shares the same schema, matching the [HN API](https://github.com/HackerNewsAPI/HN-API) item format:
| Column | Type | Description ||--------|------|-------------|| `id` | uint32 | Unique item ID, monotonically increasing across the entire site || `deleted` | uint8 | 1 if the item was soft-deleted by its author or by moderators, 0 otherwise || `type` | int8 | Item type as an integer: `1`=story, `2`=comment, `3`=poll, `4`=pollopt, `5`=job || `by` | string | Username of the author who created this item. Note: `by` is a reserved word in DuckDB and must be quoted as `"by"` || `time` | timestamp | When the item was created, in UTC || `text` | string | HTML body text. Used for comments, Ask HN posts, job listings, and polls || `dead` | uint8 | 1 if the item was flagged or killed by moderators, 0 otherwise || `parent` | uint32 | The ID of the parent item. For comments, this points to either a story or another comment || `poll` | uint32 | For poll options (`pollopt`), the ID of the associated poll || `kids` | list\<uint32\> | Ordered list of direct child item IDs (typically comments) || `url` | string | The external URL for link stories. Empty for text posts and comments || `score` | int32 | The item's score (upvotes minus downvotes) || `title` | string | Title text for stories, jobs, and polls. Empty for comments || `parts` | list\<uint32\> | For polls, the list of associated poll option item IDs || `descendants` | int32 | Total number of comments in the entire discussion tree below this item || `words` | list\<string\> | Tokenized words extracted from the title and text fields |
### Data splits
The `default` configuration includes all historical monthly Parquet files. If you only need today's latest items, use the `today` configuration which includes only the 5-minute live blocks for the current day.
You can also load individual years or months by specifying `data_files`:
```python# Load just January 2024ds = load_dataset("open-index/hacker-news", data_files="data/2024/2024-01.parquet", split="train")
# Load all of 2024ds = load_dataset("open-index/hacker-news", data_files="data/2024/*.parquet", split="train")```
## Dataset creation
### Curation rationale
Hacker News is one of the richest sources of technical discussion on the internet, but accessing the full archive programmatically has historically required either scraping the Firebase API item-by-item or working with incomplete third-party dumps. This dataset provides the complete archive in a standard, efficient format that anyone can query without setting up infrastructure.
By publishing on Hugging Face with Parquet files, the data becomes immediately queryable with DuckDB (via `hf://` paths), streamable with the `datasets` library, and downloadable in bulk. The 5-minute live update pipeline means researchers always have access to near-real-time data.
### Source data
All data is sourced from the [ClickHouse Playground](https://sql.clickhouse.com), a public SQL endpoint maintained by ClickHouse that mirrors the official Hacker News Firebase API. The ClickHouse mirror is widely used for analytics demonstrations and contains the complete dataset.
The pipeline queries the ClickHouse endpoint month-by-month, exports each month as a Parquet file using DuckDB with Zstandard compression at level 22, and commits it to this Hugging Face repository. Already-committed months are tracked in `stats.csv` and skipped on subsequent runs, making the process fully resumable.
### Data processing steps
The pipeline runs in three modes:
1. **Historical backfill.** Iterates through every month from October 2006 to the most recent complete month. For each month, it runs a SQL query against the ClickHouse source, writes the result as a Parquet file sorted by `id`, and commits it to Hugging Face along with an updated `stats.csv` and `README.md`.
2. **Live polling.** After the historical backfill completes, the pipeline polls the [HN Firebase API](https://hacker-news.firebaseio.com/v2) every 5 minutes for new items. It fetches all items with IDs greater than the last committed watermark, groups them into 5-minute time windows by item timestamp, and writes each window as a `today/YYYY/MM/DD/HH/MM.parquet` file committed to Hugging Face immediately. The HN API provides real-time data with no indexing lag.
3. **Day rollover.** At midnight UTC, the entire current month is refetched from the ClickHouse source in a single query and written as a fresh, authoritative Parquet file. Today's individual 5-minute blocks are deleted from the repository in the same atomic commit. This approach is more reliable than merging local blocks — the result is always complete and deduplicated, sourced directly from the origin.
All Parquet files use **Zstandard compression at level 22** and are sorted by `id` for efficient range scans. No filtering, deduplication, or transformation is applied to the data beyond what the source provides.
### Personal and sensitive information
This dataset contains usernames (`by` field) and user-generated text content (`text`, `title` fields) as they appear on the public Hacker News website. No additional PII processing has been applied. The data reflects what is publicly visible on [news.ycombinator.com](https://news.ycombinator.com).
If you find content in this dataset that you believe should be removed, please open a discussion on the Community tab.
## Considerations for using the data
### Social impact
By providing the complete Hacker News archive in an accessible format, we hope to enable research into online community dynamics, technology trends, and the evolution of technical discourse. The dataset can serve as training data for language models that need to understand technical discussions, or as a benchmark for information retrieval and recommendation systems.
### Discussion of biases
Hacker News has a well-documented set of community biases. The user base skews heavily toward software engineers, startup founders, and technology enthusiasts based in the United States. Topics related to Silicon Valley, programming languages, startups, and certain political viewpoints tend to receive disproportionate attention and engagement.
The moderation system (flagging, vouching, and moderator intervention) shapes what content survives and what gets killed. Stories and comments that violate community norms are flagged as `dead`, but this moderation reflects the values of the existing community rather than any objective standard.
We have not applied any additional filtering or quality scoring to the data. All items, including deleted and dead items, are preserved exactly as they appear in the source.
### Known limitations
- **`type` is an integer.** The item type is stored as a TINYINT enum: `1`=story, `2`=comment, `3`=poll, `4`=pollopt, `5`=job. When writing DuckDB queries, use `WHERE type = 1` for stories rather than `WHERE type = 'story'`.- **`by` is a reserved keyword in DuckDB.** Always quote it with double quotes: `"by"`.- **`deleted` and `dead` are integers.** They are stored as 0/1 rather than booleans.- **Comment text is HTML.** The `text` field contains raw HTML as stored by HN, not plain text. You may need to strip tags depending on your use case.- **Deleted items have sparse fields.** When an item is deleted, most fields become empty, but the `id` and `deleted` flag are preserved.- **Scores are point-in-time snapshots.** The score reflects the value at the time the ClickHouse mirror last synced, not necessarily the final score.- **No user profiles.** This dataset contains items only, not user profiles (karma, bio, etc.).- **Code content is HTML-escaped.** Code snippets in comments use HTML entities and `<code>` tags rather than Markdown formatting.
## Additional information
### Licensing
The dataset is released under the **Open Data Commons Attribution License (ODC-By) v1.0**. The original content is subject to the rights of its respective authors. Hacker News data is provided by [Y Combinator](https://www.ycombinator.com).
This is an independent community mirror. It is not affiliated with or endorsed by Y Combinator.
### Contact
For questions, feedback, or issues, please open a discussion on the [Community tab](https://huggingface.co/datasets/open-index/hacker-news/discussions).
*Last updated: 2026-04-14 08:55 UTC*123version https://git-lfs.github.com/spec/v1oid sha256:f075a057c886f70d1521ad9b4a57623155d019f29fe2ed779cc19086acca5aacsize 11994123version https://git-lfs.github.com/spec/v1oid sha256:5fb1756aba6069327cf119d57af3a30b6008c3e89da8105e470f383736be7ef8size 554123version https://git-lfs.github.com/spec/v1oid sha256:febeea30ffd24936e1c46b1ece3dbf13ae78c5a110e2d39d18e66ac13005f342size 6219123version https://git-lfs.github.com/spec/v1oid sha256:5fb1756aba6069327cf119d57af3a30b6008c3e89da8105e470f383736be7ef8size 554123version https://git-lfs.github.com/spec/v1oid sha256:6ae533795ea07490873881c25c37df4229f7f03470d1d473a88757252e718c63size 308963123version https://git-lfs.github.com/spec/v1oid sha256:d40cad7c65dc60f088b00cb1e102b2ee553616cb1f1b09cf0b21256f981be764size 1253007123version https://git-lfs.github.com/spec/v1oid sha256:07009b16156e24d1975630e8adeb011f853a8673fa83004dea13780dd26fa41bsize 2137722123version https://git-lfs.github.com/spec/v1oid sha256:2d45ee432f088d538a09f17e2b3839d0ee7530b5e29cf0b772955483d66ae399size 1443362123version https://git-lfs.github.com/spec/v1oid sha256:4508f484364534d7460b7cfd39a850c9921f5912adb0ea7dfaf77a744977dfd2size 1229805123version https://git-lfs.github.com/spec/v1oid sha256:b9f231b64dd84b06cf1538a530255ba9dfeddaf609d626fbc2039b976566c81esize 1295922123version https://git-lfs.github.com/spec/v1oid sha256:26b64308ecfb825b612160a943443a986b4f34da33e32ceff5b16d82ee7fdb9bsize 2184462123version https://git-lfs.github.com/spec/v1oid sha256:098d4de6a97fdb9abdb462aee3502805cb7da8b3f1fe19a1862601367c6a191fsize 2587024123version https://git-lfs.github.com/spec/v1oid sha256:609c375301952fa2fc0615dfb83e872cbd510e764208869b928a559f5acf7f5fsize 2778304123version https://git-lfs.github.com/spec/v1oid sha256:5e7f046cbd14364bf73324fd3afe624da3c3bfbf0db674bd933c6894b459d506size 2066776123version https://git-lfs.github.com/spec/v1oid sha256:8cf9f0c82933efa2b86c9e5db01fac74065ac6418b460c41dd00fb2f74a9df8dsize 1837252123version https://git-lfs.github.com/spec/v1oid sha256:e3d2ccca2df761ef1efd605f3ed9cb64fd9bab1d271878cada0de6bf44cbb1cdsize 2571038123version https://git-lfs.github.com/spec/v1oid sha256:96e5c6bf0ec13d349d273ce54e731aed56c353ab50198038d407f273eb8314b8size 3860126123version https://git-lfs.github.com/spec/v1oid sha256:856a4e0ff92d53f54fc46f903cc71cedf943a125774be6da4d7e9e478ba51514size 5142506123version https://git-lfs.github.com/spec/v1oid sha256:4bc9263b6983712f37ae64a84cd00eaa1f50fa019edb6c6f0a4ff99255e33e25size 5381500123version https://git-lfs.github.com/spec/v1oid sha256:4bcc8d4aec473a1e48fdd50356f71cbaf2187a390262b5a53388849298b5adc5size 5812797123version https://git-lfs.github.com/spec/v1oid sha256:1da0f2ae765ecc749aaa505628f69cc75e7814cfb25c3ddfef829bcb50833c29size 5616033123version https://git-lfs.github.com/spec/v1oid sha256:0f094450e01185099b0d30643a60818539eb3c71df9b1e5d4042fd8f62942b74size 6459558123version https://git-lfs.github.com/spec/v1oid sha256:a0d7d3739c388d1c8d9e844d080b9e7e7eb4a34cc26660b93a4386252d2ad6fdsize 5673721123version https://git-lfs.github.com/spec/v1oid sha256:5c104da44b06d3c8c143c1b852bb34b81a1bccee5cfc6428c9a00768c8fb0471size 5854028123version https://git-lfs.github.com/spec/v1oid sha256:38b39b63d2f003f992c8440492e1b43906ab59417efa51fc42c4427a7386c8c1size 6066795123version https://git-lfs.github.com/spec/v1oid sha256:b5fda23eb272a6db86d63c17d4e65ad7561301501534655e0dbfc48fd7cfe60dsize 6438154123version https://git-lfs.github.com/spec/v1oid sha256:1f6985d14288a638e558d0f24db195a30b91475ccb0d9b1bf097e136033d9992size 7601080123version https://git-lfs.github.com/spec/v1oid sha256:a369b7d937aa7d3398c53d258922386e49897991ee1263b99fa6fd7821740da6size 9457556123version https://git-lfs.github.com/spec/v1oid sha256:df809084dd1f34899cddd8466686eeaff4188fc26b36cf357170efaff6ed38e6size 8695512123version https://git-lfs.github.com/spec/v1oid sha256:5b44d147b770a2952f5968f232600bd7942490d66f80e99b2327f4bb1bda36b9size 9583360123version https://git-lfs.github.com/spec/v1oid sha256:fa3c552bf400a4b638eff6ff8c7244e1a93c3a1bde52d72cde3cecd3928d101fsize 10503066123version https://git-lfs.github.com/spec/v1oid sha256:5e05e02cda9515224b449c9bde66008836665018c58cc25f460a627db76cdf7dsize 10414819123version https://git-lfs.github.com/spec/v1oid sha256:be818f75a149bfbf2abb9d224cb76c6c95c40e174f70ce2f40c959ded0959ac3size 10195957123version https://git-lfs.github.com/spec/v1oid sha256:0cd5360b35c477b116b9fbdea7e14c838057bf9dc4538f5a5cac2d40bd1452dfsize 11906472123version https://git-lfs.github.com/spec/v1oid sha256:a29993bb5e34c9fcbc664ee5510502a3c920110c1c71072cf2d5d4ec6922867fsize 13507872123version https://git-lfs.github.com/spec/v1oid sha256:7dd3b9bb41287536249bc465fa1267f12f16e01261e0de0ebdd8a780f1f60319size 12550137123version https://git-lfs.github.com/spec/v1oid sha256:025c5cb5f516a7fdb417476eaf446b93617cc661f1c781f566c35522bb32b771size 13199103123version https://git-lfs.github.com/spec/v1oid sha256:7f5115183e26353afe2fb2210e1199c95cbdc2efb891f6bd9e74efa79bbae192size 12147917123version https://git-lfs.github.com/spec/v1oid sha256:67417db8eef9ca2b75a09743a327ee331133d761b1edf4d8aa90d30e5df0449fsize 12271162123version https://git-lfs.github.com/spec/v1oid sha256:842a7c526feafdda5d864ba8c4e9acfecc2887e3bc1c16fd21b1dc7111a9b4f8size 14626994123version https://git-lfs.github.com/spec/v1oid sha256:ac93f76c1c75eeb0b9c737f7a356350e63e60d0728a45dd738dd625ffe6d4870size 14651835123version https://git-lfs.github.com/spec/v1oid sha256:0a95ef02c0408cfffd0f163662769d41c92a4f8aaacf50147c270e66eccab7fbsize 16555458123version https://git-lfs.github.com/spec/v1oid sha256:de3afc1fa86a28dd53476bc158d15cedcf2b80c9c389cc9b04e4ed7ae7f98d44size 15974936123version https://git-lfs.github.com/spec/v1oid sha256:ec5ab1ac68ba802d693d01fa1fa89a79d64b1735003341e98ac03936e9248b7asize 17897021123version https://git-lfs.github.com/spec/v1oid sha256:e87eee2a37dcf86f58dc4e9cb6e35fcbbb039753d2208507279e525818e8736asize 18345933123version https://git-lfs.github.com/spec/v1oid sha256:542528f8a4345314e9ff96f002359305ae2093c623357d676209550a73d231c8size 20068819123version https://git-lfs.github.com/spec/v1oid sha256:93a6a9d28f508d6819a449d9241e9164eabf0976aec01a2827dbc94f89094e97size 19938675123version https://git-lfs.github.com/spec/v1oid sha256:af21f860848f159c5e7a8ce42b37c167ff088ea749c9e81eaee74760b41e00e8size 21231521.gitattributesAdded+60
README.mdAdded+553
data/2006/2006-10.parquetAdded+3
data/2006/2006-11.parquetAdded+3
data/2006/2006-12.parquetAdded+3
data/2007/2007-01.parquetAdded+3
data/2007/2007-02.parquetAdded+3
data/2007/2007-03.parquetAdded+3
data/2007/2007-04.parquetAdded+3
data/2007/2007-05.parquetAdded+3
data/2007/2007-06.parquetAdded+3
data/2007/2007-07.parquetAdded+3
data/2007/2007-08.parquetAdded+3
data/2007/2007-09.parquetAdded+3
data/2007/2007-10.parquetAdded+3
data/2007/2007-11.parquetAdded+3
data/2007/2007-12.parquetAdded+3
data/2008/2008-01.parquetAdded+3
data/2008/2008-02.parquetAdded+3
data/2008/2008-03.parquetAdded+3
data/2008/2008-04.parquetAdded+3
data/2008/2008-05.parquetAdded+3
data/2008/2008-06.parquetAdded+3
data/2008/2008-07.parquetAdded+3
data/2008/2008-08.parquetAdded+3
data/2008/2008-09.parquetAdded+3
data/2008/2008-10.parquetAdded+3
data/2008/2008-11.parquetAdded+3
data/2008/2008-12.parquetAdded+3
data/2009/2009-01.parquetAdded+3
data/2009/2009-02.parquetAdded+3
data/2009/2009-03.parquetAdded+3
data/2009/2009-04.parquetAdded+3
data/2009/2009-05.parquetAdded+3
data/2009/2009-06.parquetAdded+3
data/2009/2009-07.parquetAdded+3
data/2009/2009-08.parquetAdded+3
data/2009/2009-09.parquetAdded+3
data/2009/2009-10.parquetAdded+3
data/2009/2009-11.parquetAdded+3
data/2009/2009-12.parquetAdded+3
data/2010/2010-01.parquetAdded+3
data/2010/2010-02.parquetAdded+3
data/2010/2010-03.parquetAdded+3
data/2010/2010-04.parquetAdded+3
data/2010/2010-05.parquetAdded+3
data/2010/2010-06.parquetAdded+3
data/2010/2010-07.parquetAdded+3
data/2010/2010-08.parquetAdded+3
data/2010/2010-09.parquetAdded+3