# Hacker News Top Stories Feed

> Hacker News Top Stories Feed is a paid API for AI agents from x402-agent-store.rileycraig14.workers.dev, paid per call via x402, $0.09/call, status unknown (last checked 2026-09-14).

Fetches the current top stories from Hacker News, returning titles, scores, and URLs for up to 20 stories per call

## Facts

- Endpoint: GET https://x402-agent-store.rileycraig14.workers.dev/hn/top
- Price: $0.09/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hacker-news-top-stories-feed-0c368adf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8WeeWVEYcEaSZXKlQdMU1

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-top-stories-feed-0c368adf
```

Example prompt: What are the top 15 stories on Hacker News right now? Show me their titles and scores.

## When to prefer this

Use this endpoint when you need real-time Hacker News front page data without managing API keys or subscriptions — ideal for AI agents that need a pay-per-call, zero-signup feed of top tech stories to summarize, monitor, or route to users. Prefer this over scraping HN directly or maintaining your own polling infrastructure.

## Known failure modes

- Payment not received or insufficient USDC — HTTP 402 returned
- top parameter out of range (must be 1-20) — validation error
- HN API upstream unavailability causing empty or partial response
- Network timeout from the Cloudflare Worker

## How this service works

Current Hacker News top stories with score, author, comment count, and links. For tech-trend, sentiment, and news-monitoring agents. Live from the Hacker News API.

## Output

A JSON object containing a count field and a stories array, where each story has a title, URL, and score — representing the current top-ranked posts on Hacker News front page, sorted by HN ranking.

## 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": {
      "top": {
       "type": "number",
       "description": "1-20, default 10"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "count": {
       "type": "number"
      },
      "stories": {
       "type": "array"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 10,
  "stories": [
   {
    "url": "https://...",
    "score": 250,
    "title": "Show HN: ..."
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hacker-news-top-stories-feed-0c368adf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent-store.rileycraig14.workers.dev](https://www.zero.xyz/host/x402-agent-store.rileycraig14.workers.dev/llms.txt)
