docs / hackernews

Hacker News

Stories, comments, users and full-text search.

base /hackernews/v17 endpoints
post/hackernews/v1/item1 credit

single item by id (story/comment/job/poll/pollopt) — all official fields + time_iso/kids_count/hn_url; hydrate_kids=resolve top-level comments

ParameterAllowed / rangeDescription
idrequiredHackerNews item id (story/comment/job/poll/pollopt) — the digits in an item URL (news.ycombinator.com/item?id=...).
hydrate_kids = falseoptionalIf true, resolve the item's top-level comments into full objects instead of bare ids.
kids_limit = 30optional1–100When hydrate_kids=true, how many top-level comments to resolve (1-100).
Try in playground →
post/hackernews/v1/item_tree1 credit

full nested comment TREE for a story in ONE call; recursive children + descendants count

ParameterAllowed / rangeDescription
idrequiredHackerNews item id (story/comment/job/poll/pollopt) — the digits in an item URL (news.ycombinator.com/item?id=...).
Try in playground →
post/hackernews/v1/user1 credit

user profile by id: karma/created/about/submitted; hydrate_submitted=resolve recent submissions

ParameterAllowed / rangeDescription
idrequiredHackerNews username (case-sensitive), e.g. 'pg'.
hydrate_submitted = falseoptionalIf true, resolve the user's recent submissions into full objects instead of bare ids.
submitted_limit = 20optional1–100When hydrate_submitted=true, how many recent submissions to resolve (1-100).
Try in playground →
post/hackernews/v1/stories2 credits

story-list (list=top/new/best/ask/show/job) → ranked hydrated stories; offset/limit pagination, hydrate=false for ids only

ParameterAllowed / rangeDescription
list = topoptionaltop · new · best · ask · show · jobWhich HackerNews story list to return.
limit = 30optional1–100Stories to return (1-100, default 30). Out-of-range values are clamped.
offset = 0optional0–500Pagination offset into the story list (0-500). Skip N ranked stories.
hydrate = trueoptionalIf true, resolve each ranked story id into full objects instead of bare ids (default true).
Try in playground →
post/hackernews/v1/updates1 credit

live changefeed: recently changed item ids + profiles + max_item; hydrate=resolve changed items

ParameterAllowed / rangeDescription
hydrate = falseoptionalIf true, resolve the changed item ids into full objects instead of bare ids.
limit = 30optional1–100Changed items to hydrate (1-100, default 30). Out-of-range values are clamped.
Try in playground →
post/hackernews/v1/max_item1 credit

the current largest item id on Hacker News — the newest id, useful for backfilling / id-range walks

Try in playground →