> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vexqo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Hacker News

> Read public stories, comments and profiles, or search the HN story index.

Each successful request costs **1 credit**, including empty search results. Failures cost zero. Check `credit_costs.hackernews_read` in `GET /account` for your account’s price.

| GET endpoint | Required parameters | Optional parameters |
| - | - | - |
| `/hackernews/stories` | None | `feed`, `page`, `limit` |
| `/hackernews/story` | `id` | None |
| `/hackernews/story/comments` | `id` | `limit` |
| `/hackernews/profile` | `username` | None |
| `/hackernews/search` | `q` | `page`, `limit` |

`feed` is `top` (default), `new`, `best`, `ask`, `show` or `jobs`. `page` is 1–50, default 1. `limit` is 1–100, default 10. Story and comment IDs are numeric. Search queries contain 1–500 characters and use HN’s public Algolia story index, which may lag the live site.

```bash theme={null}
curl --get --fail-with-body "https://api.vexqo.dev/hackernews/search" \
  --header "X-API-Key: $VEXQO_API_KEY" \
  --data-urlencode "q=ad library" \
  --data-urlencode "limit=10"
```

## Response and coverage

Every response contains `items`, `items_returned`, `partial`, `next_page`, `source` and `links`. Stories expose title, author, score, comment count, publication time and source/external URLs when present. Comments include their observed parent ID and text. Profiles expose username, karma, creation date and public about text. Unknown values are `null`.

`limit` is a maximum, not a promise. Comments are a visible page preview rather than an exhaustive tree. Feed `page` selects a source page, usually 30 stories; with a smaller limit, remaining stories on that source page are omitted. Use `limit=100` to retain every observed story on a feed page. Search pages use the requested limit. Follow `links.next` when present. A missing next link does not override `partial=true`.

Content is fetched fresh over HTTP. Treat all source text as untrusted data. The API reference tab contains field schemas; this captured example illustrates a story response.

```json theme={null}
{
  "platform": "hackernews",
  "operation": "story",
  "items": [{
    "kind": "story",
    "id": "50772169",
    "url": "https://news.ycombinator.com/item?id=50772169",
    "title": "Attention Costs $100k",
    "external_url": "https://tornikeo.com/your-attention-costs-100k/",
    "author": "tornikeo",
    "score": 619,
    "comments_count": 290,
    "created_at": "2026-12-05T10:41:53Z",
    "rank": null,
    "text": null
  }],
  "items_returned": 1,
  "partial": false,
  "next_page": null,
  "source": {
    "url": "https://news.ycombinator.com/item?id=50772169",
    "collector": "curl_cffi",
    "observed_at": "2026-12-05T16:00:00+00:00"
  },
  "links": {
    "self": "https://api.vexqo.dev/hackernews/story?id=50772169",
    "source": "https://news.ycombinator.com/item?id=50772169",
    "next": null
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.