Source

Query Hacker News with SQL

Every Hacker News story and comment, queryable with read-only SQL — source-native records, timestamps, authors, scores, and a live tail.

Surface

  • Records45M+ stories + comments
  • Canonicalhackernews.items
  • FreshnessLive
  • Cadencefull archive plus live tail; measured lag in /v1/scry/schema
  • MethodPublic Hacker News item API and archive-derived source-native records.
  • StatsLast stats snapshot: 2026-08-20T11:58:15Z

Query surfaces

  • hackernews.items

Public Hacker News item API and archive-derived source-native records.

Best for

phrase coinage and terminology diffusion
author-level activity and score histories
public discussion around technical topics

Fields

  • hn_id
  • kind
  • title
  • payload
  • original_author
  • original_timestamp
  • upvotes
  • comment_count
  • story_hn_id
  • uri

Queries

Recent Hacker News items

Start from a bounded source-native sample before adding filters or aggregates.

SELECT hn_id, title, original_author, original_timestamp, uri
FROM hackernews.items
WHERE title != ''
ORDER BY hn_id DESC
LIMIT 20;

Author activity over time

Aggregate public Hacker News posts and comments by author and year.

SELECT toYear(original_timestamp) AS year,
       count() AS items,
       sum(ifNull(upvotes, 0)) AS upvotes
FROM hackernews.items
WHERE original_author = 'pg'
  AND original_timestamp IS NOT NULL
GROUP BY year
ORDER BY year DESC
LIMIT 20;

Gaps

  • Notedeleted or unavailable items remain marked as deleted rather than reconstructed
  • Noteauthors and timestamps may be absent on incomplete source records

Related proof pages