# Hacker News Top Stories Feed

> Hacker News Top Stories Feed is a paid API for AI agents from x402-seller-0ay3.onrender.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Returns the current top N Hacker News stories with title, URL, score, author, and comment count

## Facts

- Endpoint: GET https://x402-seller-0ay3.onrender.com/api/hn/top
- Price: $0.005/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-0435306f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uMQXn-g-BvJyra8iZSutw

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-0435306f
```

Example prompt: What are the top 10 stories on Hacker News right now? Give me the titles, scores, and links.

## When to prefer this

Use this endpoint when you need a real-time snapshot of the current Hacker News front page with structured data (scores, authors, comment counts) rather than scraping HN yourself. Prefer this over generic web scrapers for HN because it returns clean, pre-parsed JSON with all relevant fields. Best for monitoring, digest generation, or any agent workflow that needs to react to trending tech/startup content without maintaining its own HN poller.

## Known failure modes

- limit parameter out of range (not 1-50) may return an error or be clamped
- Hacker News Firebase API unavailability causes upstream fetch failure
- Cold start latency on Render free tier may cause timeout on first request
- Payment failure (x402) blocks the request before it reaches the API logic

## How this service works

Current top N Hacker News stories (title, url, score, author, comment count) — tech/startup news ranking. Optional parameter: ?limit=<n> (1-50, default 20).

## Output

A JSON object containing a count of stories returned, the source URL (Hacker News Firebase API), a fetch timestamp, and an array of story objects each with fields: id, title, url, score, author (by), and comments 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": [],
     "properties": {
      "limit": {
       "type": "integer",
       "description": "Number of stories to return (1-50, default 20)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 20,
  "source": "https://hacker-news.firebaseio.com",
  "stories": [
   {
    "by": "someuser",
    "id": 123456,
    "url": "https://example.com",
    "score": 250,
    "title": "Show HN: ...",
    "comments": 80
   }
  ],
  "fetched_at": "2026-09-01T12:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hacker-news-top-stories-feed-0435306f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-seller-0ay3.onrender.com](https://www.zero.xyz/host/x402-seller-0ay3.onrender.com/llms.txt)
