honesthook

hackernews-api/story

Hacker News story API — one story by id, without the comments

One story by its numeric id. Returns the story and the comment count, never the comment texts.

Parameters

NameWhat it is
idThe Hacker News item id. Digits only.

Handle format and anchor

Fields returned

What this endpoint does not return.

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

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.

Cost

1 credit per call. A call that finds nothing costs nothing.

Why is metrics.comments sometimes null instead of 0?

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.

Other routes for this platform

← hackernews-api