# Hacker News Scraper - Search, Comments & Who's Hiring Jobs (`alex9080/hacker-news-scraper`) Actor

Hacker News stories, comments and jobs: keyword search over the full archive, several queries per run, with points, date and author filters; front page, new, best, Ask and Show HN; comment threads; the monthly 'Who is hiring?' thread parsed into jobs with company, role, location, remote and salary.

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

## Pricing

from $0.30 / 1,000 story or comments

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

### Hacker News Scraper

Everything from Hacker News in one Actor:

- **Search** the whole archive of stories and comments by keyword, with filters for points, comments, author and date.
- **Lists**: front page, new, best, Ask HN, Show HN and YC jobs, with their current rank.
- **Comment threads**: every comment of a story with depth and parent, ready for sentiment analysis or LLM summaries.
- **Who is hiring? jobs**: the monthly "Ask HN: Who is hiring?" thread parsed into structured jobs: **company, roles, location, remote/onsite/hybrid, salary, employment type, visa, emails and links**. Filter by keywords and remote only.

Use it for tech trend research, brand and launch monitoring, lead generation from Show HN, building datasets, or finding remote jobs at startups.

#### Output examples

Story (search or lists):

```json
{"type": "story", "rank": 3, "id": 49921234, "title": "Show HN: ...", "url": "https://example.com", "hnUrl": "https://news.ycombinator.com/item?id=49921234", "author": "pg", "points": 412, "comments": 187, "date": "2026-10-02T14:11:05+00:00"}
```

Job (Who is hiring):

```json
{
  "type": "job",
  "thread": "Ask HN: Who is hiring? (October 2026)",
  "company": "Sidekick Labs",
  "roles": "Senior SWE, R&D Engineer, Intelligence Engineer",
  "location": "REMOTE (US Timezones)",
  "remote": true,
  "salary": "$170k to $230k",
  "employmentType": "full-time",
  "emails": ["jobs@example.com"],
  "headline": "Sidekick Labs | Senior SWE, R&D Engineer ... | REMOTE (US Timezones) | Full-time | $170k to $230k Base + Equity",
  "hnUrl": "https://news.ycombinator.com/item?id=49922600"
}
```

#### Input examples

Search: `{"mode": "search", "queries": ["web scraping", "llm agents"], "types": ["story"], "minPoints": 50, "since": "2026-01-01"}`

Front page: `{"mode": "front_page", "maxItems": 30}`

Comments: `{"mode": "comments", "storyIds": ["https://news.ycombinator.com/item?id=49922569"]}`

Remote Python jobs: `{"mode": "whos_hiring", "keywords": ["python"], "remoteOnly": true}`

#### Pricing

**$0.30 per 1,000 stories or comments** and **$2 per 1,000 parsed job posts**. A full Who is hiring thread (about 200 to 400 jobs) costs under $1.

#### Notes

Data comes from the official Hacker News API and its Algolia search API. Job fields are parsed from free text, so check the `headline` and `text` fields for anything unusual.

# Actor input Schema

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

Search uses the full Hacker News archive. Lists return the current ranking.

## `queries` (type: `array`):

Search mode: one or more keyword queries, e.g. web scraping, llm agents. Each query is searched separately and every row carries its query. Leave empty for the newest items.

## `types` (type: `array`):

Search mode: which kinds of items to search.

## `sort` (type: `string`):

Search mode ordering.

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

Search mode filter.

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

Search mode filter.

## `author` (type: `string`):

Search mode: only items by this username.

## `since` (type: `string`):

Search mode: created on or after.

## `until` (type: `string`):

Search mode: created on or before.

## `storyIds` (type: `array`):

Story IDs or links like https://news.ycombinator.com/item?id=12345678. Returns every comment with depth and parent.

## `hiringThread` (type: `string`):

latest, or a month like "September 2026".

## `keywords` (type: `array`):

Keep job posts mentioning any of these words, e.g. python, rust, Berlin.

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

Who is hiring mode.

## `maxItems` (type: `integer`):

Search mode: max rows per query. Other modes: max rows in total.

## Actor input object example

```json
{
  "mode": "search",
  "queries": [
    "web scraping"
  ],
  "types": [
    "story"
  ],
  "sort": "date",
  "hiringThread": "latest",
  "remoteOnly": false,
  "maxItems": 100
}
```

# Actor output Schema

## `items` (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 = {
    "queries": [
        "web scraping"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("alex9080/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 = { "queries": ["web scraping"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,alex9080/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/LLTk8I3jHAOfwbGSR/builds/PoUa5qikJvH4bhzPx/openapi.json
