Hacker News Search — Stories, Comments & Live Front Page
Pricing
from $0.35 / 1,000 result items
Hacker News Search — Stories, Comments & Live Front Page
Search all of Hacker News (stories, comments, Ask/Show/Launch HN, polls, jobs) by keyword with points, comments, date, author, domain and story filters, or pull the live top/new/best/ask/show/jobs lists. Optional nested comment trees and author profiles.
Pricing
from $0.35 / 1,000 result items
Rating
0.0
(0)
Developer
Samat Makatov
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
15 hours ago
Last modified
Categories
Share
Hacker News Search — stories, comments, live lists (Algolia + official API)
Search all of Hacker News since 2006 — stories, comments, Ask HN, Show HN, Launch HN, polls, job posts — by keyword with points / comments / date / author / domain filters, or pull the live top / new / best / ask / show / jobs lists exactly as the HN pages rank them. Optionally attach each story's discussion as a nested comment tree and the author's profile (karma, account age). Built for AI agents, brand monitors and researchers: clean JSON with plain-text bodies. No API key, no proxy, no browser.
Use cases
- Brand & competitor monitoring — every story and comment mentioning your product (or a competitor) in the last N days, with points and discussion threads, on a schedule.
- Launch research — pull all
Show HN/Launch HNposts on a topic, sorted by points, to see what resonated and how people reacted (comments included). - Content & PR intelligence — which stories from a domain (
arxiv.org,github.com, your blog) hit HN, when, and how big they got. - Lead / expert discovery — find people who comment knowledgeably about a technology; include their profile (karma, account age, bio) to qualify them.
- Trend tracking for agents — a daily snapshot of the live front page / best list with a points floor, deduped by URL, trimmed to the fields you need.
- Hiring signals — YC job posts (
kind: job, searchable history, or livejobs) filtered by stack keywords.
Input
| Field | Type | Default | Notes / allowed values |
|---|---|---|---|
query | string | — | Keywords. Algolia syntax: "exact phrase", -excluded. Empty = list by date with the filters only. |
queries | string[] | [] | Extra queries processed in the same run (batch monitoring). Each item carries its query. maxItems is the total. |
kind | enum | story | Search (Algolia): story, comment, ask_hn, show_hn, launch_hn, poll, job, front_page, newest, any. Live lists (Firebase): top, new, best, ask, show, jobs. See reference. |
sort | enum | relevance | relevance (text match → points → comments; falls back to date when no query), date (newest first), points, comments. Points/comments are sorted client-side: the actor fetches the whole reachable pool (up to 1,000 hits, 5 requests) and returns the top maxItems. |
searchIn | enum | all | all, title, url, text, title_text, author → Algolia restrictSearchableAttributes. all also matches story text, URLs and (for kind: comment/any) comment text — right for mention monitoring, noisy for topic lists: use title for "stories about X". |
typoTolerance | bool | false | Let Algolia match misspellings. Off by default because it turns short terms into noise ("LLM" → "Limbo", "Limits", "GLM"; "Kafka" → "Kakapos"); turn on to also catch misspelled mentions. |
minPoints | int | 0 | Algolia numeric filter points>=. Ignored for comments (they have no points). |
minComments | int | 0 | Algolia numeric filter num_comments>=. |
sinceDays | int | 0 | Last N days; 0 = all time. Overridden by dateFrom. |
dateFrom / dateTo | date | — | YYYY-MM-DD or ISO 8601 UTC, inclusive. |
author | string | — | Bare username (pg) → tag author_pg. |
storyId | string | — | Restrict to one thread → tag story_<id> (use with kind: comment). |
domain | string | — | Keep items whose URL is on this domain or a subdomain (client-side). With an empty query it becomes the URL query, so "all submissions of a site" is one call. |
maxItems | int | 50 | 1–5000, total across queries. Algolia serves at most 1000 hits per query; live lists hold 200–500 ids. Legacy alias limit still works. |
includeComments | bool | false | Attach nested comments per story (1 extra request per story that has comments). |
maxCommentsPerStory | int | 20 | 1–500, breadth-first (top-level replies first). |
commentsDepth | int | 2 | 1–10 reply levels. |
includeAuthorProfile | bool | false | Attach authorProfile (karma, createdAt, about, submittedCount) — 1 request per distinct author, cached in the run. |
textMaxLength | int | 2000 | 100–50000 chars for text and comment texts. |
dedupeByUrl | bool | false | One item per external URL (scheme/www/trailing slash ignored). |
fields | string[] | [] | Whitelist of output fields (id always kept). |
Filters are ANDed. Live Firebase kinds ignore query, author, storyId, dates and searchIn (they are not searchable) and apply minPoints / minComments / domain client-side — the run logs a warning when an input is ignored.
Reference
kind values
| kind | Source | What you get | Filters |
|---|---|---|---|
story | Algolia tag story | Stories (link + text posts), all time | all |
comment | Algolia tag comment | Comments with parent story context | all except minPoints/minComments |
ask_hn / show_hn / launch_hn | Algolia tags | Ask HN / Show HN / Launch HN (YC launches) posts | all |
poll | Algolia tag poll | Polls (options are type pollopt) | all |
job | Algolia tag job | YC job-board posts, full history | all |
front_page | Algolia tag front_page | ~30 stories currently on the front page | all |
newest | Algolia search_by_date, tag story | Alias for story + sort: date | all |
any | Algolia, no type tag | Stories, comments, polls, jobs together | all |
top | Firebase topstories | Live HN front page ranking, up to 500 | minPoints, minComments, domain |
new | Firebase newstories | Live newest, up to 500 | same |
best | Firebase beststories | Live "best" ranking, up to 200 | same |
ask / show / jobs | Firebase askstories / showstories / jobstories | Live Ask HN / Show HN / jobs lists | same |
Algolia tags used under the hood (tags output field)
story, comment, poll, pollopt, job, show_hn, ask_hn, launch_hn, front_page, author_<username>, story_<id>.
Tags are ANDed with commas; the actor builds them from kind, author and storyId.
Algolia numeric filters
points, num_comments, created_at_i (unix seconds) with <, <=, =, >=, >; built from minPoints, minComments, sinceDays / dateFrom / dateTo.
searchIn → restrictSearchableAttributes
| searchIn | attributes |
|---|---|
all | title, url, story_text, comment_text, author (Algolia default) |
title | title |
url | url |
text | comment_text, story_text |
title_text | title, story_text, comment_text |
author | author |
Topic vs mention searches. The default searchIn: "all" finds every item where the word appears anywhere — including self-post text and URLs — which is what brand monitoring needs (kind: "any" adds comments). For "the best stories about X" lists, set searchIn: "title": e.g. LLM stories of one week sorted by points returned 191 hits with all (among them a post about migrating prompts to Ollama and a "Pelican-bicycle alternatives" Show HN that mention LLMs only in their text) vs 140 with title, all with LLM in the headline.
Examples
Brand monitoring, last 30 days, stories with traction plus their discussion
{ "queries": ["apify", "crawlee"], "kind": "story", "sinceDays": 30, "minPoints": 5, "sort": "points", "includeComments": true, "maxCommentsPerStory": 10, "commentsDepth": 2, "maxItems": 100 }
What did people say about a topic? (comments, newest first)
{ "query": "\"vector database\"", "kind": "comment", "sinceDays": 90, "sort": "date", "maxItems": 200 }
All Show HN launches about a category, ranked by points, with founder profiles
{ "query": "MCP server", "kind": "show_hn", "dateFrom": "2026-01-01", "sort": "points", "includeAuthorProfile": true, "maxItems": 50 }
Every HN hit from a domain this quarter (PR report)
{ "domain": "arxiv.org", "dateFrom": "2026-07-01", "dateTo": "2026-09-30", "minPoints": 50, "sort": "points", "dedupeByUrl": true, "maxItems": 300 }
Daily snapshot of the live top list, compact fields
{ "kind": "top", "minPoints": 100, "maxItems": 30, "fields": ["title", "url", "domain", "points", "numComments", "createdAt", "hnUrl"] }
Whole thread of one story as flat comments (searchable)
{ "kind": "comment", "storyId": "4058874", "query": "scraping", "maxItems": 100 }
Output
One dataset item per story / comment. Example (trimmed):
{"id": "46513489","type": "story","kind": "story","query": "apify","title": "Show HN: mcpc – Universal command-line client for Model Context Protocol","url": "https://github.com/apify/mcpc","domain": "github.com","hnUrl": "https://news.ycombinator.com/item?id=46513489","points": 50,"numComments": 5,"author": "jancurn","createdAt": "2026-01-06T14:03:11Z","text": null,"storyId": "46513489","storyTitle": null,"storyUrl": null,"parentId": null,"tags": ["story", "author_jancurn", "story_46513489", "show_hn"],"comments": [{ "id": "46513489", "author": "stinny", "createdAt": "2026-01-06T15:29:16.000Z", "text": "Pretty sweet tool…", "hnUrl": "https://news.ycombinator.com/item?id=46513489","children": [ { "id": "46514078", "author": "jancurn", "text": "Thank you! …", "children": [] } ] }],"authorProfile": { "username": "jancurn", "karma": 748, "createdAt": "2011-10-31T16:07:06.000Z", "about": "Jan Čurn — Founder & CEO @ Apify …", "submittedCount": 121, "hnUrl": "https://news.ycombinator.com/user?id=jancurn" },"source": "algolia","sourceUrl": "https://hn.algolia.com/api/v1/search?query=apify&tags=story&numericFilters=points%3E%3D5%2Ccreated_at_i%3E%3D…&hitsPerPage=100&page=0","fetchedAt": "2026-09-12T23:32:10.512Z"}
| Field | Type | Meaning |
|---|---|---|
id | string | HN item id (stable; hnUrl = news.ycombinator.com/item?id=<id>) |
type | string | story, comment, poll, pollopt, job |
kind, query | string | Input that produced the item (query null for live lists) |
title, url, domain | string|null | Submission title, external URL, hostname without www. |
points, numComments | int|null | Score and comment count (comments: points null) |
author, createdAt | string | Username, ISO 8601 UTC |
text | string|null | Story/comment body as plain text: HTML stripped, entities decoded, paragraphs kept, links as label (href), truncated to textMaxLength |
storyId, storyTitle, storyUrl, parentId | string|null | Thread context (for stories storyId = id; the rest only on comments) |
tags | string[] | Algolia tags (see reference) |
comments | array | Only with includeComments: nested {id, author, createdAt, text, hnUrl, children[]} |
authorProfile | object|null | Only with includeAuthorProfile: {username, karma, createdAt, about, submittedCount, hnUrl} |
source, sourceUrl | string | algolia or firebase and the exact API request |
fetchedAt | string | Fetch timestamp |
Dataset views: Overview (stories) and Comments.
Use it from code / agents
curl (Apify API, run synchronously and get the dataset):
curl -X POST "https://api.apify.com/v2/acts/yadroo~hackernews-search/run-sync-get-dataset-items?token=$APIFY_TOKEN" \-H 'content-type: application/json' \-d '{"query":"apify","kind":"story","sinceDays":30,"minPoints":5,"maxItems":50}'
JavaScript (apify-client):
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('yadroo/hackernews-search').call({ query: 'apify', kind: 'story', sinceDays: 30, minPoints: 5, includeComments: true });const { items } = await client.dataset(run.defaultDatasetId).listItems();
Python (apify-client):
from apify_client import ApifyClientclient = ApifyClient(token)run = client.actor("yadroo/hackernews-search").call(run_input={"kind": "top", "minPoints": 100, "maxItems": 30})items = client.dataset(run["defaultDatasetId"]).list_items().items
MCP: add https://mcp.apify.com to your agent (Claude, Cursor, custom) and call the tool yadroo/hackernews-search with the same JSON input.
Pricing
Pay per event: $0.001 per run start + $0.0005 per item (story or comment; nested comments and authorProfile are part of the item, not billed separately).
Typical runs: a 30-day brand check with 40 hits ≈ $0.021; a 500-item topic export ≈ $0.251; a daily top-30 snapshot ≈ $0.016.
Limits & FAQ
- Rate limits. HN Algolia allows ~10,000 requests/hour per IP; the actor pages 200 hits per request with a short pause and retries 429/5xx with backoff, so normal runs never get close. The Firebase API has no published limit; item fetches run 8 in parallel.
- 1000-hit cap. Algolia refuses to page past 1000 hits for one query. The actor caps per query and logs a warning with the true match count — split by
dateFrom/dateTowindows or severalqueriesto go deeper. - Freshness. Algolia indexes new items within minutes; points/comment counts are updated periodically, so very fresh stories may show lower numbers than the live site. Live
top/new/best/ask/show/jobskinds read the official API in real time. - Sorting by points/comments is done client-side: up to 1,000 matching hits are fetched per query and the top
maxItemsreturned. Algolia never serves more than 1,000 hits, so for a global "top of all time" on a broad query narrow withminPointsor a date range. - Search precision. Matching is word-based with prefix and plural matching (
LLMfinds "LLMs"); typo matching is off unlesstypoTolerance: true.searchIn: "all"(default) matches text and URLs too — see the note under Reference for topic lists. - Comments and points. HN does not expose comment scores;
pointsisnullfor comments andminPointsis ignored forkind: comment. - Errors. Invalid input (unknown kind/sort, bad dates,
dateFromafterdateTo) fails immediately with a clear message before any request. Per-item enrichment failures (comments, profiles) are logged and leavecomments: []/authorProfile: null; if the source is unreachable and nothing was collected, the run fails instead of looping. - Deleted / dead items are skipped; deleted comments are dropped from
comments. - Roadmap. Poll options (
pollopt) inline with polls; user-submission listing (author+ empty query already covers most of it).
Sources: HN Search API by Algolia, official Hacker News API. Content belongs to its authors / Y Combinator.
Made by Yadroo — more data actors for agents: stackexchange-search · github-repo-intel · google-news-search · rss-to-json · crypto-news