Hacker News Scraper: Stories, Scores and Comments
Pricing
from $0.40 / 1,000 story or comments
Hacker News Scraper: Stories, Scores and Comments
Hacker News as clean JSON: ranked stories from the top, new, best, ask, show and job feeds with score, author, domain and comment count, plus optional top-level comments. Filter by score or age; only-new mode for scheduled runs. $0.40 per 1,000 items.
Pricing
from $0.40 / 1,000 story or comments
Rating
0.0
(0)
Developer
jules imbert
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
14 hours ago
Last modified
Categories
Features
Share
Turn the official Hacker News API into a ranked JSON dataset: one row per story, optionally per top-level comment, ready for SQL, a spreadsheet or a monitoring pipeline.
What you get
- Stories from the
top,new,best,ask,showandjobfeeds with their rank at scrape time. - Title, target URL, domain, author, score, comment count, creation time and the Hacker News permalink.
- Self-post text with HTML stripped, flags for dead and deleted items.
- Optional top-level comment rows (up to 50 per story) tagged
recordType: "comment". - An only-new mode that remembers delivered story IDs, so a scheduled run emits only what appeared since.
Real output shape (trimmed):
{"recordType": "story","feed": "top","rank": 1,"id": 50606192,"title": "Free alternative TV network built from the Internet Archive's forgotten videos","url": "https://spelunkr.tv","domain": "spelunkr.tv","hnUrl": "https://news.ycombinator.com/item?id=50606192","author": "SockThief","score": 382,"commentsCount": 55,"createdAt": "2026-11-23T01:13:51.000Z"}
Who it's for
- Trend analysts who need rank and score history, not a front-page screenshot.
- Newsletter writers mining headlines, dominant domains and comment activity.
- Founders and investors watching which products reach the front page.
- Data engineers feeding a warehouse or dashboard on a cron.
How to use
- Choose
feeds(defaulttop) andmaxItemsper feed (up to 1,000). - Optionally set
minScore,sinceHoursandmaxCommentsPerStoryto add top-level comment rows. - Run it and export JSON, CSV or Excel. For a digest, turn on
onlyNewSinceLastRunwith a distinctstateKeyper schedule.
Example input:
{"feeds": ["top"],"maxItems": 20,"minScore": 100,"maxCommentsPerStory": 3}
Pricing
Pay per event, no subscription: $0.0005 per run start (one event per GB of memory, minimum one) plus $0.0004 per story or comment written to the dataset.
| Volume (Free plan) | Cost |
|---|---|
| 100 items | $0.0405 |
| 1,000 items | $0.4005 |
maxItems caps stories per feed, not total rows: combining feeds and comments multiplies the number of billed items.
Set the run's Maximum cost per run in Apify to cap spending in advance.
FAQ
Is an API key needed? No. The actor reads the public Hacker News API, the same source as news.ycombinator.com.
Does it need a proxy? No: it uses an API, not HTML scraping.
Can I get comments?
Yes, top-level comments only (up to 50 per story) with maxCommentsPerStory. Deeper replies are not fetched.
How do I track what climbs the front page?
Run it hourly on top and compare rank per id between runs; store scrapedAt to order the snapshots.
How do I avoid duplicates on a schedule?
Set onlyNewSinceLastRun: true, with a distinct stateKey for each schedule; nothing new is a success with zero rows.
Can I search by keyword or user? No. The actor reads the six feeds; there is no keyword search or user-profile endpoint.
Limits
- Comments are top-level only; no full threads.
rankis a snapshot at run time.- Deleted and dead items are skipped, so
commentsCountcan exceed the comment rows you receive. feedsaccepts onlytop,new,best,ask,showandjob.- If no story is collected the run fails instead of returning an empty dataset.
- Not affiliated with Y Combinator or Hacker News.