hackernews-api/story
One story by its numeric id. Returns the story and the comment count, never the comment texts.
| Name | What it is |
|---|---|
id | The Hacker News item id. Digits only. |
id (digits, up to 12)id + titleidtitleurlpublished_atmetrics.pointsmetrics.commentschildren — The comment tree is discarded. Each of those 176 comments carries an author and a body from a person who is not the caller and did not ask for this. The count survives because a count measures without identifying.author — Same decision as every other surface here.comments on a comment id — An id that belongs to a comment rather than a story is a 404. Upstream answers 200 for both, with title null on the comment — without that anchor the caller would get somebody's comment text in a field labelled story, with success true.A field we cannot read comes back null, never 0. A zero would be a claim about the account; null is a fact about our collection.
Measured on item 46990729 on 2026-09-30: the upstream response is 489,835 bytes and carries 176 comments. What this endpoint returns is one item, and 176 as a number.
1 credit per call. A call that finds nothing costs nothing.
Because this upstream endpoint has no num_comments field — the count is derived from the children array. When that array does not come, we do not know the number, and null says so.
Call hackernews-api/story from your own code with one key.