# Hacker News Feed & Search

> Hacker News Feed & Search is a paid API for AI agents from api.kadec0.xyz, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Fetches top, new, or best front-page Hacker News stories, or searches full-text HN stories by keyword, returning titles, scores, comment counts, and authors.

## Facts

- Endpoint: GET https://api.kadec0.xyz/v1/hackernews
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hacker-news-feed-search-0d5bd769
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VvkzQbbecSt97yjQssxPw

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-feed-search-0d5bd769
```

Example prompt: Pull the top 15 Hacker News stories right now and show me their titles, scores, and comment counts.

## When to prefer this

Use this endpoint when you need Hacker News-specific content — curated front-page rankings (top/best/new) or keyword search across HN stories. Prefer over generic news APIs when the user specifically wants tech/startup community opinions, HN story metadata (score, comments), or content filtered by the HN community's curation signal.

## Known failure modes

- Invalid mode value returns an error — must be one of: top, new, best, search
- Missing query parameter when mode=search results in an error or empty results
- maxItems exceeds service limits and returns a capped result set
- Upstream Hacker News API outage causes empty or error response
- Payment failure (x402) returns 402 status with no data

## How this service works

Hacker News feed. Top, new, and best front-page stories plus full-text story search — titles, scores, comment counts, and author for tech and startup news.

## Output

A list of Hacker News stories (up to maxItems, default 20) with each story's title, score, comment count, author handle, and story URL, filtered by the requested mode (top/new/best) or matched by search query.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "anyOf": [
      {
       "required": [
        "q"
       ]
      },
      {
       "required": [
        "mode"
       ],
       "properties": {
        "mode": {
         "enum": [
          "top",
          "new",
          "best"
         ]
        }
       }
      }
     ],
     "required": [],
     "properties": {
      "q": {
       "type": "string",
       "description": "query (mode=search)"
      },
      "mode": {
       "enum": [
        "search",
        "top",
        "new",
        "best"
       ],
       "type": "string"
      },
      "maxItems": {
       "type": "string",
       "default": "20"
      }
     }
    }
   },
   "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-feed-search-0d5bd769/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.kadec0.xyz](https://www.zero.xyz/host/api.kadec0.xyz/llms.txt)
