API · Hacker News
GET /hackernews/items/{id}/comments
Every comment under a Hacker News story, flattened in reading order.
| |
|---|
| Request | GET /v1/hackernews/items/{id}/comments |
| Operation id | hackernews.story.comments |
| Cost | 1 credit, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
Every comment under a Hacker News story, flattened in reading order.
| Name | Type | Required | Description |
|---|
id | string | yes | An item id or its link (news.ycombinator.com/item?id=…). Example: 8863. |
| Name | Type | Required | Description |
|---|
since | string | no | Only rows published on or after this date: YYYY-MM-DD (midnight UTC) or an ISO 8601 timestamp. Example: 2026-01-01. |
until | string | no | Only rows published on or before this date: YYYY-MM-DD (that whole UTC day) or an ISO 8601 timestamp. Example: 2026-12-31. |
| Status | Meaning | Schema |
|---|
200 | The story and its comments. | HackerNewsThread |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | The item or user does not exist. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | Hacker News is temporarily unavailable. Retryable; nothing was charged. | Error |
| Field | Type | Description |
|---|
story | HackerNewsItem | |
comments | HackerNewsComment[] | |
comment_count | integer | Comments returned (after since/until). |
Errors use one shape everywhere; see Errors for every code and what to do.