Hacker News Scraper — Stories, Comments, Users avatar

Hacker News Scraper — Stories, Comments, Users

Pricing

Pay per usage

Go to Apify Store
Hacker News Scraper — Stories, Comments, Users

Hacker News Scraper — Stories, Comments, Users

Scrape Hacker News stories, comments, and user profiles. Get title, score, author, URL, comment text, karma. Track trending tech topics and developer sentiment. Export JSON/CSV. No API key needed. Need custom scraping? Email spinov001@gmail.com. Tips: t.me/scraping_ai

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Alex

Alex

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

0

Monthly active users

19 hours ago

Last modified

Share

Hacker News Scraper

Scrape stories and comments from Hacker News — extract top, new, best, Ask HN, Show HN, and job posts with full comment threads. Uses the official HN API and Algolia search for fast, reliable data extraction.

Features

  • 6 story types — top, new, best, Ask HN, Show HN, and job stories
  • Full comment threads — nested comments with author, text, timestamp, depth level, and child count (up to 3 levels deep)
  • Algolia search — find stories by keyword with relevance ranking across all of Hacker News history
  • Score filtering — set a minimum score threshold to extract only high-quality stories
  • Batch processing — fetches stories in parallel batches of 10 for maximum speed
  • Domain extraction — automatically extracts the domain from story URLs
  • Real-time data — uses the official Firebase HN API for live scores and comment counts

Output Example

{
"id": 39876543,
"title": "Show HN: I built an open-source alternative to Notion",
"url": "https://github.com/user/project",
"author": "developer_123",
"score": 487,
"commentCount": 234,
"time": "2026-03-17T14:20:00.000Z",
"type": "story",
"hnUrl": "https://news.ycombinator.com/item?id=39876543",
"domain": "github.com",
"source": "top",
"comments": [
{
"id": 39876600,
"author": "tech_reviewer",
"text": "This is impressive! I especially like the...",
"time": "2026-03-17T14:35:00.000Z",
"depth": 0,
"childCount": 5
}
],
"scrapedAt": "2026-03-18T12:00:00.000Z"
}

Use Cases

  • Tech trend monitoring — track what topics, tools, and technologies the developer community is discussing
  • Content research — discover high-performing content topics and formats that resonate with technical audiences
  • Competitive intelligence — monitor mentions of your product, competitors, and industry on the #1 tech news site
  • Startup discovery — scrape Show HN posts to find new product launches and early-stage startups
  • Job market analysis — extract HN job postings to analyze hiring trends, salaries, and in-demand skills

Input Parameters

ParameterTypeDefaultDescription
scrapeTypeString"top"Story type: top, new, best, ask, show, job, search
searchQueriesArray[]Keywords to search across HN history (via Algolia)
maxStoriesNumber100Maximum stories to extract
includeCommentsBooleantrueWhether to extract comment threads
maxCommentsPerStoryNumber30Maximum comments per story (includes nested replies)
minScoreNumber0Minimum score threshold (filter out low-scoring stories)

Cost Estimation

  • ~$0.50 per 100 stories without comments
  • ~$2.00 per 100 stories with full comment threads
  • Free tier: up to 30 stories with Apify free plan

FAQ

Q: Can I search across all of Hacker News history? A: Yes. The search feature uses Algolia's HN Search API, which indexes all Hacker News stories and comments from the beginning. You can find stories from any time period.

Q: Why are comments more expensive to scrape? A: Each comment requires a separate API call to the HN Firebase API. A story with 200 comments can require 30+ individual requests to fetch the top-level and nested replies.

Q: What's the difference between "top" and "best" stories? A: "Top" shows the current front page ranking (changes frequently). "Best" shows the highest-scoring stories over a longer period. "New" shows the most recently submitted stories regardless of score.