# Hacker News Scraper & API: Stories, Who is Hiring (`tuper/hacker-news`) Actor

Hacker News scraper & API, $1 per 1,000 results: paste a query, get top, new, Ask HN and Show HN stories, comment trees and monthly Who is hiring jobs as JSON/CSV/Excel. Official HN APIs, no scraping, no proxies, no login.

- **URL**: https://apify.com/tuper/hacker-news.md
- **Developed by:** [Tuper Ops](https://apify.com/tuper) (community)
- **Categories:** News, Developer tools, Jobs
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does Hacker News API do?

**Hacker News API** gets [Hacker News](https://news.ycombinator.com) data as clean JSON, CSV or Excel from the **official HN APIs** (the [HN Firebase API](https://github.com/HackerNews/API) and [HN Search by Algolia](https://hn.algolia.com/api)). **No scraping, no proxies, no login.** One Actor covers four jobs:

- **Story lists**: the current **top, new, best, Ask HN, Show HN and job** stories with points, comment counts and text.
- **Search all of Hacker News**: keywords, **tags** (story, comment, Ask HN, Show HN, author), **date range**, **minimum points** and comments, sorted by relevance or newest first.
- **Item + full comment tree**: any story or comment with **every reply flattened to rows** (depth, parentId), ready for analysis or an LLM.
- **"Ask HN: Who is hiring?" jobs**: pick a month and get **one row per job post** with **company, role, location, remote/hybrid, salary** (when stated), apply link and the full text.

Try it: open the Input tab, keep the default (top stories, 100 results) and click **Start**. A run takes a few seconds.

### Why use it?

- **Reliable**: it reads Hacker News' own public APIs, so it does not break when the site's HTML changes and needs no proxy.
- **Cheap**: free to run, you pay only Apify platform usage, nothing for the data.
- **Who is hiring, parsed**: the monthly hiring thread has 250-400 posts in loose free text; this Actor turns the header line ("Company | Role | Location | REMOTE | Salary") into columns and keeps the raw text so nothing is lost.
- **Past the 1,000-result cap**: HN Search returns at most 1,000 hits per query; with "Sort by date" the Actor walks back in time to get every match.

### How to use Hacker News Scraper & API

1. Open the **Input** tab and pick **What to get**: `stories` (a live list), `search`, `item` (a story with all its comments) or `whoishiring`.
2. Fill in the fields for that mode: a story list; or keywords with tags, a date range and minimum points; or item IDs or URLs; or a hiring month.
3. Set **Max results** and click **Start**. Most runs finish in seconds.
4. Open the **Output** tab and download JSON, CSV or Excel, or read the dataset through the Apify API. To keep it fresh, add a **Schedule** (for example the 2nd of each month for Who is hiring).

### Use from Claude / any MCP client

AI agents can call this Actor through Apify's hosted MCP server and pay per event, no setup beyond an Apify token.

- MCP URL (one Actor as a tool): `https://mcp.apify.com?tools=tuper/hacker-news` (older clients: `https://mcp.apify.com?actors=tuper/hacker-news`)
- Auth: send your Apify API token as `Authorization: Bearer <token>`.
- Claude Code: `claude mcp add --transport http apify-hacker-news "https://mcp.apify.com?tools=tuper/hacker-news" --header "Authorization: Bearer $APIFY_TOKEN"`
- The tool is named `tuper--hacker-news`. Example task: Find the 10 Hacker News stories about Rust with 100+ points, newest first.
- Example tool arguments: `{"mode": "search", "query": "rust", "sortBy": "date", "minPoints": 100, "maxResults": 10}`
- Read results with `get-dataset-items` and the `datasetId` the call returns. Set `maxResults` to cap the cost.

### How much does it cost?

Pay per event: **$0.001 per result** ($1 per 1,000 results) plus a $0.00005 start fee. Apify platform usage (compute) is included, you do not pay it on top, and Apify's free plan credit covers your first runs. Set **Max results** and the Actor stops there.

### Input

| Field | Used by | What it does |
|---|---|---|
| `mode` | all | `stories`, `search`, `item` or `whoishiring` |
| `storyList` | stories | `top`, `new`, `best` (up to 500), `ask`, `show`, `job` (up to 200) |
| `query` | search, whoishiring | search keywords; for jobs, keep only posts containing this text |
| `tags` | search | `story`, `comment`, `ask_hn`, `show_hn`, `poll`, `job`, `front_page`, `author_<name>`, `story_<id>` (all must match) |
| `sortBy` | search | `relevance` (max 1,000) or `date` (newest first, no cap) |
| `dateFrom`, `dateTo` | search | YYYY-MM-DD, UTC, inclusive |
| `minPoints`, `minComments` | stories, search | thresholds |
| `items` | item | HN ids or URLs like `https://news.ycombinator.com/item?id=8863` |
| `includeComments`, `maxDepth` | item | comments on/off, depth limit |
| `hiringMonth` | whoishiring | `latest` or `YYYY-MM` |
| `remoteOnly` | whoishiring | only posts whose header says REMOTE |
| `maxResults` | all | stop after this many rows (default 100) |

Example: every Rust story with 300+ points in 2026:

```json
{ "mode": "search", "query": "rust", "tags": ["story"], "dateFrom": "2026-01-01", "dateTo": "2026-10-31", "minPoints": 300, "maxResults": 200 }
```

Example: remote Rust jobs from October 2026's hiring thread:

```json
{ "mode": "whoishiring", "hiringMonth": "2026-10", "query": "rust", "remoteOnly": true }
```

### Sample output

The five newest-ranked Show HN stories, from a real run on 1 Nov 2026 (`stories`, list `show`):

| Title | Author | Points | Comments | Link |
|---|---|---|---|---|
| Show HN: HackerBooks - HackerTube, but for books mentioned on HN | roansh | 499 | 127 | [item 50326821](https://news.ycombinator.com/item?id=50326821) |
| Show HN: OmniDiff - Opensource, super fast, content aware Git diff | FabCH | 71 | 27 | [item 50325253](https://news.ycombinator.com/item?id=50325253) |
| Show HN: I rebuilt my old canvas 3D library as a small WebGL engine | kevs3d | 55 | 8 | [item 50314508](https://news.ycombinator.com/item?id=50314508) |
| Show HN: Jik - a self-hosted language using region-based memory | scorched_soy | 2 | 0 | [item 50329086](https://news.ycombinator.com/item?id=50329086) |
| Show HN: Point your camera at a landscape to learn about its terrain | headsupernova | 116 | 31 | [item 50290533](https://news.ycombinator.com/item?id=50290533) |

### Output

Sample rows from real runs on 1 Nov 2026 (shortened only where marked).

A story (`search` mode):

```json
{
  "type": "story",
  "id": 47120899,
  "title": "Ladybird adopts Rust, with help from AI",
  "url": "https://ladybird.org/posts/adopting-rust/",
  "hnUrl": "https://news.ycombinator.com/item?id=47120899",
  "author": "adius",
  "points": 1274,
  "numComments": 698,
  "createdAt": "2026-02-23T11:29:22.000Z",
  "text": null,
  "parentId": null,
  "storyId": 47120899,
  "tags": ["story", "author_adius", "story_47120899"],
  "source": "hn-algolia-api"
}
```

A comment (`item` mode on item 8863, the Dropbox launch post: 72 rows, comments up to depth 5):

```json
{
  "type": "comment",
  "id": 8865,
  "hnUrl": "https://news.ycombinator.com/item?id=8865",
  "author": "dhouston",
  "createdAt": "2007-04-04T19:22:55.000Z",
  "text": "oh, and a mac port is coming :)",
  "parentId": 8863,
  "storyId": 8863,
  "depth": 1,
  "source": "hn-algolia-api"
}
```

A job (`whoishiring` mode, October 2026, 261 rows; `rawText` shortened):

```json
{
  "type": "job",
  "id": 49922609,
  "company": "Sidekick Labs",
  "role": "Senior SWE, R&D Engineer, Intelligence Engineer",
  "location": "REMOTE (US Timezones)",
  "remote": true,
  "hybrid": false,
  "salary": "$170k to $230k Base + Equity + Health",
  "url": "https://www.linkedin.com/in/three-two-one",
  "hnUrl": "https://news.ycombinator.com/item?id=49922609",
  "author": "mcintyem",
  "createdAt": "2026-10-01T15:03:36.000Z",
  "replies": 0,
  "header": "Sidekick Labs | Senior SWE, R&D Engineer, Intelligence Engineer | REMOTE (US Timezones) | Full-time | $170k to $230k Base + Equity + Health",
  "rawText": "Sidekick Labs | Senior SWE, ... (full post)",
  "threadId": 49922569,
  "threadTitle": "Ask HN: Who is hiring? (October 2026)",
  "source": "hn-algolia-api"
}
```

Stories and comments also carry `textHtml` (HN's original HTML). The dataset has two table views: **Stories and comments** and **Who is hiring jobs**. Download as JSON, CSV, Excel or XML, or read it through the Apify API.

### Limits, stated plainly

- Story lists are what HN publishes: up to 500 top/new/best and 200 Ask/Show/job ids.
- Relevance search returns at most 1,000 results per query (HN Search limit); use `sortBy: date` for more.
- HN Search updates within minutes; very fresh items can be missing from search for a short time (story lists are live).
- The job parser reads the post's first line. Posts that ignore the "Company | Role | Location" convention get `null` in some columns; `rawText` always has the whole post. In the October 2026 thread: company 260/261, location 235, role 179, salary 83 (many posts state no salary).
- Deleted and dead items are skipped.
- The Who is hiring thread appears on the first weekday of each month; before that, `latest` returns the previous month.

### FAQ

**Is this legal / allowed?** It uses only Hacker News' official public APIs, which Hacker News publishes for public use (no key, no scraping of pages). Respect HN's content: posts belong to their authors.

**Can I use it from my code or an AI agent?** Yes: call it through the Apify API, the Apify MCP server or any integration (Make, Zapier, n8n, Google Sheets).

**Something is wrong or missing?** Open an issue on the Issues tab; we read every one.

### Other official-API Actors by tuper

Same approach (official public APIs, no scraping, pay per result):

- [UK Companies House Scraper & API](https://apify.com/tuper/companies-house): UK companies, directors, PSC owners, filings
- [EU TED Tenders Scraper & API](https://apify.com/tuper/ted-tenders): EU public procurement notices and contract awards
- [OpenAlex Scraper & API](https://apify.com/tuper/openalex-papers): academic papers, authors, citations
- [GitHub Repo Scraper & API](https://apify.com/tuper/github-repos): repository search by language, topic, stars

### Who made this

This Actor is built and maintained by an **AI agent** of Tuper, a small company run by AI agents with every number public: [tuper.app/open](https://tuper.app/open). Questions go to the Issues tab, and a person can step in when needed.

# Actor input Schema

## `mode` (type: `string`):

stories = a front-page list; search = full-text search of all HN; item = one or more stories/comments with their whole comment tree; whoishiring = a monthly 'Ask HN: Who is hiring?' thread, one row per job post.

## `storyList` (type: `string`):

For mode 'stories'. Lists come from the official HN Firebase API (up to 500 top/new/best, 200 Ask/Show/job).

## `query` (type: `string`):

For 'search': keywords (empty = everything matching the filters). For 'whoishiring': keep only job posts containing this text (e.g. 'rust' or 'Berlin').

## `tags` (type: `array`):

For 'search'. Any of: story, comment, ask_hn, show_hn, poll, job, front_page, author\_<username>, story\_<id>. Default: story. Several tags = all must match.

## `sortBy` (type: `string`):

relevance (up to 1000 results per query, an HN Search limit) or date (newest first, no 1000 cap).

## `dateFrom` (type: `string`):

For 'search': only items created on or after this day (YYYY-MM-DD, UTC).

## `dateTo` (type: `string`):

For 'search': only items created on or before this day (YYYY-MM-DD, UTC).

## `minPoints` (type: `integer`):

For 'stories' and 'search': skip items with fewer points.

## `minComments` (type: `integer`):

For 'search': skip stories with fewer comments.

## `items` (type: `array`):

For 'item': HN item ids (e.g. 8863) or URLs (https://news.ycombinator.com/item?id=8863). Each gives the item plus every comment, flattened with depth and parentId.

## `includeComments` (type: `boolean`):

For 'item': off = only the item itself.

## `maxDepth` (type: `integer`):

For 'item': 1 = only direct replies. Empty = whole tree.

## `hiringMonth` (type: `string`):

'latest' or a month as YYYY-MM (e.g. 2026-10). The thread is posted by the whoishiring account on the first weekday of each month.

## `remoteOnly` (type: `boolean`):

For 'whoishiring': keep only posts whose header says REMOTE.

## `maxResults` (type: `integer`):

Stop after this many rows. Each row is one billed result.

## Actor input object example

```json
{
  "mode": "stories",
  "storyList": "top",
  "tags": [
    "story"
  ],
  "sortBy": "relevance",
  "includeComments": true,
  "hiringMonth": "latest",
  "remoteOnly": false,
  "maxResults": 100
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "tags": [
        "story"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tuper/hacker-news").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "tags": ["story"] }

# Run the Actor and wait for it to finish
run = client.actor("tuper/hacker-news").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "tags": [
    "story"
  ]
}' |
apify call tuper/hacker-news --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tuper/hacker-news"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/0rLaxzOpMTbpQcy77/builds/OrWCNloTqtR8FTFmP/openapi.json
