Hacker News Search Scraper | Stories & Comments
Pricing
from $0.38 / 1,000 hacker news items
Hacker News Search Scraper | Stories & Comments
Search Hacker News by keyword, author, points and date. Returns title, link, author, points, comment count, text and publish date for stories, comments, Ask/Show HN, polls and jobs. Many queries per run, no login or proxy.
Pricing
from $0.38 / 1,000 hacker news items
Rating
0.0
(0)
Developer
Flowo
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Features
Share

This actor searches Hacker News and returns one row per matching story, comment, Ask HN, Show HN, poll or job ad. Each row has the title, link, author, points, comment count, text and publish date. You can filter by keyword, author, minimum points, minimum comments, date range and item type, and run many search terms in one run.
What does Hacker News Search Scraper do?
It takes search terms and filters, queries the public Hacker News search index (hn.algolia.com, the engine behind HN's own search box) and saves clean rows to a dataset. Every row records which search term found it (query) and its rank (position).
It is built for developer-relations and marketing teams tracking mentions, researchers who need discussion datasets, recruiters who collect job ads, and AI agents that need a cheap, well-defined search call.
How to scrape Hacker News stories and comments

- Open the actor in Apify Console and go to the Input tab.
- Enter one or more Search terms (one per line), or leave them empty and set an author, a date range or a type.
- Choose the Item type (stories, comments, Ask HN, Show HN, jobs and so on) and Sort by.
- Add filters such as minimum points or a date range, and set Max results per search term.
- Click Start and download the results as JSON, CSV or Excel from the Output tab.
How much does it cost to scrape Hacker News?
Price per event by Apify plan:
| Event | Free | Bronze | Silver | Gold and above |
|---|---|---|---|---|
| Hacker News item | $0.45 per 1,000 | $0.405 per 1,000 | $0.36 per 1,000 | $0.315 per 1,000 |
| Actor start | $0.00005 | $0.00005 | $0.00005 | $0.00005 |
A test run with the API example input below returned 200 rows in 2 s.
The actor uses pay-per-event pricing. One result event is charged for each item saved to the dataset: $0.45 per 1,000 items. A small start event ($0.00005 per GB of memory) is charged once per run. Searches with no matches are free. Apify proxy is not needed.
Examples on the Free plan, start fee included:
| Scenario | Items | Cost |
|---|---|---|
| Top 30 stories for two terms (rust, postgres) | 60 | about $0.027 |
| One term, 1,000 results by relevance | 1,000 | about $0.45 |
All llm stories since 2023, by date | 5,000 | about $2.25 |
| A very large history export | 100,000 | about $45 |
Input

The main fields:
- Search terms (
queries): supports "exact phrases" and-exclude. - Item type (
type): story, comment, all, ask_hn, show_hn, front_page, poll, job. - Sort by (
sort): relevance (max 1000 per term) or date (newest first, no 1000 limit). - Max results per search term (
maxItemsPerQuery): 1 to 100000, default 100. - Filters:
author,minPoints,minComments,dateFrom,dateTo(YYYY-MM-DD, UTC). - Search options:
searchIn(all, title, url, text),exactMatch(no typo matching),onlyNew(only items not returned in earlier runs). - Max results in total (
maxItems) and an optional proxy.
{"queries": ["rust", "postgres"],"type": "story","minPoints": 100,"maxItemsPerQuery": 30}
What data can you extract from Hacker News?

| Field | Meaning |
|---|---|
id, type, url | Item id, type and its Hacker News page |
title, text, textHtml | Title, plain text and HTML text (text posts and comments) |
externalUrl, domain | Linked page and its domain |
author, authorUrl | HN username and profile link |
points, commentsCount | Points and comment count (empty for comments and jobs) |
storyId, storyTitle, storyUrl, storyExternalUrl | The story a comment belongs to |
isAskHn, isShowHn, isFrontPage | Flags |
publishedAt, updatedAt | ISO timestamps |
query, position, scrapedAt | Search term, rank, scrape time |
Example row (shortened):
{"id": "22238335","type": "story","title": "Why Discord is switching from Go to Rust","url": "https://news.ycombinator.com/item?id=22238335","externalUrl": "https://blog.discordapp.com/why-discord-is-switching-from-go-to-rust-a190bbca2b1f","domain": "blog.discordapp.com","author": "Sikul","points": 1582,"commentsCount": 642,"publishedAt": "2020-02-04T17:30:40.000Z","query": "rust","position": 1}
Use cases
- Brand and technology monitoring: schedule a date-sorted comment search with "Only new since the last run" to see fresh mentions of a product or competitor.
- Topic research: collect the best-voted stories for several terms in one run.
- Historical datasets: export every story or comment on a topic over years, past the 1000-result cap, using date sort.
- Hiring and launches: pull job ads, "Ask HN" hiring threads, or Show HN posts that link to GitHub.
- Author analysis: list everything a given user posted.
Limitations
- With Sort by Relevance, Hacker News search returns at most 1000 results per term; use Sort by Date for more.
- Comment trees (replies), author karma and GitHub star enrichment are not provided. Use type Comments to get the comments of a topic.
- Comments and jobs have no points or comment count, so those fields are empty and the minimum points/comments filters are rejected for those types.
- Title and URL search do not work with comments. Jobs match only in title and URL.
- Usernames are case-sensitive; a wrong case returns no results.
- Without search terms you must set an author, date range, points/comments filter or a type such as Front page, otherwise the run stops with an input error.
Tips and troubleshooting
- Zero rows? Check the author's capitalisation, the date range, and whether the type fits the filter.
- Terms like
rustalso match "just" and "trust" by default; turn on Exact words only for cleaner results. - For monitoring, combine Sort by Date, "Only new since the last run" and a schedule.
- Use
"quotes"for exact phrases and-wordto exclude a word. - Set Max results in total to cap the whole run when you search many terms.
- No proxy is needed; enable it only if runs get blocked.
API, MCP and integrations
Run the actor from your code with the same JSON input as in Console. Your API token is in Console → Settings → API & Integrations.
Python (pip install apify-client):
from apify_client import ApifyClientclient = ApifyClient("YOUR_APIFY_TOKEN")run = client.actor("genial_candlestand/hacker-news-search-scraper").call(run_input={"queries": ["rust", "postgres"],"type": "story","sort": "relevance","maxItemsPerQuery": 100,})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item)
Node.js (npm install apify-client):
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });const run = await client.actor('genial_candlestand/hacker-news-search-scraper').call({"queries": ["rust", "postgres"],"type": "story","sort": "relevance","maxItemsPerQuery": 100,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
HTTP — one request runs the actor and returns the results (runs up to 5 minutes; longer ones: run asynchronously):
curl -X POST "https://api.apify.com/v2/acts/genial_candlestand~hacker-news-search-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"queries":["rust","postgres"],"type":"story","sort":"relevance","maxItemsPerQuery":100}'
AI agents (MCP). Add the actor as a tool of the Apify MCP server. Claude Code:
$claude mcp add --transport http apify "https://mcp.apify.com?tools=genial_candlestand/hacker-news-search-scraper"
Claude Desktop, Cursor or VS Code: {"mcpServers": {"apify": {"url": "https://mcp.apify.com?tools=genial_candlestand/hacker-news-search-scraper"}}}. Then ask, for example:
- "Find the 30 most upvoted Hacker News stories about rust with at least 100 points"
- "Get the latest 200 Hacker News comments mentioning postgres, newest first"
- "List 20 recent Hacker News posts and comments by user pg"
Integrations. Run it on a schedule with Apify Schedules and send the results to Google Sheets, Slack, Zapier, Make, n8n or your webhook — see Apify integrations.
FAQ
Is it legal to scrape Hacker News?
The actor reads public data that Hacker News shows to everyone, including usernames of posters. You are responsible for how you use it and for complying with applicable law and privacy rules.
Where does the data come from?
From the public Hacker News search index at hn.algolia.com, the same one HN's search box uses. No login or API key is needed.
How is it different from other Hacker News actors?
It accepts several search terms per run and labels each row with its term, supports author, points, comments and date-range filters, goes past 1000 results per term with date sort, and returns plain text and HTML. It costs $0.45 per 1,000 items, against $5 per 1,000 for the leading Hacker News search actor.
Can I get comments?
Yes, set Item type to Comments. Each comment row includes the parent story's title and link.
Also useful
- Google News Scraper — add mainstream news articles by keyword and topic
- YouTube Comments Scraper — collect discussion from YouTube videos as well
- Google Trends Scraper — check how interest in the same topics changes over time
- Google Jobs Scraper — find job listings beyond Hacker News hiring posts