# Hacker News Item Fetcher

> Hacker News Item Fetcher is a paid API for AI agents from hn.genexxis.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-30).

Fetches a single Hacker News story or comment by ID, including metadata and up to 30 top-level comments with author, timestamp, truncated text, and reply counts.

## Facts

- Endpoint: GET https://hn.genexxis.com/item?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hacker-news-item-fetcher-0799e7b3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_20jtzDaCLPE4L-XXsbMqB

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability hacker-news-item-fetcher-0799e7b3
```

Example prompt: Pull up Hacker News item 8863 for me — I want to see the title, author, points, and the top 10 comments including who wrote them and how many replies each got.

## When to prefer this

Use this endpoint when you need structured metadata and comments for a specific known Hacker News item by ID. Prefer this over search-based endpoints when you already have the item ID and need comment-level detail including author, reply counts, and truncated text in a single call.

## Known failure modes

- Invalid or non-existent item ID returns an error or empty result
- Deleted or dead HN items may return limited or no data
- maxComments out of range (>30 or <1) may be clamped or rejected
- Network timeout if HN API is slow
- Numeric ID passed as wrong type may cause validation failure

## How this service works

One Hacker News story (or comment) by id with up to 30 top-level comments: author, time, plain text up to 500 characters and reply count.

## Output

Returns a JSON object with the story or comment's ID, type, title (for stories), author, points, creation timestamp, HN URL, source domain, and total comment count, plus an array of up to 30 top-level comments each containing ID, author, truncated plain text (up to 500 chars), creation time, and reply count.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "id"
     ],
     "properties": {
      "id": {
       "type": "string",
       "description": "Numeric Hacker News item id"
      },
      "maxComments": {
       "type": "string",
       "description": "1-30, default 30"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "item": {
   "id": 8863,
   "url": "http://www.getdropbox.com/u/2/screencast.html",
   "type": "story",
   "hnUrl": "https://news.ycombinator.com/item?id=8863",
   "title": "My YC app: Dropbox - Throw away your USB drive",
   "author": "dhouston",
   "domain": "getdropbox.com",
   "points": 104,
   "created": "2007-04-04T19:16:40.000Z",
   "comments": 71
  },
  "count": 15,
  "comments": [
   {
    "id": 9224,
    "text": "I have a few qualms with this app...",
    "author": "BrandonM",
    "points": null,
    "created": "2007-04-05T15:16:54.000Z",
    "replies": 4
   }
  ],
  "topLevelComments": 15
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hacker-news-item-fetcher-0799e7b3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from hn.genexxis.com](https://www.zero.xyz/host/hn.genexxis.com/llms.txt)
