Hacker News comments scraper
$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.
| Input | Type | Required | What it does |
|---|---|---|---|
stories | string[] | yes | Hacker News story ids or item URLs, one per line. |
max_results | integer | no | How 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.
| Field | Type | What it holds |
|---|---|---|
rank | integer | 1-based delivery order: a comment, then its replies. |
story_id | string · nullable | Id of the story the comment belongs to. |
story_title | string · nullable | Title of the story. |
comment_id | string | Hacker News id of the comment. |
parent_id | string · nullable | Id of the item it answers (the story for a top-level comment). |
reply_to | string · nullable | Author of the comment it answers; null for a top-level comment. |
depth | integer | 1 for a top-level comment, 2 for a reply to it, and so on. |
author | string · nullable | Username of the commenter. |
text | string · nullable | Comment as plain text. |
created_at | string · nullable | Posted at (ISO 8601). |
replies | integer | Direct replies to the comment. |
url | string | Link 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/.
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
$ 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.
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.
Pay as you go
- $2 free credit / month
- 20 requests / min (300 on real balance)
- List unit prices
Starter
- $15 free credit / month
- 300 requests / min
- 10% off unit prices
Growth
- $50 free credit / month
- 600 requests / min
- 20% off unit prices
Scale
- $250 free credit / month
- 1,200 requests / min
- 30% off unit prices
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 scraper | This collector | |
|---|---|---|
| Requests | One call per comment, or your own walk through the tree | One run for the whole thread |
| Text | HTML entities and tags | Plain text |
| Structure | Nested children to walk | Flat rows with depth, parent_id and reply_to |
| Context | A comment without its story | story_id and story_title on every row |
| Several threads | A loop over stories | Many story ids in one run |
| Billing | Your servers and your time | Only delivered comments |
Sources and standards
The platform documentation and standards this collector is built against — check any claim on this page against the primary source:
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.
