# Hacker News Comments Scraper — $0.00005 each

> Hacker News comments scraper: the full comment tree of any story as rows, with author, plain text, date, depth, parent and replies. $0.00005 per comment.

[Home](https://quanticdata.io/) / [Collectors](https://quanticdata.io/collectors/) / Hacker News Comments Scraper

[All collectors](https://quanticdata.io/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.

By [Aldo Morese](https://quanticdata.io/about/), founder of QuanticData · Published Nov 13, 2026

[Get my free API key](https://app.quanticdata.io/register?utm_source=collector-page&utm_medium=website&utm_campaign=data-api&utm_content=hacker-news-comments-api-hero) · [See the request](https://quanticdata.io/collectors/hacker-news-comments-api/#integration)

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

On this page:

- [Try it](https://quanticdata.io/collectors/hacker-news-comments-api/#try)
- [What it is](https://quanticdata.io/collectors/hacker-news-comments-api/#what)
- [Limits](https://quanticdata.io/collectors/hacker-news-comments-api/#caps)
- [Output fields](https://quanticdata.io/collectors/hacker-news-comments-api/#output)
- [Inputs](https://quanticdata.io/collectors/hacker-news-comments-api/#input)
- [Pricing](https://quanticdata.io/collectors/hacker-news-comments-api/#pricing)
- [Integration](https://quanticdata.io/collectors/hacker-news-comments-api/#integration)
- [Use cases](https://quanticdata.io/collectors/hacker-news-comments-api/#use-cases)
- [Versus the alternatives](https://quanticdata.io/collectors/hacker-news-comments-api/#compare)
- [FAQ](https://quanticdata.io/collectors/hacker-news-comments-api/#faq)

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/scraper/collectors/hacker_news_comments/run`.

cURL:

```bash
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}'
```

Python:

```python
import requests

r = requests.post(
    "https://api.quanticdata.io/v1/scraper/collectors/hacker_news_comments/run",
    headers={"Authorization": f"Bearer {QD_API_KEY}"},
    json={
        "stories": ["8863"],
        "max_results": 50
    },
    timeout=120,
)
for row in r.json()["payload"]["results"]:
    print(row)
```

Node.js:

```javascript
const res = await fetch(
  "https://api.quanticdata.io/v1/scraper/collectors/hacker_news_comments/run",
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.QD_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({"stories":["8863"],"max_results":50}),
  },
);
const { payload } = await res.json();
console.table(payload.results);
```

MCP:

```bash
claude mcp add quanticdata \
  -e QUANTICDATA_API_KEY=qd_live_your_key_here \
  -- npx -y quanticdata-mcp

# then, in the chat:
> run the hacker_news_comments collector with stories=["8863"]
```

Example response

POST /v1/scraper/collectors/hacker_news_comments/run

```bash
$ 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
```

Price

## Limits, in plain numbers

Everything that bounds one run of this collector. No hidden throttles.

Max per run

2000 comments

Price

$0.00005 / comment

Per 1,000

$0.05

Failed runs

Free zero rows, zero charge

Free every month

$2 no card

Rate limit

20 req/min on the free tier

Changelog

- `v1.0.0` 2026-11-11 Initial release

  The full comment thread of Hacker News stories, one call per story.

Every run records the collector version it ran on. Breaking output changes bump the major version.

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](https://app.quanticdata.io/register?utm_source=collector-page&utm_medium=website&utm_campaign=data-api&utm_content=hacker-news-comments-api-closing)

![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.](https://quanticdata.io/collectors/hacker-news-comments-api/diagram.webp?v=20261002s)

*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 / comment** · 40,000 comments on the free $2 every month

**Semantic input** · stories, max_results — no URL lists

**Up to 2000** comments per run, pagination handled for you

**12 fields** · one 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.00005** per delivered comment · *$0.05 per 1,000 delivered comments*

**40,000 comments** · on the free allowance · *$2 every month, no card*

**Zero rows** · zero charge · *a run that delivers nothing is free*

**−30%** on volume tiers · *the catalog returns your key's price*

- [Pay as you go](https://app.quanticdata.io/register?utm_source=collector-page&utm_medium=website&utm_campaign=data-api&utm_content=hacker-news-comments-api-tier-1): $0/mo · $2 free credit / month · 20 requests / min (300 on real balance) · List unit prices
- [Starter](https://app.quanticdata.io/register?utm_source=collector-page&utm_medium=website&utm_campaign=data-api&utm_content=hacker-news-comments-api-tier-2): $19/mo · $15 free credit / month · 300 requests / min · 10% off unit prices
- [Growth](https://app.quanticdata.io/register?utm_source=collector-page&utm_medium=website&utm_campaign=data-api&utm_content=hacker-news-comments-api-tier-3): Most popular · $79/mo · $50 free credit / month · 600 requests / min · 20% off unit prices
- [Scale](https://app.quanticdata.io/register?utm_source=collector-page&utm_medium=website&utm_campaign=data-api&utm_content=hacker-news-comments-api-tier-4): $299/mo · $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](https://quanticdata.io/web-data-api-for-ai/). 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](https://quanticdata.io/collectors/hacker-news-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 |

![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.](https://quanticdata.io/collectors/hacker-news-comments-api/diagram2.webp?v=20261002s)

*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:

- [Hacker News API (official)](https://github.com/HackerNews/API)
- [HN Search API](https://hn.algolia.com/api)
- [The thread on this page: item 8863](https://news.ycombinator.com/item?id=8863)

## FAQ

Questions we get about the Hacker News comments scraper.

[Something else? Ask us](https://quanticdata.io/collectors/hacker-news-comments-api/#ask)

### 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](https://app.quanticdata.io/register?utm_source=collector-page&utm_medium=website&utm_campaign=data-api&utm_content=hacker-news-comments-api-cta-3)

![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.](https://quanticdata.io/collectors/hacker-news-comments-api/hero.webp?v=20261003c1)

Related:

- [All 100+ collectors](https://quanticdata.io/collectors/)
- [Hacker News scraper API](https://quanticdata.io/collectors/hacker-news-api/)
- [Reddit comments scraper](https://quanticdata.io/collectors/reddit-comments-api/)
- [Stack Overflow scraper API](https://quanticdata.io/collectors/stack-overflow-api/)
- [Documentation](https://quanticdata.io/docs/)

---

Source: https://quanticdata.io/collectors/hacker-news-comments-api/ · Site index for AI: https://quanticdata.io/llms.txt
