# Hacker News Search via x402

> Hacker News Search via x402 is a paid API for AI agents from 138-197-15-135.sslip.io, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-31).

Search Hacker News stories and comments by keyword, returning ranked results with metadata, paid per-call via x402 USDC micropayment.

## Facts

- Endpoint: GET https://138-197-15-135.sslip.io/v1/social/hn?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hacker-news-search-via-x402-3b1ba627
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GssEXPwbt25FRKAHxK5fg

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-search-via-x402-3b1ba627
```

Example prompt: Search Hacker News for the top 10 stories about 'WebAssembly', sorted by relevance, and show me the titles, authors, and point counts.

## When to prefer this

Choose this endpoint when you need programmatic, per-call Hacker News search paid via x402 USDC micropayments without managing API keys or subscriptions. Ideal for AI agents that need lightweight, pay-as-you-go access to HN content discovery, especially when also using other x402-enabled endpoints on the same platform. Prefer over direct Algolia HN API integration when you want a unified x402 payment flow.

## Known failure modes

- Missing required 'q' parameter returns validation error
- Invalid 'sort' value (not 'relevance' or 'date') may return error or default behavior
- Invalid 'type' value (not 'story' or 'comment') may return error
- 'n' outside 1-30 range may be clamped or rejected
- Payment failure via x402 returns 402 status before search executes
- Keyword with no HN matches returns empty hits array with count 0
- HN upstream (Algolia) downtime returns service unavailable error

## How this service works

Search Hacker News stories or comments by keyword, newest or most relevant first, with points, comment count, author, URL and HN link. Good for tracking mentions of a product, company or topic. Deterministic, no LLM.

## Output

A JSON object containing the search query, a count of matched results, and an array of hits. Each hit includes the HN item URL, title, author username, upvote points, number of comments, and ISO 8601 creation timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "queryParams"
   ],
   "properties": {
    "queryParams": {
     "type": "object",
     "required": [
      "q"
     ],
     "properties": {
      "n": {
       "type": "string",
       "description": "Results 1-30"
      },
      "q": {
       "type": "string",
       "description": "Keyword"
      },
      "sort": {
       "type": "string",
       "description": "relevance (default) or date"
      },
      "type": {
       "type": "string",
       "description": "story (default) or comment"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [],
     "properties": {
      "q": {
       "type": [
        "string",
        "null"
       ]
      },
      "hits": {
       "type": [
        "array",
        "null"
       ]
      },
      "count": {
       "type": [
        "integer",
        "null"
       ]
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "q": "x402",
  "hits": [
   {
    "hn": "https://news.ycombinator.com/item?id=1",
    "url": "...",
    "title": "...",
    "author": "pg",
    "points": 12,
    "comments": 3,
    "createdAt": "2026-01-01T00:00:00Z"
   }
  ],
  "count": 1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hacker-news-search-via-x402-3b1ba627/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 138-197-15-135.sslip.io](https://www.zero.xyz/host/138-197-15-135.sslip.io/llms.txt)
