Hacker News Scraper
Pricing
Pay per usage
Go to Apify Store

Hacker News Scraper
Scrape Hacker News stories, comments, and user data. Supports top/new/best/ask/show/job story feeds and full-text keyword search via the Algolia API. Extract titles, URLs, scores, authors, comment counts, and timestamps.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Monkey Coder
Maintained by CommunityActor stats
1
Bookmarked
46
Total users
24
Monthly active users
2 months ago
Last modified
Categories
Share
π° Hacker News Scraper
Scrape stories, comments, and user data from Hacker News β the tech community's most popular link aggregator.
β¨ Features
- Multiple feed modes: Top, New, Best, Ask HN, Show HN, and Job stories
- Full-text search: Search stories by keyword via the Algolia HN Search API
- User submissions: Fetch all stories submitted by a specific user
- Optional comments: Include top-level comments for each story
- No authentication required: Uses the official HN Firebase API and Algolia HN Search API
π§ How It Works
- Select a mode (top, new, best, ask, show, job, search, or user)
- For search mode, provide a keyword query
- For user mode, provide a HN username
- Set the max results limit
- Optionally enable top comments fetching (slower but richer data)
π Input Parameters
| Parameter | Type | Description |
|---|---|---|
mode | Select | Feed type: top, new, best, ask, show, job, search, or user |
query | String | Search keyword (search mode only) |
username | String | HN username (user mode only) |
search_sort | Select | Sort by relevance or date (search mode only) |
max_results | Integer | Maximum stories to return (1β500) |
include_comments | Boolean | Fetch top-level comments per story |
request_timeout | Integer | HTTP timeout in seconds |
π¦ Sample Output
{"id": 12345678,"title": "Show HN: I built an open-source AI tool","url": "https://github.com/example/project","score": 342,"author": "johndoe","num_comments": 87,"created_at": "2026-03-23T10:30:00+00:00","type": "story","text": "","hn_url": "https://news.ycombinator.com/item?id=12345678","top_comments": [{"id": 12345679,"author": "janedoe","text": "This is amazing! I've been looking for something like this.","created_at": "2026-03-23T10:45:00+00:00"}],"fetched_at": "2026-03-23T12:00:00+00:00"}
π Modes
| Mode | Description | Source |
|---|---|---|
top | Current front-page stories ranked by score | Firebase API |
new | Most recently submitted stories | Firebase API |
best | Highest-voted stories of all time | Firebase API |
ask | "Ask HN" discussion threads | Firebase API |
show | "Show HN" project showcases | Firebase API |
job | YC startup job postings | Firebase API |
search | Full-text keyword search across all stories | Algolia API |
user | All stories submitted by a specific user | Firebase API |
β‘ Performance Notes
- Feed modes (top/new/best/ask/show/job): Each story requires a separate API call. 100 stories β 15β30 seconds.
- Search mode: Uses Algolia's batch API, much faster. 100 results β 2β5 seconds.
- With comments enabled: Adds ~5 extra API calls per story. Expect 2β3Γ longer run times.
- Rate limits: Both APIs are generous but the Actor includes retry logic for 429 responses.
π Data Sources
- Hacker News Firebase API β Official real-time data
- Algolia HN Search API β Full-text search index