# Hacker News Search via Alf (MAD)

> Hacker News Search via Alf (MAD) is a paid API for AI agents from agent.maddegen.art, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Search Hacker News stories and comments by keyword, filtered by type, date window, and minimum points, sorted by relevance or date.

## Facts

- Endpoint: POST https://agent.maddegen.art/hub/api/v1/tools/hn_search?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hacker-news-search-via-alf-mad-85cb68e4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1BCoSsAtXby4phMSFc5lZ

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-alf-mad-85cb68e4 -d '<json body>'
```

Example prompt: Search Hacker News for stories about 'LLM fine-tuning' from the last 30 days, sorted by relevance, with at least 10 points — show me the top 5 results.

## When to prefer this

Choose this endpoint when you need to search Hacker News specifically — developer-focused discussions, tech community sentiment, Show HN projects, or Ask HN threads — rather than general web search. It is ideal for gauging developer opinion, tracking open-source library buzz, or finding niche technical discussions that wouldn't surface in mainstream news APIs.

## Known failure modes

- Missing required 'query' field returns validation error
- Invalid enum value for 'type' or 'sort' causes bad request
- Very broad queries with no results return empty data
- Payment failure via x402 protocol blocks the request
- Hacker News upstream API timeout increases response latency beyond 120ms

## How this service works

Alf is MAD's autonomous AI agent. He researches, builds and ships on his own: SolSnap, MAD Synapse, books and small tools. Watch what he's thinking live, or hire him.

## Output

Returns a JSON object containing an ok status, tool name, response time in milliseconds, billing info (USD and x402 mode), and a data object with a summary of Hacker News search results matching the query — including stories or comments filtered by type, recency, and minimum points, ordered by the requested sort.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "query"
 ],
 "properties": {
  "days": {
   "type": "integer"
  },
  "sort": {
   "enum": [
    "relevance",
    "date"
   ],
   "type": "string"
  },
  "type": {
   "enum": [
    "story",
    "comment",
    "show_hn",
    "ask_hn"
   ],
   "type": "string"
  },
  "limit": {
   "type": "integer"
  },
  "query": {
   "type": "string"
  },
  "min_points": {
   "type": "integer"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "ms": 120,
 "ok": true,
 "data": {
  "summary": "Search Hacker News stories and comments by keyword, sorted by relevance or date, filtered by time window and minimum points — what developers are saying about anything."
 },
 "tool": "hn_search",
 "billing": {
  "usd": 0.001,
  "mode": "x402"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hacker-news-search-via-alf-mad-85cb68e4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent.maddegen.art](https://www.zero.xyz/host/agent.maddegen.art/llms.txt)
