Hacker News Comments Scraper avatar

Hacker News Comments Scraper

Pricing

from $0.10 / 1,000 comments

Go to Apify Store
Hacker News Comments Scraper

Hacker News Comments Scraper

Every comment under the Hacker News stories you list, one row each with text, username, time, parent comment and depth, so threads can be rebuilt or read flat. Paste story links or IDs; a new-only mode returns just the comments added since your last run.

Pricing

from $0.10 / 1,000 comments

Rating

0.0

(0)

Developer

deriverge s.r.o.

deriverge s.r.o.

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

Hacker News Comments Scraper returns the comments under the Hacker News stories you give it, one row per comment: the text, the commenter's username, when it was posted, the comment it replies to and its depth, so you can rebuild the tree or read the discussion flat. Paste story links such as https://news.ycombinator.com/item?id=44567857 or bare IDs and click Start. Each story takes a single request, and the thread comes back up to the cap you set, 1,000 comments by default. It costs $0.20 per 1,000 comments on the Free plan ($0.10 on Business), and the $5 of monthly credit in Apify's Free plan covers about 25,000 comments.

What data does it return?

FieldDescription
id, hnUrlThe comment's ID and its own page, such as https://news.ycombinator.com/item?id=48434690.
storyId, storyTitleID and title of the story the comment sits under.
parentIdID of the comment this one answers, null when it replies to the story itself.
depthLevel in the thread: 0 under the story, 1 for an answer to that, and so on. For a comment link, the linked comment is 0. The five threads in our test went 15 levels deep.
authorHacker News username of the commenter.
createdAtWhen the comment was posted, ISO 8601 in UTC.
textThe comment as plain text. Paragraph breaks become blank lines, quotes and links keep their visible text.
type, keyAlways comment, and the key comment:<id> that new-only mode compares between runs.

How to scrape Hacker News comments

  1. In Stories, enter one story per line, either as a link from news.ycombinator.com or as the number after id=, such as 44567857. A link to a single comment returns that comment and the replies under it.
  2. Set Maximum comments per story. It counts replies too, and the thread is read from the top, so a cap keeps the oldest comments with their replies.
  3. Set Maximum rows if you want a cap for the whole run (20,000 by default), and click Start.
  4. The comments land in the Output tab in thread order, each one followed by its replies, and you can export them as CSV, Excel or JSON. The SUMMARY record in the key-value store counts comments and lists links it could not use.

For the API:

{
"stories": [
"https://news.ycombinator.com/item?id=44567857",
"41523070"
],
"maxCommentsPerStory": 5000
}

Example output

A reply two levels deep in a June 2026 thread with 1,056 comments, read on 11 October 2026. The line starting with > quotes the comment it answers. The username is replaced with hn_user; the other values are as returned.

{
"type": "comment",
"key": "comment:48434469",
"id": 48434469,
"storyId": 48434312,
"storyTitle": "LLMs are eroding my software engineering career and I don't know what to do",
"parentId": 48434423,
"depth": 2,
"author": "hn_user",
"createdAt": "2026-06-07T13:10:35.000Z",
"text": "> Exactly zero percent of the market is willing to pay for hand-built software.\n\nPeople are increasingly associating “AI art” with cheap slop. I wonder if the same will ever happen to programming.",
"hnUrl": "https://news.ycombinator.com/item?id=48434469"
}

How much does it cost to scrape Hacker News comments?

Free planStarterScaleBusiness
1,000 comments$0.20$0.16$0.13$0.10

You pay only for the events in the table. There is no start fee, and compute time and proxies are included.

Five large threads about language models, with 6,207 comments between them, cost $1.2414 on the Free plan and $0.6207 on Business. In new-only mode you pay only for comments posted since the previous run.

Limits

  • Comments on the same level come oldest first. That is the order of posting, which differs from the ranking Hacker News shows on the story page.
  • The default cap of 1,000 comments per story cuts off busy threads: the largest of our five test threads had 1,627 comments. Raise Maximum comments per story to read them in full.
  • Deleted comments are skipped. A reply to a deleted comment keeps that comment's ID in parentId.
  • Story details such as points and the link are not part of the rows; storyTitle is the only story field. Hacker News Search Scraper returns stories with their numbers.
  • A story that does not exist is named in the notes of the SUMMARY record and adds no rows.
  • The five test threads, 6,207 comments in all, took 8.5 seconds on 11 October 2026.

Following a live discussion

Save the input as a task, or give it a Watch name, turn on Return only rows new since the last run and schedule it every hour while a story is active. Each run returns only the comments that no earlier run of the watch returned. Keep Maximum comments per story above the size of the thread, because comments past it are not read. Comments that Maximum rows or your spending limit cut off are not counted as seen, and the next run returns them: a thread of 1,056 comments with Maximum rows at 400 came in three runs of 400, 400 and 256 on 11 October 2026.

FAQ

Comments on Hacker News are public, and the actor reads them through the public Hacker News search API at hn.algolia.com without logging in. Each row holds the comment and the username it was posted under; profiles, karma and email addresses are not collected. You are responsible for how you use and quote the comments.

How do I rebuild the thread?

Every comment has parentId and depth. Comments with parentId set to null start the branches, and the rest attach to the comment named in parentId. For a flat reading order, sort by the row order of the dataset, which already follows the thread.

Where do I find the stories to read?

Hacker News Search Scraper finds stories by keyword, date and points, and its id column can be pasted straight into Stories.

Support

This actor is built and maintained by deriverge s.r.o., a software company based in the Czech Republic. If a run fails or a field you need is missing, please open an issue in the Issues tab or write to us at info@deriverge.com. We respond in English and Czech. Runs can be scheduled in Apify Console or started from the API tab, which has examples for Python, JavaScript and cURL and works with Make, Zapier, n8n and the Apify MCP server. If the actor saves you time, a short review helps other people find it.