Hacker News Top Stories & Discussions Extractor avatar

Hacker News Top Stories & Discussions Extractor

Pricing

from $0.70 / 1,000 item scrapeds

Go to Apify Store
Hacker News Top Stories & Discussions Extractor

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

LiteZero

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

6 days ago

Last modified

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

FeatureFragile HTML Table ScrapersRaw Firebase PollingThis Actor
Speed🐌 Slow table DOM parsing⚠️ Hundreds of individual HTTP requests⚡ Batch parallelized streaming
Stability❌ Breaks on layout changesProne 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 & URLRaw IDs only✅ Score, comments count, domain & author

🛠️ Step-by-Step: How to Use

Method 1: Apify Console

  1. Select category in Category (top, new, best, ask, show).
  2. Set Max Items limit (default: 50).
  3. Click Start to extract stories.

Method 2: Python SDK

from apify_client import ApifyClient
client = 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

FieldTypeRequiredDefaultDescription
categoryStringNo"top"Story category: top, new, best, ask, show
maxItemsIntegerNo50Maximum stories to extract

📤 Output Data Dictionary

FieldTypeDescription
idIntegerHacker News item ID
titleStringStory title
urlStringTarget article URL
hnUrlStringDirect link to Hacker News discussion thread
authorStringSubmitter's Hacker News handle
scoreIntegerCommunity upvotes
numCommentsIntegerNumber of comments
domainStringSource domain name
createdAtStringISO 8601 publication timestamp
scrapedAtStringISO 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.