# Hacker News / Lemmy Thread Fetcher

> Hacker News / Lemmy Thread Fetcher is a paid API for AI agents from api.x-402.online, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-22).

Fetches a single Hacker News or Lemmy thread by ID, returning the post content and all comments flattened with depth, score, and author metadata.

## Facts

- Endpoint: GET https://api.x-402.online/v1/social/thread?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hacker-news-lemmy-thread-fetcher-c2a3fca4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OccKKgasGBaYJaZMN6Gyh

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-lemmy-thread-fetcher-c2a3fca4
```

Example prompt: Pull the Hacker News thread hn:49806046 and give me the top 50 comments with their scores and nesting depth.

## When to prefer this

Use this endpoint when you need the full content and discussion of a specific known Hacker News or Lemmy thread, including structured comment metadata like depth, score, and author. Prefer this over search endpoints when you already have the thread ID and want the complete discussion tree in a flat, machine-readable format.

## Known failure modes

- Invalid thread ID format (must be hn:<id> or lemmy:<id>) returns an error
- Thread ID does not exist or has been deleted — empty or error response
- Limit parameter exceeds maximum allowed value
- Payment of $0.02 USDC not completed — 402 Payment Required response
- Lemmy instance may be unavailable causing fetch failure

## How this service works

Get one Hacker News or Lemmy thread: the post with its text and the comments flattened with depth and score. One community thread by id from /v1/social/search (hn:<id> or lemmy:<id>): the post with its text and the comments flattened with depth, score and author. Query: ?id=hn:49806046&limit=50

## Output

Returns the post's title, body text, and a flat list of comments each containing the comment text, author, nesting depth level, and score/upvote count. Comments are ordered and limited to the requested 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",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hacker-news-lemmy-thread-fetcher-c2a3fca4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x-402.online](https://www.zero.xyz/host/api.x-402.online/llms.txt)
