Hacker News Scraper - Stories Jobs & Comments avatar

Hacker News Scraper - Stories Jobs & Comments

Pricing

Pay per usage

Go to Apify Store
Hacker News Scraper - Stories Jobs & Comments

Hacker News Scraper - Stories Jobs & Comments

Scrape Hacker News via Firebase API. Top, new, best, ask, show, job stories. Filter by score. Optional comments.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

oscar lira

oscar lira

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

Hacker News Scraper - Stories, Jobs & Comments

Lightweight Apify actor that scrapes Hacker News using the official Firebase API. Pure HTTP requests, no browser needed.

Features

  • Scrape Top, New, Best, Ask HN, Show HN, and Job stories
  • Filter by minimum score
  • Optionally fetch top-level comments for each story
  • Concurrent fetching with rate-limit-friendly batching (10 parallel requests)
  • Outputs structured JSON with extracted domains, ISO dates, and HN discussion links

Input

FieldTypeDefaultDescription
storyTypeenumtopCategory: top, new, best, ask, show, job
maxResultsinteger50Number of stories to return (1-500)
includeCommentsbooleanfalseFetch top-level comments per story
minScoreintegerOnly return stories with at least this score

Output

Each story in the dataset contains:

FieldTypeDescription
idintegerHN item ID
titlestringStory title
urlstringExternal link (null for text-only posts)
scoreintegerUpvote count
authorstringSubmitter username
timeintegerUnix timestamp
timeISOstringISO 8601 date
commentCountintegerTotal comments
typestringstory, job, or poll
textstringBody HTML (Ask HN, Show HN, jobs)
domainstringExtracted from URL
hnUrlstringLink to HN discussion
commentsarrayTop-level comments (if enabled)

Running locally

cd hackernews-scraper
npm install
echo '{ "storyType": "top", "maxResults": 10 }' | npx apify-cli run --purge

Technology

  • Node.js 20 (Alpine)
  • Native fetch (no axios/got)
  • Apify SDK v3