Hacker News new | ask | show | jobs
by SilverElfin 122 days ago
Is there a place to get an archive of all HN posts and historical comments?
4 comments

Check HackerBook https://github.com/DOSAYGO-STUDIO/HackerBook

Repo packages 20 years of Hacker News into a static archive you can run entirely in your browser. The site is just files: HTML, JSON, and gzipped SQLite shards. No server app required.

Easiest way might be to use google cloud's 'bigquery' tool which lets you query hn data with SQL

I just tried

    SELECT *
    FROM `bigquery-public-data.hacker_news.full` 
and it returns 47049059 rows. And

    SELECT
      MAX(timestamp) AS most_recent_timestamp
    FROM `bigquery-public-data.hacker_news.full`;
gives 2026-02-21 09:12:49 UTC, so it checks out.
There's a BigQuery public dataset

  bigquery-public-data.hacker_news.full
There are some data sets but Hacker News has a non rate-limited API (see the bottom of the page) so you can just build one yourself.

I don't think you can get the content of flagged posts without actually scraping the site but that'll get you banned.