Hacker News Top Stories & Discussions Extractor
Pricing
from $0.70 / 1,000 item scrapeds
Go to Apify Store

Hacker News Top Stories & Discussions Extractor
Extract top stories, new submissions, Ask HN, and Show HN discussions with upvotes, author handles, timestamps, comments counts, and links using Firebase API.
Pricing
from $0.70 / 1,000 item scrapeds
Rating
0.0
(0)
Developer
LiteZero
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Share
📰 Hacker News Top Stories & Discussions Extractor
Extract trending tech stories, developer discussions, Ask HN, Show HN, and Job posts from Hacker News with full engagement metrics, author karma, and clean comment links.
🥊 Why This Actor Beats the Competition
| Feature | Fragile HTML Table Scrapers | Raw Firebase Polling | This Actor |
|---|---|---|---|
| Speed | 🐌 Slow table DOM parsing | ⚠️ Hundreds of individual HTTP requests | ⚡ Batch parallelized streaming |
| Stability | ❌ Breaks on layout changes | Prone to network drops | ✅ Official Algolia & Firebase dual backends |
| Cost | 💸 High compute hours | 💸 High request count | 💰 $1.00 per 1,000 stories (PPR) |
| Data Enrichment | ⚠️ Just title & URL | Raw IDs only | ✅ Score, comments count, domain & author |
🛠️ Step-by-Step: How to Use
Method 1: Apify Console
- Select category in Category (
top,new,best,ask,show). - Set Max Items limit (default:
50). - Click Start to extract stories.
Method 2: Python SDK
from apify_client import ApifyClientclient = ApifyClient("YOUR_APIFY_TOKEN")run = client.actor("litezero/hacker-news-scraper").call(run_input={"category": "top","maxItems": 30})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(f"[{item['score']} pts] {item['title']} ({item['numComments']} comments)")
📥 Input Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
category | String | No | "top" | Story category: top, new, best, ask, show |
maxItems | Integer | No | 50 | Maximum stories to extract |
📤 Output Data Dictionary
| Field | Type | Description |
|---|---|---|
id | Integer | Hacker News item ID |
title | String | Story title |
url | String | Target article URL |
hnUrl | String | Direct link to Hacker News discussion thread |
author | String | Submitter's Hacker News handle |
score | Integer | Community upvotes |
numComments | Integer | Number of comments |
domain | String | Source domain name |
createdAt | String | ISO 8601 publication timestamp |
scrapedAt | String | ISO 8601 scrape timestamp |
💡 Top Use Cases
- Tech Trend Scouting: Track emerging developer tools, AI breakthroughs, and YC startups.
- Newsletter Curation: Automated weekly digests of top Show HN projects.