Hacker News hub

Hacker News User Comments API

Page a user's comments newest first — text, parent ids, and item URLs for author voice analysis.

GET /v1/hackernews/users/{username}/comments

1 credit per successful request.

About this endpoint

Reputation and influence jobs care about what someone says, not only what they submit. Pulling an author's comment stream from the HTML profile is slow; search-by-author mixes comments with stories unless you filter carefully and still may miss older pages.

`GET /v1/hackernews/users/{username}/comments` lists comments for a case-sensitive username, newest first. Optional zero-based `page` and `pageSize` (1–50, default 20) control the window (up to 1,000 accessible hits). On `found`, `data.items` are comment-shaped rows with text, parentId, and itemUrl; `data.page` reports hasMore and nextPage. `not_found` returns null user and empty items.

Credit pricing for this operation comes from the API registry and appears on this page, and `meta.creditsCharged` is the billing source of truth. Pair with comment context when you need the root story for a specific comment id.

Hacker News User Comments API FAQ

How do I list a Hacker News user's comments?

Call GET /v1/hackernews/users/{username}/comments with your Social Fetch API key in the x-api-key header. Pass the case-sensitive username. Optionally set page and pageSize. Read data.lookupStatus, then data.items.

How many credits does listing user comments cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged — that field is the billing source of truth.

How does pagination work on user comments?

Use zero-based page and pageSize. When data.page.hasMore is true, request nextPage with the same username and pageSize. Do not invent cursors — this route uses page indexes.

What fields are in each comment item?

Items are comment-typed and can include id, author, createdAt, text, parentId, childIds, dead, deleted, and itemUrl. Title and url are typically null on comments. Exact fields live in the OpenAPI schema.

User comments vs story comments vs comment context?

User comments lists one author's comments across threads. Story comments pages one story's tree. Comment context expands a single comment id upward to the root story.

What does lookupStatus mean?

found means the username resolved and items may be returned. not_found means the user does not exist. Always branch on lookupStatus before writing rows.

Can I use this for voice or reputation analysis?

Yes. Teams page recent comments, store text keyed by id, and optionally call comment context for thread titles when a reply needs fuller context. Persist meta.requestId per page.