# Hacker News Search: Stories or Comments by Relevance or Recency

> Hacker News Search: Stories or Comments by Relevance or Recency is a paid API for AI agents from twin.unykorn.org, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-03).

Searches Hacker News for stories or comments matching a query, sortable by relevance or recency, with optional type and date filters.

## Facts

- Endpoint: POST https://twin.unykorn.org/research/hn-search?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hacker-news-search-stories-or-comments-by-relevance-or-recency-2edc65fb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FxgqtgYaJjYeRWysz86ZE

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-search-stories-or-comments-by-relevance-or-recency-2edc65fb -d '<json body>'
```

Example prompt: Search Hacker News for the most recent stories about 'WebAssembly' from the last 30 days — give me up to 20 results sorted by recency.

## When to prefer this

Choose this endpoint when you need to search Hacker News content specifically — either stories or comments — with control over sort order and recency window. It is ideal for competitive intelligence, technology trend monitoring, developer community sentiment, and tracking mentions of specific products, companies, or projects within the HN ecosystem. Prefer it over generic web search when the HN community perspective is specifically valuable.

## Known failure modes

- Empty results if query matches nothing or date range is too narrow
- Rate limiting or payment failure if USDC balance is insufficient
- Invalid enum value for sort or type fields returns validation error
- limit exceeding 50 or since_days exceeding 3650 rejected by schema
- Query string left blank returns error (q is required)

## How this service works

Hacker News search: stories or comments, by relevance or recency — Genesis402 / UnyKorn Operator Network

## Output

A list of Hacker News items (stories and/or comments) matching the query, including fields such as title, URL, author, score, creation timestamp, and object type, ranked by the chosen sort order (relevance or recency), up to the requested limit.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "params": {
   "type": "object",
   "properties": {
    "q": {
     "type": "string",
     "description": "required"
    },
    "sort": {
     "enum": [
      "relevance",
      "recent"
     ],
     "type": "string",
     "description": "optional: relevance (default) | recent"
    },
    "type": {
     "enum": [
      "story",
      "comment",
      "any"
     ],
     "type": "string",
     "description": "optional: story (default) | comment | any"
    },
    "limit": {
     "type": "integer",
     "maximum": 50,
     "minimum": 1,
     "description": "optional: max rows (default 10, max 50)"
    },
    "since_days": {
     "type": "integer",
     "maximum": 3650,
     "minimum": 1,
     "description": "optional 1-3650"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "type": "hn-search",
  "receipt": {
   "tx_hash": "0x<64hex>",
   "amount_usd": 0.002,
   "receipt_id": "g402-<16hex>"
  },
  "sources": [
   {
    "ok": true,
    "name": "<source>"
   }
  ],
  "limitations": "<text>",
  "generated_at": "<iso time>",
  "evidence_hash": "sha256:<64hex>"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hacker-news-search-stories-or-comments-by-relevance-or-recency-2edc65fb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from twin.unykorn.org](https://www.zero.xyz/host/twin.unykorn.org/llms.txt)
