# Hacker News Search (Algolia HN via 24K Labs)

> Hacker News Search (Algolia HN via 24K Labs) is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Searches Hacker News stories and comments by query, returning results sorted by relevance or date using the Algolia HN search index.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/hn-search
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hacker-news-search-algolia-hn-via-24k-labs-d6344414
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_s1VFdu79b1eLG6ZBPcAJP

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-algolia-hn-via-24k-labs-d6344414 -d '<json body>'
```

Example prompt: Search Hacker News for discussions about 'Rust programming language' sorted by relevance and show me the top results.

## When to prefer this

Use this endpoint when you need to search Hacker News specifically — for tech community sentiment, developer discussions, startup coverage, or Ask HN threads — rather than broad web search. Prefer it over generic web search when the user explicitly wants HN content or developer community opinions indexed via Algolia.

## Known failure modes

- Empty results if query matches nothing in HN index
- Stale results if Algolia index lags behind live HN data
- Rate limit or payment failure if x402 micropayment is rejected
- Malformed query causing unexpected results or API error

## How this service works

Search Hacker News stories and comments by query, sorted by relevance or date (Algolia HN).

## Output

Returns a list of matching Hacker News stories and/or comments including titles, URLs, authors, scores, timestamps, and snippet text, ranked by relevance or recency depending on the sort parameter.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "tags": {
   "type": "string"
  },
  "query": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hits": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hacker-news-search-algolia-hn-via-24k-labs-d6344414/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
