> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/hackernews/items-id>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/hackernews/items-id.mdx>

---

# Hacker News Item API

Resolve any numeric HN item id to a typed payload — story, comment, job, poll, or poll option — without assuming shape up front.

`GET /v1/hackernews/items/{id}` is the authoritative item lookup. Pass the numeric id, send `x-api-key`, and branch on `data.lookupStatus`. On `found`, `data.item` includes `type` plus shared fields such as author, createdAt, title, text, url, score, commentCount, parentId, childIds, dead, deleted, and itemUrl when present. `not_found` returns null item; HTTP 200 still means the request finished.

Credit pricing for this operation comes from the API registry and appears on this page, and `meta.creditsCharged` is the billing source of truth. Prefer the stories route when your code path requires a story card; use items when the type is unknown.

## Request

- **Endpoint:** `GET /v1/hackernews/items/{id}`
- **Credits:** 1 credit
Failed requests are free
- **Input:** by item id
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/hackernews/items/id/get)
- **Platform page:** [/platforms/hackernews](https://www.socialfetch.dev/platforms/hackernews)

## FAQ

### How do I fetch a Hacker News item by id?

Call GET /v1/hackernews/items/{id} with your Social Fetch API key in the x-api-key header. The id is the numeric HN item id. Read data.lookupStatus, then data.item.type and the rest of the item fields.

### How many credits does a Hacker News item lookup 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.

### What item types can this return?

Any public HN item type the API exposes for that id — typically story, comment, job, poll, or pollopt. Always read data.item.type before assuming title, url, or text semantics.

### Items vs stories vs comment context?

Items is polymorphic get-by-id. GET /v1/hackernews/stories/{id} requires a story and returns not_story otherwise. GET /v1/hackernews/comments/{id}/context starts from a comment and walks ancestors to the root story.

### What does lookupStatus mean on item lookup?

found means data.item is populated. not_found means the id does not exist. Always branch on lookupStatus before writing. Persist meta.requestId when you need to debug a miss.

### Does HTTP 200 always mean the item was found?

No. HTTP 200 means the request finished. Check data.lookupStatus. An empty or null item with not_found is a completed typed miss, not a transport failure.

### Can I use this after updates or favorites pages?

Yes. Poll GET /v1/hackernews/updates or page favorites/submissions for ids, then hydrate each id with this route. That pattern keeps change detection thin and item shape authoritative.
