Search Hacker News stories and comments or the front page
hnHacker News stories or comments from the Algolia search API: keyword search (q) or the current front page (mode=front), optionally since a date. Stories give title, URL, HN link, points, comments, author and time. Comments give their text (400 characters, HTML stripped) and the story title. Up to 50 results. Public data, no key. Related tools on this server, for a different need: hn_search when you need to search Hacker News stories or comments by keyword. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "hn"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Keywords | |
| mode | No | front: the current front page (stories only) | |
| type | No | story (default) or comment | |
| limit | No | Max results, 1-50, default 20 | |
| since | No | YYYY-MM-DD: only items from this day on |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| total | No | ||
| source | No | ||
| results | No | ||
| returned | No | ||
| checkedAt | No |