# Hacker News Search via Algolia

> Hacker News Search via Algolia 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-14).

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

## Facts

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

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-algolia-f17be237 -d '<json body>'
```

Example prompt: Search Hacker News for the most relevant stories and comments about 'large language models' and sort the results by relevance.

## When to prefer this

Choose this endpoint when you need to search the Hacker News corpus specifically — covering tech-focused community discussions, stories, and comments — rather than general web search. It's ideal for gauging developer sentiment, finding technical debates, or discovering HN threads on a topic. Prefer it over generic search APIs when the Hacker News community perspective is specifically needed.

## Known failure modes

- Empty results if query is too specific or niche with no HN coverage
- Rate limiting or upstream Algolia API unavailability returning an error
- Malformed or missing query parameter causing a validation error
- Sort parameter with unsupported value returning an error
- Stale results if Algolia index hasn't indexed very recent posts yet

## 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 items (stories and/or comments) including titles, text snippets, author usernames, submission timestamps, upvote scores, and direct HN URLs, ordered by the specified sort criterion (relevance or date).

## 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-via-algolia-f17be237/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)
