hackernews-api/search
Search the public hn.algolia.com index by term. No key, no account, and the same envelope as every other endpoint here.
| Name | What it is |
|---|---|
q | The search term. 1 to 80 characters. |
limit | 1 to 100, default 25. Out of range is a 400, never trimmed. |
q (a search term, not a handle)hits is an array{
"success": true,
"platform": "hackernews",
"endpoint": "hackernews/search",
"data": {
"author": {
"id": null,
"handle": null,
"followers": null
},
"items": [
{
"id": "46990729",
"title": "An AI agent published a hit piece on me",
"url": "https://news.ycombinator.com/item?id=46990729",
"published_at": "2026-09-28T11:04:22.000Z",
"metrics": { "points": 412, "comments": 176 },
"position": 1
}
],
"has_more": null
},
"error": null,
"cached": false
}Recorded response, captured 30 Sep 2026. A live call returns the value at the moment you ask.
idtitleurlpublished_atmetrics.pointsmetrics.commentsauthor — It is in the Algolia response, it is in the committed fixture on purpose, and it is dropped on the way out. The fixture keeps it so the test can prove the removal — a fixture with the field stripped would make that guard pass by having nothing to look at.has_more — Null, not false. The index publishes nbPages and our client does not pass it through, so we do not know — and false would promise the list ended.text — Story bodies are not copied. The title, the link and the two counters are what measure a story without reproducing it.A field we cannot read comes back null, never 0. A zero would be a claim about the account; null is a fact about our collection.
Measured against the live index on 2026-09-30: `ai agent` in the archiver's own 48-hour window returned 30 items; the same term with the window off and limit=10 returned 10; a term nobody has posted returned HTTP 200 with nbHits 0 and an empty array.
1 credit per call. A call that finds nothing costs nothing.
Because it is an answer. We searched and there is nothing there — that is information, and it is returned as HTTP 200 with an empty items array. What is never charged is a failed fetch.
No. Titles only, and typo tolerance is off. Both were measured on 2026-09-05: with them on, `mrr` returned 81 results and not one was about MRR — the first five were macOS wallpapers, Nitter instances, a data centre article, Project Xanadu, and US Navy submarine spending.
Call hackernews-api/search from your own code with one key.