The Mine Works
Hacker News Scraper
← All Scrapers
Apify Actor · Research

Hacker News Scraper

HN stories and comments from lists, search, users or threads

View on Apify Store →
From $0.18 / 1,000 rows
Status
State ● Live
Pricing PPE
Category Research
Overview

What it does

Reads Hacker News through its own free public APIs. One field picks the mode: the top, new, best, Ask HN, Show HN and jobs lists in site order, a keyword search with a date range and minimum points and comments, a user's submissions, or any story or comment with the replies underneath. Comments arrive as their own flat rows with depth, parent_id, story_id and reply_count, so you can filter on direct replies or rebuild the tree. Relevance sorting stops at 1,000 results per keyword, while date sorting reaches back to 2007.

Features

Built in

  • ✓ Six live lists: top, new, best, ask, show, jobs
  • ✓ Comment rows with depth, parent_id, reply_count
  • ✓ Date range plus minimum points and comments
  • ✓ Monitor mode returns only items not seen before
  • ✓ Search titles, links, story text or comments
FAQ

Common questions

What do story and comment rows hold? +

Story rows carry id, title, url, domain, points, author, comment_count, created_at, type, hn_url, text, rank and position. Comment rows carry id, parent_id, story_id, story_title, author, text, created_at, depth, reply_count and thread_position. record_type tells the two apart.

What is the price per row? +

$0.00018 per row on every Apify plan, which is $0.18 per 1,000 rows, plus a flat $0.003 per run. The summary, info and error rows are never charged, and with monitor mode on, items an earlier run delivered are skipped without a charge.

Does it need an account or API key? +

No. Hacker News publishes free public APIs and the actor reads those, so there is no login, no key and no cookies. That also keeps it fast: a front page of 50 stories took three seconds in testing.

How far can a keyword search reach? +

Newest first goes back as far as Hacker News does, past the usual 1,000 result cap, and one keyword returned 2,500 stories in six seconds during testing. Most relevant first is capped at 1,000 per keyword. Typo matching is off, so rust will not return just.

How do I control how many comments come back? +

includeComments switches them on, maxCommentDepth sets how many reply levels to read and maxCommentsPerStory caps each thread, keeping the higher levels first. In item mode comments are always on, which is how you pull one full thread.

Get Started

Try it on Apify.

Pay only for results delivered. No credit card required to sign up.

Apify Store

Find a ready-made scraper for your job

Apify has over 80,000 scrapers and automations, ours included. Start free with $5 of platform credit every month.