Hacker News: scrapers and the official API, compared

Stories, comments, Ask HN and Show HN posts, job posts, scores and user profiles from Hacker News.

Short answer

Hacker News' official Hacker News API (Firebase) is public and free (no API key is required); start there for single lookups, and use a scraper when you need many storys in one run. For most Hacker News jobs, start with Hacker News Story, Comment & Karma Scraper: it covers 6 of 6 core fields (title, url, score, author and 2 more) at $0.99 per 1,000 results on Apify's Free plan. The top published score for Hacker News goes to Hacker News Scraper by constructive_calm (90 of 100), a Store tool from another publisher, listed for reference.

From published Store listings, output schemas and the official documentation. Checked 2026-10-30. How the ranking works.

Hacker News Story, Comment & Karma Scraper: inputs, code and costOpen in Apify Store

1 catalogue Actor 8 other Store tools Official API: Public API Lowest rate  $0.30 per 1K

Route map

Each line is one way to get Hacker News data; each stop is a field you probably need. Green lines are catalogue Actors, ranked by the published formula.

Route diagram for Hacker News dataHacker News Story, Comment & Karma Scraper: stops at 6 of the 10 fields shown; Other Store tools (6): stops at 10 of the 10 fields shown; Hacker News API (Firebase): public, field coverage not compared.Hacker NewstitleurlscoreauthorcreateddomainidtypehnUrlpoints1+API

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.

Catalogue Actors for Hacker News

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…

6/6 core fields 11 output fields $0.99 per 1K Open in Apify Store

Field matrix: who returns what

Every tool with a published output schema, against the 6 fields most Hacker News jobs need. A dot means the field name appears in the schema; rows can still leave it empty.

Which tools return each core Hacker News field, from published output schemas
TooltitleurlscoreauthorcreateddomainFields
Hacker News Story, Comment & Karma Scraper●●●●●●6/6
Hacker News ScraperReference only, by constructive_calm●●●–●●5/6
Hacker News ScraperReference only, by automation-lab●●–●●●5/6
Hacker News Data ScraperReference only, by shahidirfan●●●–––3/6
Hacker News Data ScraperReference only, by epctex●●––––2/6
Hacker News SearchReference only, by ryanclinton●●●●●–5/6
Hacker News ScraperReference only, by sian.agency●●●●●–5/6
Tools returning it775453

Field dictionary: the exact keys

The same core field has a different key in each Actor's output. Map these before you merge datasets; a dash means the published schema has no matching key. Need a field that is not listed here, such as email? Search every Hacker News Actor by field.

Output keys for each core Hacker News field in the top catalogue Actors
Core field Hacker News Story, Comment…
title title
url url
score score
author author
created createdAt
domain domain

All 9 tools, scored

Catalogue Actors link to their detail pages; the score (0 to 100) is the published formula, identical for every tool. Other Store tools follow in their own table, for reference. Price is the published primary-result rate per 1,000 (the Free-plan rate where the price is tiered; higher Apify plans pay less); start events and platform usage are excluded.

Catalogue Actors for Hacker News, ranked by the published method
Sample fields
85
Hacker News Story, Comment & Karma Scraper Catalogue Actor, pay per event
title, url, score 11 $0.99 13 runs, too few to rate Oct 2026

Other Store tools, for reference

Scored with the same published formula and listed for comparison only; this site does not link or recommend them.

Other Store tools for Hacker News, for reference
Sample fields
90
Hacker News Scraper Reference only, by constructive_calm
title, url, score 11 $0.40 99% of 222 runs Apr 2026
88
Hacker News Scraper Reference only, by automation-lab
title, url, author 11 $1.15 99% of 128 runs Sep 2026
80
Hacker News Data Scraper Reference only, by shahidirfan
title, url, score 11 $0.90 100% of 46 runs Aug 2026
79
Hacker News Data Scraper Reference only, by epctex
title, link, id 10 $0.30 95% of 98 runs Nov 2026
78
Hacker News Search Reference only, by ryanclinton
title, url, velocityScore 60 $5.00 100% of 479 runs Nov 2026
76
Hacker News Scraper Reference only, by gentle_cloud
No published schema – $0.20 100% of 966 runs Oct 2026
71
Hacker News Scraper Reference only, by sian.agency
storyTitle, url, score 23 $6.00 100% of 34 runs Sep 2026
55
Hacker News Scraper Reference only, by cryptosignals
No published schema – $5.00 100% of 31 runs Oct 2026

Official API route

Hacker News API (Firebase)

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.

Price. Free; no API key is required.

Limits. The documentation states there is currently no rate limit.

Official documentation

The Y Combinator terms prohibit scraping and data mining of the site without authorization; the published API is the documented route. This is general information, not legal advice.

Read Hacker News' terms. Keep to public data, do not bypass logins or access controls, and check whether personal data is involved before you collect it. The can-I-scrape checklist walks through it.

How to start

  1. Open Hacker News Story, Comment & Karma Scraper and start from its default input; its Actor page has the full example input and code.
  2. Set the Hacker News search, profile, listing or URL you need and a result limit; the required input is mode.
  3. Run it and export the dataset as JSON, CSV or Excel, or call it from the Apify API.

Call Hacker News Story, Comment & Karma Scraper from code

The example input uses the Actor's published defaults; set your own Hacker News query before you run it. You need an Apify API token.

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.

Questions people ask

What is the cheapest catalogue Actor for Hacker News data?

Hacker News Story, Comment & Karma Scraper lists $0.99 per 1,000 results (pay per event), with 11 fields in its published output schema. Start events and platform usage are billed separately. Checked 2026-10-30.

Which Hacker News scraper returns the most core fields?

Hacker News Story, Comment & Karma Scraper covers 6 of the 6 core Hacker News fields this page tracks (title, url, score, author, created, domain), based on its published output schema.

Does Hacker News have an official API?

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.

Is it legal to scrape Hacker News?

It depends on what you collect and how. The Y Combinator terms prohibit scraping and data mining of the site without authorization; the published API is the documented route. Read Hacker News' terms (https://www.ycombinator.com/legal) before you collect, and check whether personal data is involved. This is general information, not legal advice.

More on Hacker News

Sources

Data checked 2026-10-30
Cite this page

Scraper Finder. "How to get Hacker News data." https://scraperfinder.com/sites/hacker-news/ (data checked 2026-10-30).

Highest-scoring catalogue Actor

Hacker News Story, Comment & Karma Scraper: 6 of 6 core fields, $0.99 per 1,000 results, score 85. The highest score overall is 90 (Hacker News Scraper, a Store tool from another publisher); both are in the table above.

Open in Apify Store