# Hacker News Scraper: Front Page, Search & Who's Hiring Jobs (`tommyonebig/hacker-news-scraper`) Actor

Scrape Hacker News: front page and lists with rank, full-history keyword search with points and comment filters, and monthly 'Who is hiring?' threads parsed into structured job posts with salary and remote info.

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

## Pricing

from $5.00 / 1,000 stories

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 Scraper do?

**Hacker News Scraper** collects data from [Hacker News](https://news.ycombinator.com) (news.ycombinator.com) in three ways:

1. **Live lists with rank**: the front page (Top), New, Best, Ask HN, Show HN and YC startup Jobs
2. **Full-history search**: find every story about a keyword since 2007, filtered by points, comments and date
3. **"Who is hiring?" jobs**: the monthly *Ask HN: Who is hiring?* threads turned into **structured job posts**, with company, roles, locations, remote or on-site, salary, visa mentions, links and the full description

It uses the official Hacker News API and the Algolia HN Search API, so it's fast, reliable and doesn't need proxies.

### Why scrape Hacker News?

- **Tech trend and brand monitoring**: see when your product, competitors or a technology hit the front page, and how many points and comments they get.
- **Content and newsletter curation**: get the best stories of the day or week automatically.
- **Recruiting and job search**: export hundreds of startup job posts per month, filtered by skill, city, remote or visa.
- **Startup and sales research**: find Show HN and Launch HN launches, and companies that are hiring.
- **Research and AI datasets**: build datasets of headlines, links and engagement over time.

### How to use it

1. Pick one or more **lists** (for example Top), and/or enter **search queries**, and/or turn on **Who is hiring? job posts**.
2. Optionally set minimum points or comments, a date range, job keywords or remote-only.
3. Click **Start** and download the results as JSON, CSV, Excel or HTML, or use the API. Schedule it to run daily.

### Input examples

Today's front page:

```json
{ "lists": ["top"], "maxItemsPerSource": 30 }
```

Every popular story about Postgres in 2026:

```json
{ "searchQueries": ["postgres"], "minPoints": 100, "dateFrom": "2026-01-01" }
```

Remote Python jobs from the last three hiring threads:

```json
{ "whoIsHiring": true, "hiringMonths": 3, "jobKeywords": ["python"], "remoteOnly": true }
```

### Output examples

Story:

```json
{
  "type": "story",
  "storyId": 45512345,
  "title": "Show HN: An open-source tool for ...",
  "url": "https://example.com/project",
  "domain": "example.com",
  "hnUrl": "https://news.ycombinator.com/item?id=45512345",
  "points": 412,
  "commentCount": 187,
  "postedAt": "2026-10-07T14:03:11Z",
  "storyType": "show_hn",
  "list": "top",
  "rank": 3
}
```

Job post from *Who is hiring?*:

```json
{
  "type": "job",
  "company": "Acme Corp",
  "roles": ["Senior Backend Engineer"],
  "locations": ["Toronto, ON or REMOTE (Canada)"],
  "workplace": "remote",
  "remote": true,
  "salary": "$150k-$190k",
  "mentionsVisa": true,
  "links": ["https://acme.com/jobs"],
  "description": "Acme Corp | Senior Backend Engineer | ...",
  "postedAt": "2026-10-01T15:12:40Z",
  "hnUrl": "https://news.ycombinator.com/item?id=45400001",
  "threadTitle": "Ask HN: Who is hiring? (October 2026)"
}
```

The dataset has two ready-made views: **Stories** and **Who's hiring jobs**. Job fields come from the post's first line, as HN posters write it (`Company | Role | Location | ...`), so a few posts may have partial fields. The full description is always included.

### How much does it cost?

| Event | Price |
|---|---|
| Run start | $0.01 |
| Story | $0.005 (**$5 per 1,000 stories**) |
| Job post | $0.02 (**$20 per 1,000 job posts**) |

For example, the top 30 front-page stories every day for a month cost about $4.80, and a full monthly "Who is hiring?" thread (about 300 job posts) costs about $6. You can cap any run with Apify's **maximum cost per run** setting.

### FAQ

**Does it collect usernames or comments?**
No. It collects stories and job posts only, without usernames or comment threads.

**How far back can search go?**
To the beginning of Hacker News in 2007.

**Do I need an API key?**
No.

**Is it legal?**
It uses Hacker News' official public API and the Algolia HN Search API. You're responsible for using the data lawfully.

**Something isn't working?**
Open an issue on the **Issues** tab with your run link, and it'll usually be fixed within a few days.

# Actor input Schema

## `lists` (type: `array`):

Scrape the current front page and other live lists, with each story's rank.

## `searchQueries` (type: `array`):

Search all of Hacker News history (since 2007) for stories that match these keywords, e.g. <code>postgres</code> or <code>AI agents</code>.

## `searchType` (type: `string`):

Which kind of posts to search.

## `searchSort` (type: `string`):

Order of search results.

## `whoIsHiring` (type: `boolean`):

Parses the monthly 'Ask HN: Who is hiring?' threads into structured job posts: company, roles, location, remote, salary, visa, links and description.

## `hiringMonths` (type: `integer`):

1 = the latest monthly thread only.

## `jobKeywords` (type: `array`):

Keep only job posts mentioning any of these words, e.g. <code>python</code>, <code>Toronto</code>, <code>fintech</code>.

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

Keep only job posts that mention remote work in the headline.

## `maxItemsPerSource` (type: `integer`):

Upper limit per list, per search query and per hiring thread.

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

Only stories with at least this many points.

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

Only stories with at least this many comments.

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

Only items posted on or after this date.

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

Only items posted on or before this date.

## `textFormat` (type: `string`):

Format of story text (Ask HN etc.) and job descriptions.

## Actor input object example

```json
{
  "lists": [
    "top"
  ],
  "searchType": "story",
  "searchSort": "relevance",
  "whoIsHiring": false,
  "hiringMonths": 1,
  "remoteOnly": false,
  "maxItemsPerSource": 100,
  "minPoints": 0,
  "minComments": 0,
  "textFormat": "markdown"
}
```

# Actor output Schema

## `stories` (type: `string`):

No description

## `jobs` (type: `string`):

No description

## `all` (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 = {
    "lists": [
        "top"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tommyonebig/hacker-news-scraper").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 = { "lists": ["top"] }

# Run the Actor and wait for it to finish
run = client.actor("tommyonebig/hacker-news-scraper").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 '{
  "lists": [
    "top"
  ]
}' |
apify call tommyonebig/hacker-news-scraper --silent --output-dataset

```

## MCP server setup

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

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/DoJYgP0rJatebOLGL/builds/1qE5hYIfpvi5Fb9cM/openapi.json
