# Hacker News Search

Search every story and comment Hacker News has carried — Algolia's index of the firehose, with points, comment counts, and links.

- Method: `GET`
- Path: `/v1/hackernews/search`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `q` | string | required | The query — matched against story titles and URLs, and comment text. |
| `limit` | integer | optional | Hits per page, `1`-`100`. |
| `max_age` | integer (seconds) | optional | Ask for data no older than this. Clamped to the product's own floor, so it can narrow the window but never force a refresh on every call. |

**Example request**

```bash
curl https://api.diraz.ae/v1/hackernews/search \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "query": "anthropic",
    "total": 131999,
    "page": 0,
    "items": [
      {
        "id": "46124267",
        "title": "Anthropic acquires Bun",
        "author": "ryanvogel",
        "points": 2192,
        "comments": 1072,
        "url": "https://bun.com/blog/bun-joins-anthropic",
        "created_at": "2025-12-02T18:05:44Z"
      },
      {
        "id": "48889637",
        "title": "Zig Creator Calls Spade a Spade, Anthropic Blows Smoke",
        "author": "crowdhailer",
        "points": 1554,
        "comments": 786,
        "url": "https://raymyers.org/post/zed-creator-calls-spade-a-spade/",
        "created_at": "2026-07-13T08:39:39Z"
      }
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-20T04:05:00.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-20T04:10:00.000Z"
  }
}
```