Hacker News Scraper
Pricing
Pay per usage
Go to Apify Store
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
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
| Parameter | Type | Description | Default |
|---|---|---|---|
searchType | string | Story type: top, new, best, ask, show, job | "top" |
maxResults | integer | Maximum stories to fetch (1-500) | 30 |
includeComments | boolean | Include top 10 comments per story | false |
Output
Each story record includes:
id: Story IDtitle: Story titleurl: External URL (if applicable)hnUrl: Direct link to HN discussionauthor: Story author/submitterscore: Points/upvotescommentCount: Total comments on storytype: Item type (story, poll, etc.)time: Unix timestamptext: 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