# SiteCheck Hacker News Search

> SiteCheck Hacker News Search is a paid API for AI agents from api.sitecheck-api.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-18).

Search Hacker News stories and comments by keyword, date, and type via the Algolia HN Search API

## Facts

- Endpoint: GET https://api.sitecheck-api.workers.dev/api/hn?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sitecheck-hacker-news-search-0366a4ab
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_duYrNqkjKo0xkkcCLxFgD

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 sitecheck-hacker-news-search-0366a4ab
```

Example prompt: Search Hacker News for the top 10 stories about 'AI agents' posted since 2024-01-01 and give me the titles, scores, and links.

## When to prefer this

Use this endpoint when you need to search or browse Hacker News content programmatically — especially when looking for community discussion, developer sentiment, or trending technology topics. It wraps the Algolia HN Search API behind a pay-per-call interface, making it ideal for agents that need occasional HN lookups without managing their own Algolia integration. Prefer this over direct Algolia calls when you're already using the SiteCheck ecosystem for other tasks.

## Known failure modes

- Empty results array if query matches no HN items
- Missing or malformed 'q' parameter may return front-page results or error
- Invalid 'since' date format may cause query failure or be ignored
- limit values outside 1-50 range may be clamped or rejected
- Payment failure (402) if USDC balance is insufficient

## How this service works

Hacker News stories or comments from the Algolia search API: keyword search (q) or the current front page (mode=front), optionally since a date. Stories give title, URL, HN link, points, comments, author and time. Comments give their text (400 characters, HTML stripped) and the story title. Up to 50 results. Public data, no key.

## Output

Returns a JSON object with the search query parameters echoed back, total matching item count, attribution/source note, and an array of results each containing the story URL, HN item URL, title, author username, upvote points, comment count, and ISO 8601 creation timestamp, plus the total returned count and a checkedAt timestamp.

## 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": {
      "q": {
       "type": "string",
       "description": "Keywords"
      },
      "mode": {
       "type": "string",
       "description": "front: the current front page (stories only)"
      },
      "type": {
       "type": "string",
       "description": "story (default) or comment"
      },
      "limit": {
       "type": "string",
       "description": "Max results, 1-50, default 20"
      },
      "since": {
       "type": "string",
       "description": "YYYY-MM-DD: only items from this day on"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "query": {
   "q": "x402",
   "mode": null,
   "type": "story",
   "since": null
  },
  "total": 120,
  "source": "Hacker News via the Algolia HN Search API (https://hn.algolia.com/api). Posts belong to their authors; attribution: Hacker News (https://news.ycombinator.com)",
  "results": [
   {
    "url": "https://example.com/x402-agents",
    "hnUrl": "https://news.ycombinator.com/item?id=50001234",
    "title": "Show HN: Pay-per-call APIs for AI agents with x402",
    "author": "example",
    "points": 142,
    "comments": 58,
    "createdAt": "2026-09-30T14:12:03Z"
   }
  ],
  "returned": 1,
  "checkedAt": "2026-10-13T18:40:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sitecheck-hacker-news-search-0366a4ab/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.sitecheck-api.workers.dev](https://www.zero.xyz/host/api.sitecheck-api.workers.dev/llms.txt)
