Pricing
from $0.10 / 1,000 results
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
from $0.10 / 1,000 results
Rating
0.0
(0)
Developer
Actor stats
1
Bookmarked
60
Total users
21
Monthly active users
21 days 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
