# companyfacts.dev Hacker News Search API

> companyfacts.dev Hacker News Search API is a paid API for AI agents from companyfacts.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-31).

Search and retrieve Hacker News stories by keyword query, date range, or specific story IDs via a paid x402 endpoint.

## Facts

- Endpoint: GET https://companyfacts.dev/x402/v1/hacker-news?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/companyfacts-dev-hacker-news-search-api-c95cd61a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_sRpSR4ymIqxz7jMJHXvqm

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 companyfacts-dev-hacker-news-search-api-c95cd61a
```

Example prompt: Search Hacker News for stories about 'large language models' posted after January 1, 2024 and give me the titles, authors, point counts, and URLs.

## When to prefer this

Choose this endpoint when you need structured, machine-readable metadata about Hacker News stories — including point counts, comment counts, authors, and timestamps — especially when filtering by keyword or date. Prefer it over scraping HN directly or using the Firebase HN API when you need full-text search capability with parsed fields and are comfortable with per-call micropayment via x402.

## Known failure modes

- Ambiguous or missing query returns zero results
- date_from value in wrong format returns an error
- story_ids referencing deleted or non-existent stories returns empty items
- Rate limiting or payment failure returns 402 or access denied
- Very broad queries may return truncated or paginated results without clear indication

## How this service works

Open job postings read first-hand from the applicant-tracking system behind a company's careers page: Greenhouse, Ashby, Lever or Workable. Includes a directory of 8532 company job boards, because none of the vendors publishes one. Salaries are parsed into numbers where the employer publishes them and refused where ambiguous. No personal data.

## Output

Returns a JSON object with a mode field (e.g. 'search'), a count of results, and an array of story items each containing: numeric ID, URL, type, title, author handle, domain, point score, source (e.g. 'algolia'), creation timestamp (ISO 8601), a verify URL linking back to news.ycombinator.com, and number of comments. Also includes a notes array for any metadata about the response.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "query": {
       "type": "string"
      },
      "date_from": {
       "type": "string"
      },
      "story_ids": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mode": "search",
  "count": 1,
  "items": [
   {
    "id": 8863,
    "url": "http://www.getdropbox.com/u/2/screencast.html",
    "type": "story",
    "title": "My YC app: Dropbox - Throw away your USB drive",
    "author": "dhouston",
    "domain": "getdropbox.com",
    "points": 104,
    "source": "algolia",
    "created_at": "2007-04-04T19:16:40Z",
    "verify_url": "https://news.ycombinator.com/item?id=8863",
    "num_comments": 71
   }
  ],
  "notes": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/companyfacts-dev-hacker-news-search-api-c95cd61a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from companyfacts.dev](https://www.zero.xyz/host/companyfacts.dev/llms.txt)
