# Hacker News Trending Stories API

> Hacker News Trending Stories API is a paid API for AI agents from gen-copied-sampling-calibration.trycloudflare.com, paid per call via x402, $0.01/call, status down (last checked 2026-09-15).

Returns the current top Hacker News front-page stories with title, URL, points, and comment count

## Facts

- Endpoint: GET https://gen-copied-sampling-calibration.trycloudflare.com/hn/trending
- Price: $0.01/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hacker-news-trending-stories-api-7f38fe91
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_u2nywZK00Jr9wihDmhczs

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-trending-stories-api-7f38fe91
```

Example prompt: What are the top 15 stories on Hacker News right now? Give me the titles, links, points, and comment counts.

## When to prefer this

Choose this endpoint when you need no-auth, instant access to live Hacker News front-page data. It is ideal for tech news digests, trend monitoring, or content research where Hacker News is specifically the desired source. No API key is required, making it trivially easy to call. Prefer alternatives if you need historical HN data, search across all HN posts, or real-time comment threads.

## Known failure modes

- Hacker News upstream unavailable — returns error or stale data
- limit parameter out of range (must be 1–30) returns validation error
- Cloudflare tunnel temporarily offline — connection refused or 5xx error
- Rate limiting if called too frequently

## How this service works

Top Hacker News stories right now: title, url, points, comments. Fresh front-page data, no API key needed.

## Output

A list of up to 30 Hacker News front-page stories, each containing the story title, source URL, current upvote point score, and number of comments. Data reflects the live HN front page at time of request.

## 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",
     "properties": {
      "limit": {
       "type": "integer",
       "default": 10,
       "maximum": 30,
       "minimum": 1,
       "description": "Number of stories to return (1-30)."
      }
     }
    }
   },
   "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-trending-stories-api-7f38fe91/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gen-copied-sampling-calibration.trycloudflare.com](https://www.zero.xyz/host/gen-copied-sampling-calibration.trycloudflare.com/llms.txt)
