Search Hacker News stories or comments by keyword
hn_searchFull-text search of Hacker News stories or comments through the Algolia HN API: title, URL, author, points, comment count, time and HN link; comments include their text (max 500 characters). Filters: date range (from, to as YYYY-MM-DD), minimum points, sort by relevance or date. Covers the public HN index only; limit max 25. Related tools on this server, for a different need: hn when you need to search Hacker News stories and comments or the front page. 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
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"q": "<q>"
},
"name": "hn_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Search words (1-200 characters) | |
| to | No | Latest creation date YYYY-MM-DD (optional) | |
| from | No | Earliest creation date YYYY-MM-DD (optional) | |
| sort | No | relevance (default) or date (newest first) | |
| type | No | story (default) or comment | |
| limit | No | Results, 1-25 (default 10) | |
| minPoints | No | Minimum points (default 0) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | ||
| type | No | ||
| count | No | ||
| query | No | ||
| nbHits | No | ||
| source | No | ||
| results | No | ||
| checkedAt | No |