Hacker News Scraper
Pricing
from $0.10 / 1,000 dataset items
Go to Apify Store
Hacker News Scraper
Scrape Hacker News stories and users via the HN Firebase API and Algolia search API. Supports search, top, new, best, and user modes.
Pricing
from $0.10 / 1,000 dataset items
Rating
0.0
(0)
Developer
Moeeze Hassan
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
Scrape Hacker News stories and users via the HN Firebase API and the Algolia HN search API. The actor supports five modes — search, top, new, best, and user — and returns structured story records ready for downstream analysis.
Features
- Search mode — keyword search via the Algolia HN search API
- Top / New / Best modes — fetch front-page story lists from the Firebase API
- User mode — retrieve a user's submitted stories
- Point and story-type filtering applied to all Firebase modes
Input Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
mode | string (enum) | ✅ | top | Scraping mode: search, top, new, best, or user. |
query | string | ❌ | "" | Search query (for search mode) or username (for user mode). |
numResults | integer | ❌ | 30 | Maximum number of results to return (1–500). |
minPoints | integer | ❌ | 0 | Only return stories with at least this many points (applied to story modes). |
storiesOnly | boolean | ❌ | true | If true, only return story items (excludes comments, polls, etc.). Applies to Firebase modes. |
Output Fields
Each pushed dataset item is a story record with the following fields:
| Field | Type | Description |
|---|---|---|
id | string | HN item ID. |
title | string | Story title. |
url | string | External story URL (empty for text/self posts). |
points | integer | Story score. |
author | string | Username of the submitter. |
date | string | Submission date (ISO-8601). |
commentsCount | integer | Number of comments. |
hnUrl | string | Direct link to the HN thread. |
type | string | Item type (typically story). |
Usage Example
Fetch the top 50 stories with at least 100 points
{"mode": "top","numResults": 50,"minPoints": 100,"storiesOnly": true}
Search Hacker News for "rust async"
{"mode": "search","query": "rust async","numResults": 30}
Get stories submitted by a specific user
{"mode": "user","query": "pg","numResults": 20}
Run via the Apify CLI
$apify run hacker-news-scraper --input '{"mode":"top","numResults":50,"minPoints":100}'
Data Sources
- Firebase API (
hacker-news.firebaseio.com) — used fortop,new,best, andusermodes. - Algolia Search API (
hn.algolia.com) — used forsearchmode.