# Toll402 Hacker News Top Stories

> Toll402 Hacker News Top Stories is a paid API for AI agents from toll402.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Returns the top N Hacker News stories (title, URL, and score) by fetching from the official HN Firebase API

## Facts

- Endpoint: POST https://toll402.dev/v1/t/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/toll402-hacker-news-top-stories-9af619eb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_C8BRhYQLQnNg81ZFnXEW3

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 toll402-hacker-news-top-stories-9af619eb -d '<json body>'
```

Example prompt: What are the top 10 stories on Hacker News right now — give me the title, link, and score for each?

## When to prefer this

Use this endpoint when you need a quick, live snapshot of what's currently trending on Hacker News without managing Firebase API calls yourself. It abstracts the two-step HN API pattern (top story IDs + individual item fetches) into a single call. Prefer it over scraping HN directly or maintaining your own Firebase client when you need titles, URLs, and scores in a clean structured response with a pay-per-call model.

## Known failure modes

- n out of range (must be integer 1–30) — request rejected with validation error
- HN Firebase API unavailable — upstream timeout or empty response
- n not provided — required field missing causes schema validation failure
- Network timeout reaching hacker-news.firebaseio.com — partial or no results returned

## How this service works

Top N Hacker News stories (title, url, score) via https://hacker-news.firebaseio.com/v0/topstories.json and /v0/item/<id>.json

## Output

A list of up to N Hacker News stories, each containing the story title, the original URL, and the current upvote score, sourced live from the HN Firebase API.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "n"
     ],
     "properties": {
      "n": {
       "type": "integer",
       "maximum": 30,
       "minimum": 1
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "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/toll402-hacker-news-top-stories-9af619eb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from toll402.dev](https://www.zero.xyz/host/toll402.dev/llms.txt)
