Documentation Python quickstart Blog Free tools Enterprise solutions hello@quanticdata.ioLog in
All collectors

Hacker News comments scraper

Developers & tech · v1.0.0 · hacker_news_comments

$0.00005 / comment

$0.05 / 1K · pay per delivered comment

A Hacker News comments scraper: send story ids or item URLs and get every comment as a row in reading order, with the author, the text as plain text, the date, its depth in the thread, the comment it answers and its reply count. Up to 2,000 comments per run, billed per comment delivered.

$0.00005 per delivered comment · $2 free every month · Failed runs never billed

What it does

What a Hacker News comments scraper returns

Hacker News threads are where developers say what they think of a launch, a library or a company, and the useful part is often three replies deep. The collector returns the whole tree in the order you would read it, a comment and then its replies, with depth, parent_id and reply_to on every row, so you can rebuild the thread or flatten it for analysis.

On 13 November 2026 the thread of item 8863, the 2007 “My YC app: Dropbox” post, held 71 comments from 41 people: 32 at the top level and replies nested up to five levels deep. At $0.00005 a comment the whole thread costs $0.00355, well under a cent.

Inputs

The whole request. Anything you leave out falls back to the default shown in the catalog.

InputTypeRequiredWhat it does
storiesstring[]yesHacker News story ids or item URLs, one per line.
max_resultsintegernoHow many comments to deliver at most (1–2000). You pay only for delivered comments.

Outputs — 12 fields, one row per comment

What one comment looks like

Every delivered comment carries these fields. Nullable means the source did not publish it — the field stays empty instead of being guessed.

FieldTypeWhat it holds
rankinteger1-based delivery order: a comment, then its replies.
story_idstring · nullableId of the story the comment belongs to.
story_titlestring · nullableTitle of the story.
comment_idstringHacker News id of the comment.
parent_idstring · nullableId of the item it answers (the story for a top-level comment).
reply_tostring · nullableAuthor of the comment it answers; null for a top-level comment.
depthinteger1 for a top-level comment, 2 for a reply to it, and so on.
authorstring · nullableUsername of the commenter.
textstring · nullableComment as plain text.
created_atstring · nullablePosted at (ISO 8601).
repliesintegerDirect replies to the comment.
urlstringLink to the comment.

Integration

One POST, typed rows

Base URL https://api.quanticdata.io/v1, Bearer auth, the same key as every other Data API. Endpoint: POST /v1/scraper/collectors/hacker_news_comments/run.

curl -X POST https://api.quanticdata.io/v1/scraper/collectors/hacker_news_comments/run \
  -H "Authorization: Bearer $QD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"stories":["8863"],"max_results":50}'

Example response

POST /v1/scraper/collectors/hacker_news_comments/run
$ curl $QD/hacker_news_comments/run \
    -H "Authorization: Bearer $QD_API_KEY" \
    -d '{"stories": ["8863"], "max_results": 50}'
{ "status": "done", "count": 50,
  "results": [
    {
      "author": "…",
      "depth": "…",
      "text": "…",
      "created_at": "…" } ],
  "cost": 0.0025 }
# 50 comments × $0.00005 · nothing delivered, nothing charged

Try it

Hacker News comments, running now

Change the input and run it against the live collector — nothing to install, no sign-up.

Run it from your own code, on your own inputs

Same collector, same rows — $2 of free API credit every month, no card.

Get my free API key
Hacker News comments scraper: from stories, QuanticData reads the Hacker News thread and returns one row per comment with author, text and depth, at $0.00005 per delivered comment.
You send Hacker News story ids; every comment comes back as a row with author, text and depth — 12 fields on every row — and you are billed $0.00005 for each comment actually delivered, nothing for a run that delivers none.
$0.00005 / comment40,000 comments on the free $2 every month
Semantic inputstories, max_results — no URL lists
Up to 2000comments per run, pagination handled for you
12 fieldsone row per comment

Pricing

Hacker News Comments Scraper pricing

$0.00005 per delivered comment. A run that delivers nothing costs nothing, and the $2 monthly allowance covers about 40,000 comments before you spend anything.

$0.00005per delivered comment$0.05 per 1,000 delivered comments
40,000 commentson the free allowance$2 every month, no card
Zero rowszero chargea run that delivers nothing is free
−30%on volume tiersthe catalog returns your key's price

Same wallet, same key and same $2 monthly allowance as every other Data API. Prices are launch pricing read live from the billing config — GET /v1/scraper/collectors returns the price your key actually pays.

What people build with the Hacker News comments scraper

Three shapes of work this endpoint was designed around.

Launch and product feedback

Every comment on your Show HN or on a competitor’s, with who said it and in reply to whom, ready to tag as praise, bug report or objection.

Developer sentiment research

Threads about a framework, an API or a company collected over months as plain-text rows for a classifier, next to the stories from the Hacker News scraper API.

Datasets for AI

Technical discussion with its structure kept: depth and parent on every row, so a model sees the questions and the answers to them.

Hacker News Comments Scraper versus rolling your own

The differences that actually cost time when you build this in-house.

DIY scraperThis collector
RequestsOne call per comment, or your own walk through the treeOne run for the whole thread
TextHTML entities and tagsPlain text
StructureNested children to walkFlat rows with depth, parent_id and reply_to
ContextA comment without its storystory_id and story_title on every row
Several threadsA loop over storiesMany story ids in one run
BillingYour servers and your timeOnly delivered comments
Hacker News comments scraper: the POST to the hacker_news_comments collector, 50 comments delivered and the bill, 50 × $0.00005 = $0.0025 in usage.cost_usd; zero comments would cost $0.
The same call you would paste into a terminal: a Bearer key, the story id in the body, and back the envelope every QuanticData endpoint returns — type, message, payload — where count is how many comments arrived and usage.cost_usd is $0.0025, which is 50 × $0.00005. A run that delivers nothing costs nothing.

Sources and standards

The platform documentation and standards this collector is built against — check any claim on this page against the primary source:

FAQ

Questions we get about the Hacker News comments scraper.

Something else? Ask us

How do I scrape all comments on a Hacker News post?

Send the story id (the number after item?id= in the URL) or the full URL, and set max_results up to 2,000. The run returns every comment in reading order, each reply right under the comment it answers.

Is there an official Hacker News API?

Yes. Hacker News publishes its items through a public API, one item per request. This collector returns a story’s whole comment tree in one run as flat rows, with depth and parent already worked out.

What does depth mean in the rows?

Depth 1 is a comment on the story itself, 2 a reply to it, and so on. parent_id gives the item it answers and reply_to the author of that comment, null at the top level.

Is there a free Hacker News comments scraper?

Every account gets $2 of credit every month with no card, which is about 40,000 delivered comments on this endpoint at $0.00005 each. It renews monthly, and a run that delivers nothing is never billed.

How much does one run cost?

Multiply the rows you actually receive by $0.00005. A run capped at 2000 comments — the maximum for this collector — costs $0.10 if every row comes back, and less when the listing has fewer. Volume tiers take up to 30% off, and GET /v1/scraper/collectors returns the price your key actually pays.

Run the Hacker News comments scraper now

$2 of free credit every month, no card. Your key returns its own prices from GET /v1/scraper/collectors.

Get my free API key
Illustration: three coloured zones of the page that is read (Hacker News thread) turn into clean JSON with the fields author, text and depth; 12 fields on every row.