Hacker News Scraper
Pricing
from $10.00 / 1,000 results
Go to Apify Store

Hacker News Scraper
A production-ready Apify Actor that scrapes Hacker News stories, comments, user profiles, and search results using the official Firebase API and Algolia HN Search API.
Pricing
from $10.00 / 1,000 results
Rating
0.0
(0)
Developer
Jamshaid Arif
Maintained by Community
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 days ago
Last modified
Categories
Share
🟧 Hacker News Scraper — Apify Actor (Python)
A production-ready Apify Actor that scrapes Hacker News stories, comments, user profiles, and search results using the official Firebase API and Algolia HN Search API.
Features
| Mode | Description |
|---|---|
| Top / New / Best | Scrape front-page, newest, or highest-voted stories |
| Ask HN / Show HN | Scrape community questions and project showcases |
| Jobs | Scrape HN job postings |
| User Profile | Scrape any user's karma, bio, and recent submissions |
| Search | Full-text search via Algolia (by relevance or date) |
| Comments | Optionally fetch top-level comments for each story |
Input Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
scrape_type | string | "top" | One of: top, new, best, ask, show, job, user, search |
max_items | integer | 30 | Max stories to scrape (1–500) |
include_comments | boolean | false | Fetch comments for each story |
max_comments_per_story | integer | 10 | Max top-level comments per story |
min_score | integer | 0 | Only include stories with ≥ this score |
username | string | "" | HN username (required for user mode) |
search_query | string | "" | Search query (required for search mode) |
search_sort | string | "relevance" | relevance or date |
Example Input
{"scrape_type": "top","max_items": 30,"include_comments": true,"max_comments_per_story": 5,"min_score": 50}
Output Format
Each story item in the dataset looks like:
{"id": 12345678,"rank": 1,"type": "story","title": "Show HN: My Cool Project","url": "https://example.com","hn_url": "https://news.ycombinator.com/item?id=12345678","score": 342,"author": "username","comments_count": 87,"created_at": "2026-04-04T10:30:00+00:00","time_ago": "3h ago","text": "","dead": false,"deleted": false,"scraped_at": "2026-04-04T14:00:00+00:00","comments": [{"id": 12345679,"story_id": 12345678,"type": "comment","author": "commenter","text": "Great project!","created_at": "2026-04-04T11:00:00+00:00","time_ago": "2h ago","parent": 12345678,"children": [12345680, 12345681],"dead": false,"deleted": false}]}
APIs Used
- HN Firebase API:
https://hacker-news.firebaseio.com/v0/— Official, no auth needed - Algolia HN Search:
https://hn.algolia.com/api/v1/— Full-text search, no auth needed
License
ISC