# 2s.io Hacker News Full-Text Search

> 2s.io Hacker News Full-Text Search is a paid API for AI agents from 2s.io, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-14).

Full-text search across all of Hacker News stories and comments via Algolia, filterable by type, author, and sortable by relevance or date.

## Facts

- Endpoint: GET https://2s.io/api/news/hn-search
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-hacker-news-full-text-search-da1c9d06
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eclTfC9GZ8iqujh3zfya6

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 2s-io-hacker-news-full-text-search-da1c9d06
```

Example prompt: Search Hacker News for stories about 'large language models', sorted by date, and give me the top 10 results — I want titles, URLs, authors, and point counts.

## When to prefer this

Choose this endpoint when you need full-text search across the entire Hacker News corpus — including historical stories and comments — rather than just today's top/new feeds. Ideal for finding community discussions, opinions, or announcements about a specific topic, technology, or author on HN. Prefer over general news search when the user specifically wants the tech/startup community's perspective via Hacker News.

## Known failure modes

- Empty query with no tags or author filter returns broad/noisy results
- Queries exceeding 400 characters are rejected
- Limit values outside 1–50 are rejected
- Author names not matching any HN user return zero results
- Rare or very niche keywords may return zero hits
- Algolia upstream outage causes 5xx errors

## How this service works

Full-text search across all of Hacker News (via the Algolia HN API). Search stories or comments by keyword, sorted by relevance or by date (newest first). Filter by tags (story/comment/ask_hn/show_hn/poll) and by author. Each hit: title, URL, author, points, comment count, story/comment text, created time, and canonical HN URL. Net-new vs news.hn-top (curated feeds) and news.search (general news).

## Output

A list of up to 50 Hacker News hits (stories or comments), each containing title, URL, author, points, comment count, story or comment text, creation timestamp, and a canonical HN link — ordered by relevance or newest-first depending on the sort parameter.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "sort": {
       "enum": [
        "relevance",
        "date"
       ],
       "type": "string"
      },
      "tags": {
       "enum": [
        "story",
        "comment",
        "ask_hn",
        "show_hn",
        "poll"
       ],
       "type": "string"
      },
      "limit": {
       "type": "integer",
       "maximum": 50,
       "minimum": 1
      },
      "query": {
       "type": "string",
       "default": "",
       "maxLength": 400,
       "description": "Search keywords (may be empty when filtering by tags/author)."
      },
      "author": {
       "type": "string",
       "maxLength": 40,
       "description": "Restrict to one HN author."
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-hacker-news-full-text-search-da1c9d06/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
