Hacker News Scraper — Stories, Comments & Search for RAG avatar

Hacker News Scraper — Stories, Comments & Search for RAG

Pricing

Pay per usage

Go to Apify Store
Hacker News Scraper — Stories, Comments & Search for RAG

Hacker News Scraper — Stories, Comments & Search for RAG

Fetch Hacker News stories, comment threads, and search results as clean structured data with markdown comments. Search by keyword, grab front page stories, or get full comment trees. MCP-enabled for Claude, Cursor, and AI agents.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Aaron Hampton

Aaron Hampton

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

5 days ago

Last modified

Share

Fetch Hacker News stories, comment threads, and search results as clean structured data with markdown-formatted comments. Search by keyword, grab front page stories, or get full comment trees with depth tracking.

Perfect for RAG pipelines, trend monitoring, startup research, and AI agents.

Features

  • Keyword search — search all HN stories and comments via the Algolia API
  • Front page — get current top stories with points, authors, and metadata
  • Full comment trees — recursive comment fetching with depth tracking and parent IDs
  • User profiles — fetch user karma, about, and submission history
  • Clean markdown — all HTML stripped, comments converted to readable markdown
  • Dual-mode — run as a normal Apify Actor OR connect as an MCP server for Claude, Cursor, and other AI agents
  • No browser required — uses free public APIs (Algolia + Firebase), no proxies needed

Use Cases

  • RAG pipelines — feed HN discussions into vector databases for Q&A over tech community knowledge
  • Trend monitoring — track trending topics, startups, and technologies on HN
  • Startup research — search for mentions of companies, products, or technologies
  • AI agents — let Claude/Cursor search HN via MCP tools
  • Sentiment analysis — analyze community reactions to product launches and news

Input (Normal Actor Mode)

FieldTypeDescription
modeenumsearch, front_page, story, or user
querystringSearch keyword (mode=search)
storyIdintegerHN story ID (mode=story)
usernamestringHN username (mode=user)
maxStoriesintegerMax stories to return (default 20)
includeCommentsbooleanFetch comment threads (default true)
maxCommentsPerStoryintegerMax comments per story (default 30)

Output

{
"id": 38309611,
"title": "OpenAI's board has fired Sam Altman",
"url": "https://openai.com/blog/...",
"hnUrl": "https://news.ycombinator.com/item?id=38309611",
"author": "davidbarker",
"points": 5710,
"numComments": 2530,
"createdAt": "2023-11-17T20:28:50Z",
"comments": [
{
"id": 15,
"author": "sama",
"textMarkdown": "Clean markdown comment text...",
"parent": 38309611,
"depth": 0
}
]
}

MCP Tools

When connected as an MCP server, the following tools are available:

ToolDescription
search_hnSearch HN stories by keyword. Returns title, points, author, URL.
get_storyFetch a full story with optional comment thread.
get_front_pageGet current top stories from the HN front page.

Pricing

Pay-per-event. First results are free; subsequent events billed at:

EventPrice
Story fetched$0.002
Comment thread fetched$0.001
MCP tool call$0.005
Actor start$0.00005

Volume discounts available at higher tiers.