Hacker News Story, Comment & Karma Scraper
Pull Hacker News front-page, newest, best, Ask HN, Show HN, or job stories, look up specific items or user profiles, or run a full-text search across HN history. Filter by score, domain, date range, and comment count or author.
Open in Apify Store$0.99 / 1K on Free
Short answer
Hacker News Story, Comment & Karma Scraper is an Apify Store Actor for Hacker News data that returns 11 published output fields, including title, url, score, author. It lists $0.99 per 1,000 results on the Free plan (pay per event), $0.49 on the Business plan. It takes 31 input settings; one is required (mode). It covers 6 of the 6 core Hacker News fields this site tracks. Last updated Oct 30, 2026.
From the public Store listing and published build schema, synced 2026-11-12.What it returns
11 fields from the published dataset schema. Export as JSON, CSV or Excel, or read the dataset through the Apify API.
recordTypetitlecompanyroleurlscoreauthornumCommentscreatedAtdomainfrontPageDate
Input
| Setting | Type | Required | Default | What it does |
|---|---|---|---|---|
| mode | string | Yes | topStories | What to scrape. Feeds walk the live Hacker News lists. `item` looks up specific IDs, `user` loads profiles, `search` queries Hacker News history, `frontPage` reads a historical day, and `whoIsHiring` parses monthly hiring threads. |
| itemIds | array | No | [] | Hacker News item IDs to look up, as numbers or numeric strings. Stories, comments, jobs, polls, and poll options are all accepted. |
| usernames | array | No | [] | Hacker News usernames whose profiles and, optionally, submissions you want. |
| searchQueries | array | No | [] | One or more keyword queries. Every query runs independently and the results are merged without duplicates. Leave empty to browse by tags, author, or story instead. |
| searchSort | string | No | relevance | `relevance` ranks by keyword match. `date` returns newest first and is more reproducible. |
| contentTypes | array | No | ["story"] | Which Hacker News record types search should return. Selecting several types returns any of them. `front_page` covers only the current front page. |
| author | string | No | – | Only return content written by this Hacker News username. |
| storyId | string | No | – | Only return content attached to this story ID. Useful with `contentTypes` set to `comment` to search inside one thread. |
| exhaustiveSearch | boolean | No | false | Hacker News search exposes at most 1,000 hits per query. When enabled, the actor splits the requested date range into smaller windows so deeper result sets can be collected. Relevance order then follows each date window rather than one global ranking. |
| dateRangeFrom | string | No | – | Drop items posted before this date (UTC, `YYYY-MM-DD`). Empty means no lower bound. |
Show the other 21 settings
| Setting | Type | Required | Default | What it does |
|---|---|---|---|---|
| dateRangeTo | string | No | – | Drop items posted after this date (UTC, `YYYY-MM-DD`). Empty means no upper bound. |
| minScore | integer | No | – | Drop stories, jobs, and polls below this point score. Comments are unaffected because Hacker News does not publish comment scores. |
| minCommentCount | integer | No | – | Drop stories and polls with fewer than this many comments. |
| domainAllowlist | array | No | [] | Keep only stories whose link host contains one of these text fragments. For example, `github.com` or `arxiv.org`. |
| domainBlocklist | array | No | [] | Drop stories whose link host contains one of these text fragments. For example, `twitter.com` or `x.com`. |
| excludeDeadOrDeleted | boolean | No | true | Drop items marked dead or deleted by Hacker News. Turning this off uses the slower exact comment path so those records can be included. |
| commentAuthorFilter | array | No | [] | Only keep comments written by these usernames. Matching is case-insensitive and accepts partial names. |
| commentSort | string | No | rank | `rank` keeps Hacker News display order. `newest` orders sibling replies newest first. |
| maxComments | integer | No | 0 | How many comments to collect for each story. 0 skips comment collection. This is applied after a story passes your filters. |
| maxDepth | integer | No | 5 | Deepest reply level to keep when comments are collected. Root comments are depth 0. |
| enableCommentHierarchy | boolean | No | false | When true, each story carries a nested `comments` tree. When false, comments are separate rows and never contain duplicate reply rows. |
| includeSubmissions | boolean | No | false | For mode `user`, also emit the user's recent stories and comments as normal records after the profile. |
| submissionTypes | string | No | all | Which submissions to emit when `includeSubmissions` is enabled. |
| frontPageDate | string | No | – | Historical day to read in mode `frontPage`, as `YYYY-MM-DD`. Empty uses yesterday (UTC). |
| hiringMonths | integer | No | 1 | How many recent monthly Who is hiring? threads to parse. Ignored when specific thread IDs are supplied. |
| hiringThreadIds | array | No | [] | Specific Who is hiring? thread IDs to parse. Overrides the automatic monthly selection. |
| hiringKeywords | array | No | [] | Keep only job posts whose text, company, role, location, or tech stack contains one of these terms. |
| remoteOnly | boolean | No | false | Keep only hiring posts that explicitly mention remote work. |
| maxItems | integer | No | 50 | Hard cap on emitted records across all types. Nested comments also count toward this cap. |
| includeAuthorProfiles | boolean | No | false | Add `authorKarma` and `authorCreatedAt` to stories and comments. This costs one extra lookup per unique author. |
| startUrls | array | No | [] | Hacker News links to read directly: item, user, historical front-page, and hiring-thread URLs. IDs and URLs are merged with the mode-specific lists. |
Example input
Built from the input form's published example values and defaults.
{
"mode": "topStories",
"itemIds": [],
"usernames": [],
"searchQueries": [],
"searchSort": "relevance",
"contentTypes": [
"story"
],
"exhaustiveSearch": false,
"domainAllowlist": [],
"domainBlocklist": [],
"excludeDeadOrDeleted": true,
"commentAuthorFilter": [],
"commentSort": "rank",
"maxComments": 0,
"maxDepth": 5,
"enableCommentHierarchy": false,
"includeSubmissions": false,
"submissionTypes": "all",
"hiringMonths": 1,
"hiringThreadIds": [],
"hiringKeywords": [],
"remoteOnly": false,
"maxItems": 20,
"includeAuthorProfiles": false,
"startUrls": []
} Run it from code or an AI agent
The same run through the Apify API, with the example input. You need an Apify API token; the run is billed to your account at the Store price.
Python
from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run_input = {
"mode": "topStories",
"itemIds": [],
"usernames": [],
"searchQueries": [],
"searchSort": "relevance",
"contentTypes": [
"story"
],
"exhaustiveSearch": False,
"domainAllowlist": [],
"domainBlocklist": [],
"excludeDeadOrDeleted": True,
"commentAuthorFilter": [],
"commentSort": "rank",
"maxComments": 0,
"maxDepth": 5,
"enableCommentHierarchy": False,
"includeSubmissions": False,
"submissionTypes": "all",
"hiringMonths": 1,
"hiringThreadIds": [],
"hiringKeywords": [],
"remoteOnly": False,
"maxItems": 20,
"includeAuthorProfiles": False,
"startUrls": []
}
run = client.actor("dataspryva/hacker-news-story-comment-and-karma-scraper").call(run_input=run_input)
if run is None:
raise RuntimeError("The Actor run was not found.")
for item in client.dataset(run.default_dataset_id).iterate_items():
print(item) pip install apify-client
JavaScript
import { ApifyClient } from "apify-client";
const client = new ApifyClient({ token: "<YOUR_APIFY_TOKEN>" });
const input = {
"mode": "topStories",
"itemIds": [],
"usernames": [],
"searchQueries": [],
"searchSort": "relevance",
"contentTypes": [
"story"
],
"exhaustiveSearch": false,
"domainAllowlist": [],
"domainBlocklist": [],
"excludeDeadOrDeleted": true,
"commentAuthorFilter": [],
"commentSort": "rank",
"maxComments": 0,
"maxDepth": 5,
"enableCommentHierarchy": false,
"includeSubmissions": false,
"submissionTypes": "all",
"hiringMonths": 1,
"hiringThreadIds": [],
"hiringKeywords": [],
"remoteOnly": false,
"maxItems": 20,
"includeAuthorProfiles": false,
"startUrls": []
};
const run = await client.actor("dataspryva/hacker-news-story-comment-and-karma-scraper").call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items); npm install apify-client
cURL
curl -X POST "https://api.apify.com/v2/actors/dataspryva~hacker-news-story-comment-and-karma-scraper/run-sync-get-dataset-items" -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" -d '{"mode":"topStories","itemIds":[],"usernames":[],"searchQueries":[],"searchSort":"relevance","contentTypes":["story"],"exhaustiveSearch":false,"domainAllowlist":[],"domainBlocklist":[],"excludeDeadOrDeleted":true,"commentAuthorFilter":[],"commentSort":"rank","maxComments":0,"maxDepth":5,"enableCommentHierarchy":false,"includeSubmissions":false,"submissionTypes":"all","hiringMonths":1,"hiringThreadIds":[],"hiringKeywords":[],"remoteOnly":false,"maxItems":20,"includeAuthorProfiles":false,"startUrls":[]}' Waits for the run and returns the dataset items (runs over 300 seconds return HTTP 408; start an async run instead).
MCP (AI agents)
{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=dataspryva/hacker-news-story-comment-and-karma-scraper",
"headers": {
"Authorization": "Bearer <YOUR_APIFY_TOKEN>"
}
}
}
} Adds this Actor as a tool in an MCP client that takes a remote server URL (Cursor, VS Code, Claude Code) through Apify's hosted MCP server. OAuth sign-in also works without the header. Clients that only start local servers can wrap the URL with npx mcp-remote.
What a run costs
The result rate falls on higher Apify plans. Each figure is the published per-result rate times the number of results.
| Apify plan | Per 1,000 | 10,000 results | 100,000 results |
|---|---|---|---|
| Free plan | $0.99 | $9.90 | $99 |
| Starter plan | $0.82 | $8.20 | $82 |
| Scale plan | $0.66 | $6.60 | $66 |
| Business plan | $0.49 | $4.90 | $49 |
- Every run also has a start event, charged per GB of memory (minimum one): $0.10 on Free, $0.03 on Business. At its default memory of 4 GB a run starts at $0.40 on Free. Fewer, larger runs keep this small.
- The Free plan includes $5 of monthly usage (Apify pricing, checked 2026-11-11); at the Free rate that covers at most about 5,050 results, less start events and platform usage.
- Worked example: 10,000 results in one run on the Free plan cost $10.30 ($9.90 for results + $0.40 start), plus Apify platform usage (compute), billed separately by Apify.
- Pay per event. Platform usage (compute) is billed by Apify on top of the event prices. Compare other tools in the cost estimator.
Where it fits among Hacker News routes
It ranks 1 of 1 catalogue Actors for Hacker News on the published formula (fields, price, reliability, freshness). Its line is highlighted on the map.
- 1 Hacker News Story, Comment & Karma Scraper 11 output fields, pay per event 6 of 6 core fields
$0.99 / 1K - + 6 other Store tools, combined Reference only 6 of 6 core fields
from $0.30 / 1K - API Hacker News API (Firebase) Public API fields not compared
Stops are fields. A ring means the field is in that route's published output schema; no ring means the line passes without it. Bold labels are the core fields for this website, the rest are fields that differ between routes. A white capsule means every data line stops there. The red line is the official API; its field coverage is not compared. A crossed red line means there is no open official API.
Official route: Hacker News API (Firebase)
Public API. Y Combinator publishes a read-only Hacker News API on Firebase at hacker-news.firebaseio.com/v0 with items (stories, comments, jobs, polls), user profiles and top, new, best, Ask, Show and job story lists.
Free; no API key is required.
Other Store tools for Hacker News
Reference only, from their public listings.
| Tool | Fields | Price / 1K |
|---|---|---|
| Hacker News Scraper | 11 | $0.40 |
| Hacker News Scraper | 11 | $1.15 |
| Hacker News Data Scraper | 11 | $0.90 |
| Hacker News Data Scraper | 10 | $0.30 |
| Hacker News Search | 60 | $5.00 |
What people use it for
- find stories and discussions
- search historical posts
- review hiring posts
Similar Actors
Snapchat Creator Profile & Highlights Extractor
Turn Snapchat usernames into structured profile records with bio, subscriber count, verification status, story highlights, Spotlight videos, AR…
LinkedIn Profile Engagement Timeline Scraper
Pull a LinkedIn profile's posts, reposts, comments, and reactions in one run, with the original post's author, text, and link attached to each…
LinkedIn Profile Feed Scraper with Likers & Commenters
Pull posts from a LinkedIn profile's activity feed or a direct post URL, with engagement counts, hashtags, media, and optionally the people who…
LinkedIn Trending Posts & Top Voices Feed Scraper
Pull LinkedIn's trending and top-performing posts by topic keyword, with reaction/comment/repost counts, a per-reaction-type breakdown, author…
Pinterest Pin Comments & Activity Extractor
Pull public comments, replies, reactions, and Tried It activity for one or more Pinterest Pins, along with each Pin's title, creator, board, and…
Pinterest Pins, Profiles and Boards Collector with Filters
Collect public Pinterest Pins, profiles, boards, search results and comments by keyword or URL, with filters for saves, creator followers,…
Questions people ask
How much does Hacker News Story, Comment & Karma Scraper cost?
The published result rate depends on your Apify plan: $0.99 per 1,000 on Free, $0.82 per 1,000 on Starter, $0.66 per 1,000 on Scale, $0.49 per 1,000 on Business. So 10,000 results cost about $9.90 on the Free plan and $4.90 on Business, plus a start fee of $0.10 per run per GB of memory on Free. Platform usage is billed separately.
What data does Hacker News Story, Comment & Karma Scraper return?
Its published output schema lists 11 fields: recordType, title, company, role, url, score, author, numComments, createdAt, domain, frontPageDate. A listed field is not guaranteed to be filled in every row.
What input does Hacker News Story, Comment & Karma Scraper need?
Required: mode. Optional settings include itemIds, usernames, searchQueries, searchSort, contentTypes, author.
How do I run Hacker News Story, Comment & Karma Scraper from Python or the API?
Use the Apify API client: in Python, ApifyClient(token).actor("dataspryva/hacker-news-story-comment-and-karma-scraper").call(run_input=...), then read the run's default dataset (run.default_dataset_id); in JavaScript the same call is client.actor("dataspryva/hacker-news-story-comment-and-karma-scraper").call(input). Without a client, POST the input JSON to https://api.apify.com/v2/actors/dataspryva~hacker-news-story-comment-and-karma-scraper/run-sync-get-dataset-items with your API token. Ready-to-paste code with the example input is on this page.
Sources
- Hacker News Story, Comment & Karma Scraper on Apify Store
- Published build with input and output schema (JSON)
- Hacker News API (Firebase) documentation
Cite this page
Scraper Finder. "Hacker News Story, Comment & Karma Scraper." https://scraperfinder.com/catalogue/hacker-news-story-comment-and-karma-scraper/ (data checked 2026-11-12).
Run Hacker News Story, Comment & Karma Scraper
$0.99 per 1,000 results. Paste the example input above, set your Hacker News query, then export the dataset. Still choosing? Compare every Hacker News route.