# Hacker News Top Stories Feed

> Hacker News Top Stories Feed is a paid API for AI agents from x402-datashop-production.up.railway.app, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Fetches the current Hacker News front page stories via Firebase API, returning id, title, URL, score, comment count, and age per story with optional count and score filtering.

## Facts

- Endpoint: GET https://x402-datashop-production.up.railway.app/v1/dev/hn-top
- Price: $0.002/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-0247481c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Q_1YoeVZfiiSacC5IzsIB

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-0247481c
```

Example prompt: Pull the top 15 Hacker News front page stories right now, only show me ones with a score of at least 200 points.

## When to prefer this

Use this endpoint when you need real-time Hacker News front page data in a single merged payload, especially for launch detection, incident monitoring, or tech buzz tracking. Prefer this over scraping HN directly or calling the Firebase API yourself, as it fans out all top story requests and merges them for you with score filtering built in.

## Known failure modes

- n out of range (must be 1-30) returns a validation error
- min_score too high returns an empty story list
- Upstream Firebase/HN API outage causes a fetch failure
- Cache miss on cold start may add slight latency
- Invalid query parameter types return a 400 error

## How this service works

Current Hacker News front page via the official Firebase API, fanned out and merged into one payload: id, title, url, score, comment count and age in minutes per story. Query: ?n=20 (1-30 stories) &min_score=100 (optional score floor). Real-time tech signal for launch/incident/buzz detection. 5min cache.

## Output

A merged JSON payload of up to 30 Hacker News front page stories, each containing story id, title, external URL, upvote score, comment count, and age in minutes — sourced from the official Firebase API with a 5-minute cache.

## 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": {
      "n": {
       "type": "integer",
       "default": 20,
       "maximum": 30,
       "minimum": 1,
       "description": "Number of stories"
      },
      "min_score": {
       "type": "integer",
       "default": 0,
       "minimum": 0,
       "description": "Minimum upvote score"
      }
     }
    }
   },
   "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-top-stories-feed-0247481c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-datashop-production.up.railway.app](https://www.zero.xyz/host/x402-datashop-production.up.railway.app/llms.txt)
