# Search Hacker News

> Search Hacker News is a paid API for AI agents from ZeroClick x402 Service Registry at hn.withzero.ai, paid per call via MPP, $0.001/call, status unknown (last checked 2026-10-11, last successful call 2026-05-06).

Search Hacker News stories and discussions via the Algolia API, returning titles, engagement metrics, and relevance scores.

## Facts

- Endpoint: POST https://hn.withzero.ai/run?utm_source=zero.xyz
- Price: $0.001/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-11
- Last successful call: 2026-05-06
- Success rate: 100% of calls made through Zero
- Activations on Zero: 2
- Provider: ZeroClick x402 Service Registry
- Website: https://withzero.ai
- Tags: search, hackernews, hn, tech, news, discussion
- Canonical page: https://www.zero.xyz/c/zeroclick-x402-service-registry-search-hacker-news-a69cf22c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kYIq2uSR28kkteZzHRdNO

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 zeroclick-x402-service-registry-search-hacker-news-a69cf22c -d '<json body>'
```

Example prompt: Search Hacker News for discussions about Rust programming language from the last 14 days and show me the top 10 results with their scores and comment counts.

## When to prefer this

Choose this endpoint when you need to surface what the Hacker News tech community is currently discussing about a topic — especially useful for gauging developer sentiment, finding high-signal tech news, or tracking startup/company mentions among technical audiences. Prefer over generic web search when you specifically want HN-curated content with community engagement signals (points and comments).

## Known failure modes

- Empty results if query matches no recent stories within the specified time window
- Algolia upstream outage returns an error or empty response
- Invalid parameter types (e.g. non-integer limit) return a validation error
- days value outside 1-90 range rejected with schema validation error
- limit value outside 1-50 range rejected with schema validation error

## How this service works

Search Hacker News stories and discussions via the Algolia API (free, no key needed). Input: search query with optional days/limit. Output: stories with engagement metrics and scores.

## Output

Returns a JSON object with the original query, source platform name, total result count, and an array of up to 50 stories. Each story includes title, direct HN discussion URL, author username, ISO 8601 publication date, a combined relevance+engagement score (0-100), original article URL as snippet, and engagement metrics (HN points and comment count).

## Example request

```json
{
 "days": 30,
 "limit": 20,
 "query": "artificial intelligence"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "query"
 ],
 "properties": {
  "days": {
   "type": "integer",
   "default": 30,
   "maximum": 90,
   "minimum": 1,
   "description": "How many days back to search (default: 30)"
  },
  "limit": {
   "type": "integer",
   "default": 20,
   "maximum": 50,
   "minimum": 1,
   "description": "Maximum results to return (default: 20)"
  },
  "query": {
   "type": "string",
   "description": "Search topic or keywords"
  }
 },
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "query",
  "source",
  "resultCount",
  "results"
 ],
 "properties": {
  "query": {
   "type": "string",
   "description": "The query that was searched"
  },
  "source": {
   "type": "string",
   "description": "Platform name"
  },
  "results": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "title",
     "url",
     "author",
     "date",
     "score",
     "engagement",
     "snippet"
    ],
    "properties": {
     "url": {
      "type": "string",
      "description": "Direct link to HN discussion"
     },
     "date": {
      "type": "string",
      "description": "Publication date (ISO 8601)"
     },
     "score": {
      "type": "number",
      "description": "Combined relevance + engagement score (0-100)"
     },
     "title": {
      "type": "string",
      "description": "Story title"
     },
     "author": {
      "type": "string",
      "description": "HN username"
     },
     "snippet": {
      "type": "string",
      "description": "Original article URL or story type"
     },
     "engagement": {
      "type": "object",
      "properties": {
       "likes": {
        "type": "number",
        "description": "HN points"
       },
       "comments": {
        "type": "number",
        "description": "Comment count"
       }
      },
      "description": "Engagement metrics",
      "additionalProperties": false
     }
    },
    "additionalProperties": false
   }
  },
  "resultCount": {
   "type": "number",
   "description": "Number of results returned"
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/zeroclick-x402-service-registry-search-hacker-news-a69cf22c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from hn.withzero.ai](https://www.zero.xyz/host/hn.withzero.ai/llms.txt)
