Hacker News Scraper avatar

Hacker News Scraper

Pricing

Pay per usage

Go to Apify Store
Hacker News Scraper

Hacker News Scraper

Scrape stories from Hacker News including top, new, best, ask, show, and job stories. Returns titles, URLs, scores, comment counts, and optionally top-level comments. Uses the official HN Firebase API.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Stephan Corbeil

Stephan Corbeil

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

6 days ago

Last modified

Categories

Share

Scrapes stories, comments, and metadata from Hacker News using the free Firebase API (no authentication required).

Features

  • Fetch stories from multiple feeds: top, new, best, ask, show, job
  • Configurable story limits (1-500)
  • Optional top-level comment extraction (up to 10 per story)
  • No API key needed - uses public HN Firebase API
  • Fast async/await execution
  • Structured JSON output

Input Configuration

ParameterTypeDescriptionDefault
searchTypestringStory type: top, new, best, ask, show, job"top"
maxResultsintegerMaximum stories to fetch (1-500)30
includeCommentsbooleanInclude top 10 comments per storyfalse

Output

Each story record includes:

  • id: Story ID
  • title: Story title
  • url: External URL (if applicable)
  • hnUrl: Direct link to HN discussion
  • author: Story author/submitter
  • score: Points/upvotes
  • commentCount: Total comments on story
  • type: Item type (story, poll, etc.)
  • time: Unix timestamp
  • text: Text content (Ask HN, Show HN)
  • topComments: Array of top 10 comments (if enabled)

Example Usage

{
"searchType": "top",
"maxResults": 50,
"includeComments": true
}

API Reference

Uses the Hacker News Firebase API:

  • Base URL: https://hacker-news.firebaseio.com/v0
  • Endpoints:
    • /topstories.json - Top stories
    • /newstories.json - Newest stories
    • /beststories.json - Best stories
    • /askstories.json - Ask HN posts
    • /showstories.json - Show HN posts
    • /jobstories.json - Job listings
    • /item/{id}.json - Individual item details

License

MIT - Built for nexgendata/Apify