# AgentIndex x402 Hacker News Top Stories Feed

> AgentIndex x402 Hacker News Top Stories Feed is a paid API for AI agents from x402.agentindex.world, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-15).

Fetches the top trending stories from Hacker News, returning titles, scores, authors, and URLs for up to 25 items per call

## Facts

- Endpoint: GET https://x402.agentindex.world/news?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentindex-x402-hacker-news-top-stories-feed-25323f78
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GyOA2oIHT5raXEHNT94Qy

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 agentindex-x402-hacker-news-top-stories-feed-25323f78
```

Example prompt: Pull the top 15 Hacker News stories right now and show me the titles, scores, and links so I can see what the tech community is buzzing about today.

## When to prefer this

Choose this endpoint when your agent needs real-time Hacker News front-page data without managing API keys or rate limits — ideal for tech news digests, trend monitoring, or surfacing developer community sentiment. Prefer this over scraping HN directly when you need a clean, pay-per-call interface that handles upstream fetching for you. Best suited for agents that need occasional or event-driven HN snapshots rather than continuous stream monitoring.

## Known failure modes

- Payment not provided or insufficient USDC balance — returns 402 Payment Required
- Invalid limit parameter (outside 1-25 range) — returns 400 Bad Request
- Hacker News API upstream unavailable — may return 503 or degraded response
- limit parameter omitted defaults to 10 stories — not a failure but an implicit default
- Network timeout from upstream HN API causing delayed or empty response

## How this service works

Top Hacker News headlines right now - title, URL, score, comments. Fresh links for agents that need current tech/startup signal. Try GET /news/sample.

## Output

Returns a JSON object with a source field ('hacker-news'), a count of stories returned, and an array of story objects each containing: story ID, title, URL, author username, Unix timestamp, upvote score, and comment count. Also includes an x402 payment receipt object confirming the microtransaction.

## 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",
     "required": [],
     "properties": {
      "limit": {
       "type": "integer",
       "maximum": 25,
       "minimum": 1,
       "description": "How many top stories to return (1-25, default 10)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "source",
      "count",
      "stories"
     ],
     "properties": {
      "count": {
       "type": "integer"
      },
      "source": {
       "type": "string"
      },
      "stories": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "by": {
          "type": "string"
         },
         "id": {
          "type": "integer"
         },
         "url": {
          "type": "string"
         },
         "time": {
          "type": "integer"
         },
         "score": {
          "type": "integer"
         },
         "title": {
          "type": "string"
         },
         "comments": {
          "type": "integer"
         }
        }
       }
      },
      "x402_receipt": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "source": "hacker-news",
  "stories": [
   {
    "by": "pg",
    "id": 49765348,
    "url": "https://example.com/story",
    "time": 1726750000,
    "score": 312,
    "title": "Example headline about AI agents",
    "comments": 88
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentindex-x402-hacker-news-top-stories-feed-25323f78/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentindex.world](https://www.zero.xyz/host/x402.agentindex.world/llms.txt)
