# Hacker News Scraper: Search, Front Page and Who Is Hiring (`appley_rhodolite/hn-toolkit`) Actor

Hacker News toolkit using the official Algolia API: search stories and comments by keyword and date range, get the current front page, or turn the monthly 'Ask HN: Who is hiring?' thread into structured job rows.

- **URL**: https://apify.com/appley_rhodolite/hn-toolkit.md
- **Developed by:** [TW Data Tools](https://apify.com/appley_rhodolite) (community)
- **Categories:** Jobs, News, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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: Search, Front Page and "Who Is Hiring" Job Rows

**Three Hacker News tools in one Actor, built on the official Hacker News Search API (by Algolia).** Search stories and comments by keyword and date range, grab the current front page, or turn the monthly **"Ask HN: Who is hiring?"** thread into structured job rows: company, role, location, remote yes/no, salary when stated, tech tags and apply link, with the full original text kept next to every row.

No login, no browser, no proxy, no API key. Runs in a few seconds.

### Modes

| Mode | What you get |
|---|---|
| `hiring` (default) | The latest (or a chosen month's) "Ask HN: Who is hiring?" thread, one row per job post. |
| `search` | Stories and/or comments matching a keyword, optionally inside a date range, sorted by relevance or by date. |
| `front` | The stories on the Hacker News front page right now (about 30). |

### Input

```json
{ "mode": "hiring", "maxItems": 50, "remoteOnly": false }
```

| Field | Description |
|---|---|
| `mode` | `hiring`, `search` or `front`. Default `hiring`. |
| `query` | Search keywords (search mode). Needs a query or a date range. |
| `searchIn` | `stories`, `comments` or `both` (search mode). |
| `sortBy` | `relevance` (API cap: 1,000 hits) or `date` (newest first, no cap). |
| `dateFrom`, `dateTo` | UTC dates `YYYY-MM-DD` (search mode). |
| `month` | `2026-10` or `October 2026` (hiring mode). Empty = latest thread. |
| `remoteOnly` | Keep only posts that say remote (hiring mode). |
| `hiringFilter` | Keep only posts that contain this text, for example `python` or `berlin` (hiring mode). |
| `maxItems` | Maximum results, default 50, max 1,000. You pay per result. |
| `redactContacts` | Default `true`: replaces e-mail addresses in post text with a placeholder. |

### Output

**Hiring mode**, one item per job post:

```json
{
  "id": "50338800",
  "company": "Acme",
  "companyNote": "YC S20",
  "role": "Senior Backend Engineer",
  "location": "Berlin, Germany",
  "remote": false,
  "remoteType": "hybrid",
  "employmentType": "Full Time",
  "salary": "EUR 80k-100k",
  "techTags": ["Python", "Postgres"],
  "applyUrl": "https://acme.io/jobs",
  "url": "https://news.ycombinator.com/item?id=50338800",
  "postedBy": "hn_username",
  "postedAt": "2026-11-02T17:00:00Z",
  "thread": "Ask HN: Who is hiring? (November 2026)",
  "firstLine": "Acme (YC S20) | Senior Backend Engineer | Berlin, Germany | Hybrid | ...",
  "rawText": "Full text of the post...",
  "scrapedAt": "2026-11-09T12:00:00Z"
}
```

Job posts on Hacker News are free text. The parser reads the usual `Company | Role | Location | Remote | Salary` first line and the links in the post. It is best-effort: a field it cannot find is `null` (for example `remote: null` when the post never says), and the untouched text is always in `rawText` and `firstLine` so you can post-process it. Posts that do not follow a job format (and deleted posts) are skipped and counted in the run log.

**Search and front modes**, one item per story or comment:

```json
{
  "id": "50415628",
  "type": "story",
  "title": "Example story title",
  "url": "https://example.com/article",
  "hnUrl": "https://news.ycombinator.com/item?id=50415628",
  "points": 793,
  "numComments": 420,
  "author": "hn_username",
  "createdAt": "2026-11-08T18:16:07Z",
  "text": null
}
```

`type` is `story`, `ask_hn`, `show_hn` or `comment`. Comments also carry `storyId`, `parentId` and the story title.

### Pricing

Pay per result: **$1.00 per 1,000 results** ($0.001 each), plus a $0.005 start fee per run. Failed runs cost only the start fee.

| Results | Cost |
|---|---|
| 50 (default run) | about $0.055 |
| 200 | about $0.205 |
| 500 | about $0.505 |
| 1,000 | about $1.005 |

Platform compute is included in the price per result.

### Data and limits

- Uses only the official public HN Search API. The Actor reads stories, comments and job posts. It does not collect profiles or anything about a user beyond the HN username the API returns with each item.
- The relevance-ranked search returns at most 1,000 hits per query (an API limit). Use `sortBy: date` or split a long period into several date ranges to go deeper.
- A "Who is hiring?" thread has several hundred posts; all top-level posts are read. Replies to job posts are not included.
- Requests are rate-limited and retried politely when the API says "slow down".
- A run summary (mode, thread, items, requests, warnings) is saved as `RUN_SUMMARY` in the run's key-value store.

### Good to know

- This Actor is not affiliated with, endorsed by or sponsored by Y Combinator or Hacker News. "Hacker News" is used only to say which public data source the Actor reads.
- Posts and comments are written by their authors. Use the data in line with the terms of the source and the laws that apply to you.

### Support

Something not parsing right? Open an issue in the Actor's Issues tab with the mode, the input and the HN item ID, and we will look at it.

# Actor input Schema

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

hiring = parse the monthly 'Ask HN: Who is hiring?' thread into job rows. search = find stories or comments by keyword and date range. front = the current front page.

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

Keywords for search mode, e.g. 'rust async'. Search mode needs a query or a date range.

## `searchIn` (type: `string`):

Search story titles/texts, comments, or both.

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

relevance returns at most 1,000 hits; date has no such cap and returns the newest first.

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

UTC date, YYYY-MM-DD.

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

UTC date, YYYY-MM-DD (inclusive).

## `month` (type: `string`):

Which 'Who is hiring?' thread: 2026-10 or 'October 2026'. Empty = the latest thread.

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

Keep only posts that say remote.

## `hiringFilter` (type: `string`):

Keep only job posts that contain this text (case-insensitive), e.g. 'python' or 'berlin'.

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

Maximum number of results (you pay per result). The front page has about 30 stories.

## `redactContacts` (type: `boolean`):

Replaces e-mail addresses found in post text with a placeholder.

## Actor input object example

```json
{
  "mode": "hiring",
  "searchIn": "stories",
  "sortBy": "relevance",
  "remoteOnly": false,
  "maxItems": 50,
  "redactContacts": true
}
```

# Actor output Schema

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

All results in the default dataset.

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

Stories view (search and front modes).

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

Jobs view (hiring mode).

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("appley_rhodolite/hn-toolkit").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("appley_rhodolite/hn-toolkit").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 '{}' |
apify call appley_rhodolite/hn-toolkit --silent --output-dataset

```

## MCP server setup

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

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/9UufKASyrdNy2Zx5F/builds/cvGeAEJnYksjxT7R0/openapi.json
