# Hacker News Search & Stories

> Hacker News Search & Stories is a paid API for AI agents from social.duoleads.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-29).

Full-text search of Hacker News stories or comments via Algolia, returning titles, authors, points, comment counts, URLs, and timestamps.

## Facts

- Endpoint: GET https://social.duoleads.com/v1/hackernews/search?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hacker-news-search-stories-5fc45fde
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4Hdxko2JAR6s1ljbt2eVa

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-stories-5fc45fde
```

Example prompt: Search Hacker News stories for 'WebAssembly' and give me the top 10 results — I want to see what the developer community has been saying about it lately.

## When to prefer this

Choose this endpoint when you specifically need to search Hacker News stories or comments by keyword — ideal for tech market research, developer sentiment analysis, competitor monitoring, or discovering trending launches in the HN community. Prefer this over general social search when the audience is explicitly developers and tech professionals, or when you need HN-specific signals like points and comment counts. Use the companion 'Hacker News Comments & Threads' endpoint when you already have a specific HN item ID and want the full thread.

## Known failure modes

- Empty results array when no HN stories or comments match the query — not charged
- Missing or malformed 'q' parameter causes validation error
- Invalid cursor value may return unexpected page or error
- Rate limits or upstream Algolia/Firebase outages may cause failures
- Queries over 200 characters are rejected by schema validation

## How this service works

Hacker News Search & Stories: full-text search of Hacker News stories or comments (HN Search by Algolia). Per hit the title, text, author, points, comment count, linked URL, time and item URL in the shared social schema; next_cursor gives the next page. Tech news, launches and developer discussion for market and competitor research. Bad input is free; not found or no match is not charged.

## Output

Returns a paginated list of HN story or comment hits, each containing the item ID, HN item URL, title, author handle, points (likes), reply count, linked URL, platform ('hackernews'), and creation timestamp. Also includes a next_cursor for fetching subsequent pages, the original query echo, a source disclaimer, and a request ID.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "maxLength": 200,
       "description": "Search text (1-200 characters)."
      },
      "type": {
       "enum": [
        "story",
        "comment"
       ],
       "type": "string",
       "description": "story or comment. Default story."
      },
      "limit": {
       "type": "string",
       "pattern": "^[0-9]{1,4}$",
       "description": "Results per page, 1-20. Default 20."
      },
      "cursor": {
       "type": "string",
       "maxLength": 6,
       "description": "next_cursor of the previous page (a page number)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "as_of": "2026-10-15T12:00:00.000Z",
  "items": [
   {
    "id": "40000001",
    "url": "https://news.ycombinator.com/item?id=40000001",
    "lang": null,
    "text": null,
    "type": "post",
    "title": "Show HN: Synthwidget, a synthetic widget",
    "author": {
     "handle": "synth_hn_user1",
     "verified": null,
     "followers": null,
     "display_name": null
    },
    "metrics": {
     "likes": 128,
     "views": null,
     "replies": 47,
     "reposts": null
    },
    "link_url": "https://example.invalid/synthwidget",
    "platform": "hackernews",
    "parent_id": null,
    "created_at": "2026-10-13T14:00:00.000Z",
    "media_urls": []
   },
   {
    "id": "40000002",
    "url": "https://news.ycombinator.com/item?id=40000002",
    "lang": null,
    "text": null,
    "type": "post",
    "title": "Ask HN: Anyone using synthwidget?",
    "author": {
     "handle": "synth_hn_user2",
     "verified": null,
     "followers": null,
     "display_name": null
    },
    "metrics": {
     "likes": 5,
     "views": null,
     "replies": 2,
     "reposts": null
    },
    "link_url": null,
    "platform": "hackernews",
    "parent_id": null,
    "created_at": "2026-10-12T10:13:20.000Z",
    "media_urls": []
   }
  ],
  "query": {
   "q": "synthetic widgets",
   "type": "story",
   "limit": 10,
   "cursor": null
  },
  "source": "public data via the Hacker News API (Algolia search and Firebase); not affiliated with Y Combinator",
  "complete": true,
  "platform": "hackernews",
  "disclaimer": "Public data via third-party providers; not affiliated with or endorsed by any platform. Do not use to profile, target or train AI on individuals.",
  "request_id": "01KEXAMPLE0000000000000000",
  "next_cursor": "1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hacker-news-search-stories-5fc45fde/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from social.duoleads.com](https://www.zero.xyz/host/social.duoleads.com/llms.txt)
