Hacker News hub

Hacker News Updates API

Poll the HN changes feed — recently touched item ids and usernames — then hydrate only what moved.

GET /v1/hackernews/updates

1 credit per successful request.

About this endpoint

Corpus freshness jobs should not re-download the front page or every watched story on every tick. Hacker News publishes a thin updates list of recently changed item ids and usernames. Your cron can poll that set, then hydrate only the ids that matter with items, stories, or user routes.

`GET /v1/hackernews/updates` returns `data.changedItemIds`, `data.changedUsernames`, and `data.fetchedAt`. Send `x-api-key`; there is no path parameter. Pair with `GET /v1/hackernews/maxitem` when you also track the high-water mark of new ids, not just mutations to existing ones.

Credit pricing for this operation comes from the API registry and appears on this page, and `meta.creditsCharged` is the billing source of truth. This route does not return full item bodies — fan out to items or users after you filter the id lists.

Hacker News Updates API FAQ

How do I poll Hacker News updates via API?

Call GET /v1/hackernews/updates with your Social Fetch API key in the x-api-key header. Read data.changedItemIds, data.changedUsernames, and data.fetchedAt. Then hydrate selected ids with items or users routes.

How many credits does the updates poll 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.

Does updates return full stories or profiles?

No. It returns id and username lists only. Use GET /v1/hackernews/items/{id} or GET /v1/hackernews/users/{username} (and related routes) to hydrate payloads you care about.

Updates vs maxitem?

Updates lists recently changed existing items and users. maxitem returns the current largest item id — useful for discovering brand-new ids. Many freshness pipelines poll both.

How often should I poll updates?

Match your product SLA. Short intervals catch edits and new comments faster but spend more credits. Always confirm billing with meta.creditsCharged and store fetchedAt for debugging.

Do I need a Hacker News account?

No. Social Fetch authenticates with your Social Fetch API key only. The route mirrors the public HN updates endpoint under the shared marketplace envelope.

Can I use this for incremental sync?

Yes. Teams keep a watched set of item ids, intersect with changedItemIds each poll, and only re-fetch overlaps. Persist meta.requestId when a sync tick needs support review.