Hacker News Search Scraper

Search Hacker News stories, comments, Ask HN, Show HN, polls, and author activity using public HN search data.

Data fields

FieldTypeDescription
objectIdtextObject ID exported in the dataset view.
typetextType exported in the dataset view.
titletextTitle exported in the dataset view.
urllinkURL exported in the dataset view.
hnUrllinkHN URL exported in the dataset view.
authortextAuthor exported in the dataset view.
createdAtdateCreated exported in the dataset view.
pointsnumberPoints exported in the dataset view.

Input preview

querySearch query
tagsHN result types / tags
includeCommentsInclude comments
authorAuthor username
dateFromDate from
dateToDate to

API and agents

This actor can be run through Apify API, datasets, webhooks, schedules, and the official Apify MCP server.

How this actor works

See example inputs, outputs, API usage, and practical limits before running this actor on Apify.

Open Apify page

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

  1. Open the Actor on Apify.
  2. Enter a query, author, tags, or a combination of filters.
  3. Choose sort mode and optional date range.
  4. Set maxItems.
  5. 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_hn for questions, show_hn for 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: 25 before 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.

Common questions

Questions and answers reused from the canonical actor README.

Can I search Hacker News comments?

Yes. Use comment-related tags or enable comment results where appropriate.

Can I export results to CSV or Excel?

Yes. Apify datasets can be downloaded as CSV, JSON, Excel, XML, RSS, HTML, or accessed through the API.

Does this require my Hacker News account?

No. It uses public Hacker News search data.

Can I schedule monitoring?

Yes. Use Apify schedules with a fixed query and date-oriented sort.