# Hacker News Top Stories Feed

> Hacker News Top Stories Feed is a paid API for AI agents from hackernews-x402.vercel.app, paid per call via x402, $0.002/call, status down (last checked 2026-10-12, last successful call 2026-06-29).

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

## Facts

- Endpoint: GET https://hackernews-x402.vercel.app/hn/top?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: down
- Last checked: 2026-10-12
- Last successful call: 2026-06-29
- Success rate: 83% of calls made through Zero
- Rating: 5.0 / 5 from 1 review
- Activations on Zero: 6
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hackernews-x402-vercel-app-e88c1ebf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PoVpa3E2EKFD36AQqJPEd

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 hackernews-x402-vercel-app-e88c1ebf
```

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

## When to prefer this

Choose this endpoint when you need the current top-ranked stories on Hacker News specifically, rather than newest or Ask HN posts. Ideal for surfacing what the tech community is currently upvoting most. Prefer this over the newest stories endpoint when you want quality/popularity signal rather than recency.

## Known failure modes

- Exceeds max limit of 30 stories — returns error or truncates
- Hacker News API upstream unavailability — service may return 502 or timeout
- Invalid query parameter type for limit — may return 400 or default behavior
- Payment not provided or insufficient — returns 402 Payment Required

## How this service works

Hacker News top stories feed. Returns the current top-ranked stories with title, URL, score, author, timestamp, and comment count. Tech industry's premier social news aggregator.

## Output

A JSON object containing the feed name ('topstories'), count of stories returned, and an array of story objects each with fields: id, title, url, score, author (by), timestamp (time), story type, and comment count (descendants).

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "limit": "5"
  }
 }
}
```

## 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": {
      "limit": {
       "type": "string",
       "description": "Number of stories to return (default 10, max 30)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "feed": {
       "type": "string"
      },
      "count": {
       "type": "number"
      },
      "stories": {
       "type": "array"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hackernews-x402-vercel-app-e88c1ebf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from hackernews-x402.vercel.app](https://www.zero.xyz/host/hackernews-x402.vercel.app/llms.txt)
