Hacker News Feeds API
Page ranked HN feeds — top, new, best, ask, show, and jobs — with hydrated story and job items in JSON.
GET /v1/hackernews/feeds/{feed}1 credit per successful request.
About this endpoint
Front-page digests, Show HN roundups, and jobs boards need ranked lists hydrated into usable rows — title, score, comment count, URL — not a bare array of integers. Homegrown pollers that fan out N item gets for every cron tick burn latency and fail in the same places every time.
`GET /v1/hackernews/feeds/{feed}` takes a path `feed` of `top`, `new`, `best`, `ask`, `show`, or `jobs`. Optional `limit` (1–50, default 30) and zero-based `offset` slice the official feed id list. The response includes `data.feed`, hydrated `data.items`, and `data.page` with offset, returned, totalIds, hasMore, and droppedCount.
Credit pricing for this operation comes from the API registry and appears on this page, and `meta.creditsCharged` is the billing source of truth. For keyword discovery, use search; for a single known id, use stories or items.
Hacker News Feeds API FAQ
How do I list a Hacker News feed via API?
Call GET /v1/hackernews/feeds/{feed} with your Social Fetch API key in the x-api-key header. Set feed to top, new, best, ask, show, or jobs. Optionally pass limit and offset. Read data.items and data.page.
How many credits does a Hacker News feed request 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.
Which feed types are supported?
top, new, best, ask, show, and jobs — the same ranked lists HN publishes. Pass the feed name in the path, not as a query string.
How does pagination work on HN feeds?
Use zero-based offset into the official feed id list and limit for how many items to hydrate per request. When data.page.hasMore is true, advance offset by the previous limit (or returned count) and keep the same feed.
What fields are in each feed item?
Hydrated items can include id, type, author, createdAt, title, text, url, score, commentCount, parentId, childIds, dead, deleted, and itemUrl when present. Coverage follows the public HN item for that id.
Feeds vs search vs Who is Hiring?
Feeds return ranked lists without a keyword. Search is full-text discovery with filters. GET /v1/hackernews/jobs/who-is-hiring parses the monthly Who is Hiring thread into structured job rows — different from the jobs feed of standalone job items.
Can I use this for digests or monitoring crons?
Yes. Teams snapshot top or new on a schedule, store item ids, then call story or comments routes only when a thread needs deeper pull. Log meta.requestId on every page.
Other Hacker News endpoints
- SearchGET /v1/hackernews/search
- StoryGET /v1/hackernews/stories/{id}
- Story commentsGET /v1/hackernews/stories/{id}/comments
- ItemGET /v1/hackernews/items/{id}
- Comment contextGET /v1/hackernews/comments/{id}/context
- UserGET /v1/hackernews/users/{username}
- User submissionsGET /v1/hackernews/users/{username}/submissions
- User commentsGET /v1/hackernews/users/{username}/comments