Search and export public Hacker News stories, comments, Ask HN, Show HN, polls, and author activity.
Use this Actor to collect Hacker News search results for product research, founder and developer signals, technical trend monitoring, market analysis, content research, and AI datasets. Results can be downloaded as CSV, JSON, Excel, XML, RSS, or used through the Apify Dataset API.
At a glance
- HN search export: Search Hacker News by keyword, tag/type, author, date range, and sort mode.
- Stories and comments: Export public stories, comments, Ask HN, Show HN, polls, and related search result types.
- Research fields: Collect titles, text, URLs, authors, points, comment counts, timestamps, tags, and HN item links when available.
- Trend monitoring: Track mentions of products, competitors, technologies, companies, and topics over time.
- API export: Send HN rows to spreadsheets, BI tools, research workflows, alerting systems, or AI agents.
What can it do?
Hacker News Search Scraper uses public HN search data and saves one dataset row per matching item.
- Search stories or comments: Use keywords and result tags to narrow the output.
- Filter by author: Track public HN activity for a username.
- Filter by date range: Limit results to a specific research window.
- Sort results: Choose relevance or date ordering.
- Export clean rows: Use Apify downloads, API calls, schedules, webhooks, and integrations.
Common workflows
- Product research: Track public discussion around a product, API, startup, or category.
- Developer relations: Find where developers mention SDKs, libraries, tools, and integrations.
- Market intelligence: Monitor technical trends, competitor launches, and pain points.
- Content research: Build source lists for newsletters, essays, reports, or research briefs.
- Founder and investor signals: Watch product feedback, hiring trends, launch comments, and emerging markets.
- AI datasets: Export HN stories and comments for classification, summarization, or alerting workflows.
What data can you extract?
The Actor returns one dataset row per public Hacker News search result.
| Field | Description |
|---|---|
objectID |
Hacker News or Algolia item identifier |
title |
Story, Ask HN, Show HN, or poll title |
commentText |
Public comment text when the result is a comment |
url |
External story URL when available |
hnUrl |
Hacker News item URL |
author |
HN username |
points |
Story points when available |
numComments |
Comment count when available |
createdAt |
Item creation timestamp |
tags |
HN search tags or result type labels |
storyTitle |
Parent story title for comment results |
storyUrl |
Parent story URL for comment results |
query |
Search query used for the row |
scrapedAt |
Timestamp when the row was saved |
Example input
{
"query": "ai agents",
"tags": ["story"],
"includeComments": true,
"sortBy": "date",
"maxItems": 50
}
Example output
{
"objectID": "12345678",
"title": "Show HN: Example developer tool",
"url": "https://example.com",
"hnUrl": "https://news.ycombinator.com/item?id=12345678",
"author": "example_user",
"points": 124,
"numComments": 38,
"createdAt": "2026-06-20T12:00:00.000Z",
"tags": ["story", "show_hn"],
"query": "ai agents",
"scrapedAt": "2026-07-03T12:00:00.000Z"
}
How to run it
- Open the Actor on Apify.
- Enter a query, author, tags, or a combination of filters.
- Choose sort mode and optional date range.
- Set
maxItems. - Start the run and export the dataset.
Search tips
- Start with exact names: Product names, package names, and company names often produce cleaner results.
- Use tags for intent: Search
ask_hnfor questions,show_hnfor launches, and comments for discussion. - Sort by date for monitoring: Use date sorting and schedules for recurring alerts.
- Add an author only when needed: Author filters are best for public user activity tracking.
- Control spend: Start with
maxItems: 25before broad searches.
Limits and caveats
- The Actor extracts public Hacker News search data only.
- It does not require or use a Hacker News account.
- Some fields are empty depending on result type; comments do not have story points, and stories may not have comment text.
- Search result ordering and availability follow public HN search behavior.
API usage
curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~hacker-news-search-scraper/runs?token=YOUR_APIFY_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"query":"ai agents","tags":["story"],"maxItems":50}'
MCP and AI agents
This Actor can be used through the official Apify MCP server at https://mcp.apify.com.
For a focused single-Actor tool setup, use:
https://mcp.apify.com?tools=fetch_cat/hacker-news-search-scraper
Use the same JSON keys shown in the input configuration table, such as query, tags, author, sortBy, and maxItems.
Support
If a run fails, returns no data, or a field looks wrong, open an issue from the Actor page.
Please include the Apify run ID or run URL, input JSON, one example public URL, query, or input item, what you expected, and what the dataset returned. Small reproducible inputs make parsing or site-layout issues much faster to fix.