List Hacker News story IDs · Hacker News API
List Hacker News story ids from a named feed. Use `/hacker-news/items/{id}` to fetch item details.
Using ChatGPT, Claude Code or another client? See the setup steps
curl https://api.unifapi.com/hacker-news/stories/{feed} \
-H "Authorization: Bearer $UNIFAPI_KEY"Parameters
- feedpathrequired
- Story feed: top, new, best, ask, show, or jobs.
- cursorquery
- Zero-based offset cursor returned as `next_cursor`.
- limitquery
- Integer from 1 to 500. Defaults to 100.
This operation is part of the Hacker News API in the news category. It uses the same Bearer token, request tracing, error model, and billing envelope as every UnifAPI endpoint, so agents can switch between platforms without custom per-vendor glue code.
Use it when a workflow needs Hacker News public data alongside other news and community sources, but should still keep one API key, one account balance, and one predictable JSON contract.
Common agent workflows
- Look up public Hacker News data for agents that need reliable open-web context.
- Give an AI agent a stable Hacker News data source without building a per-platform integration.
- Normalize Hacker News responses into the same UnifAPI envelope used across the catalog.
Unified envelope, platform-native fields
- List-style responses return `data` as an array of top-level records plus optional `pagination` for continuation tokens or cursors.
- This operation has a zero-credit multiplier, so successful responses include zero-charge billing metadata.
- If the workspace balance cannot cover every result, the response can be truncated and `billing.truncated_due_to_balance` tells the caller why.
Response status codes
Billing
This operation is free: it has a zero-credit multiplier and still returns billing metadata with zero credits charged.
Errors and retries
Authentication, validation, rate-limit, not-found, and provider errors use the unified UnifAPI error format. Agents should log `request_id`, retry only retryable failures, and treat invalid API keys, disabled keys, and expired keys as the same public `unauthorized` error type.
Agents & Skills built on Hacker News
You rarely call List Hacker News story IDs by hand. These prebuilt agents and skills already read Hacker News data inside Claude or Codex — start from one of them, or call this endpoint yourself.
More Hacker News operations
Combine endpoints from the same platform, then join the results with other UnifAPI categories without changing authentication or response parsing.
Search Hacker News stories and comments
Full-text search over Hacker News stories, comments, polls and jobs with filters for type, author, domain, date range and points. Paginate with `cursor`.
List Hacker News story items
Fetch item details from a named Hacker News story feed in one operation. Use this when an agent needs readable story titles, URLs, scores, authors, or comment counts.
Get Hacker News item by ID
Fetch a single Hacker News item. Stories, comments, jobs, polls, and poll options share the same item shape.
Get largest Hacker News item ID
Return the ID of the most recently created Hacker News item. Useful as an upper bound for walking the full item range or detecting new activity since a previous poll.
List the comment tree of a Hacker News story
Returns the comments on a Hacker News story, depth-first with parent ids and depth, so a thread can be rebuilt. Paginate with `cursor`. Returns `not_found` when the story does not exist.
Get a Hacker News comment with its thread
Returns a Hacker News comment with its ancestor chain up to the root story. Returns `not_found` when the comment does not exist.