# Hacker News Scraper: Search, Threads & Who Is Hiring Jobs (`swiftkit/hacker-news`) Actor

Search Hacker News stories and comments by keyword and date, export full comment threads, or turn the monthly 'Who is hiring?' thread into a clean job table (company, role, location, remote, salary, visa). Official HN search API, only-new mode.

- **URL**: https://apify.com/swiftkit/hacker-news.md
- **Developed by:** [SwiftKit](https://apify.com/swiftkit) (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

$0.20 / 1,000 items

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, Threads & Who Is Hiring Jobs

Three ways to get Hacker News data as clean JSON, all through the **official HN search API**
(by Algolia):

1. **Search** stories and/or comments by keyword, newest first or most relevant, with date range and
   minimum points. Goes past the API's usual 1,000-result cap for date-sorted searches.
2. **Who is hiring? jobs:** turns the monthly "Ask HN: Who is hiring?" thread into a job table with
   **company, role, location, remote, salary, visa**, apply links and the full post. Filter by
   keywords or remote only.
3. **Full threads:** every comment of any story, flattened with depth and parent, ready for analysis
   or summarizing.

Add **Only new items** and a schedule to get alerts: new mentions of your brand, new posts about a
topic, new job posts.

### Who it's for

- **Founders and marketers:** track mentions of your product or competitors.
- **Recruiters and job seekers:** the HN hiring thread as a filterable spreadsheet.
- **Researchers and AI builders:** stories and discussions for trend analysis, sentiment or RAG.

### Input

| Option | Mode | What it does |
|---|---|---|
| What to get | all | Search, Who is hiring? jobs, or full threads |
| Search query, Search in, Sort by | search | Words to find; stories, comments or both; newest or most relevant |
| From / To date, Minimum points | search | Narrow the results |
| Hiring thread month | jobs | e.g. "September 2026"; empty = latest |
| Job keywords, Remote jobs only | jobs | Filter job posts |
| Thread URLs or IDs | thread | HN item links |
| Max items | all | Stop after this many rows |
| Only new items | all | Skip items seen in earlier runs with the same settings |

### Output

A job from the hiring thread (real example, shortened):

```json
{
  "type": "job",
  "id": 49922606,
  "hnUrl": "https://news.ycombinator.com/item?id=49922606",
  "postedAt": "2026-10-01T15:03:25.000Z",
  "thread": "Ask HN: Who is hiring? (October 2026)",
  "company": "We The Flywheel",
  "role": "Production Designer",
  "location": "REMOTE (async, global)",
  "remote": true,
  "salary": null,
  "visa": null,
  "headline": "We The Flywheel | Production Designer | REMOTE (async, global) | …",
  "applyLinks": ["…"],
  "applyEmails": [],
  "text": "…"
}
```

A story from search:

```json
{
  "type": "story",
  "id": 49917863,
  "title": "Show HN: …",
  "url": "https://…",
  "hnUrl": "https://news.ycombinator.com/item?id=49917863",
  "author": "…",
  "points": 2,
  "comments": 0,
  "createdAt": "2026-10-01T04:50:24Z",
  "tags": []
}
```

### Pricing

You pay **per item returned** (story, comment or job). See the Pricing tab.

### Limits, honestly

- Job fields are parsed from free text, following the thread's "Company | Role | Location | …"
  convention. Most posts parse well; unusual ones may leave a field empty. The full post is always
  included in `text`.
- `applyEmails` only lists shared inboxes like jobs@ or careers@. We don't support the "Who wants to
  be hired?" thread, because it's a list of individual people.
- Data comes from the HN search API, which can lag the live site by a few minutes.

### More tools from SwiftKit

- [Job Scraper](https://apify.com/swiftkit/company-jobs): every open job from company job boards (Workday, Greenhouse, Lever, Ashby…)
- [RSS Feed Reader](https://apify.com/swiftkit/rss-feeds): news, blogs and podcasts from any feed or website, only new items
- [Tech Stack Detector](https://apify.com/swiftkit/tech-stack): what a website is built with: CMS, analytics, ecommerce, hosting
- [Job Search API](https://apify.com/swiftkit/job-search): search jobs across 10,000+ company career sites at once

### Questions?

Open an issue on the Issues tab.

# Actor input Schema

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

Search by keyword, extract jobs from the monthly hiring thread, or export whole threads.

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

Search mode: words to find, e.g. your brand or 'web scraping'.

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

Search mode: stories, comments, or both.

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

Search mode.

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

Search mode: only items posted on or after this date.

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

Search mode: only items posted on or before this date.

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

Search mode: skip stories with fewer points.

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

Who is hiring mode: e.g. 'September 2026'. Empty = the latest thread.

## `hiringKeywords` (type: `array`):

Who is hiring mode: keep posts mentioning any of these, e.g. python, rust, data.

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

Who is hiring mode.

## `threads` (type: `array`):

Thread mode: HN item links like https://news.ycombinator.com/item?id=49922569

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

Stop after this many rows in total.

## `onlyNewItems` (type: `boolean`):

Skip items returned by earlier runs with the same settings. For scheduled monitoring.

## Actor input object example

```json
{
  "mode": "search",
  "query": "web scraping",
  "searchIn": "stories",
  "sortBy": "date",
  "minPoints": 0,
  "remoteOnly": false,
  "maxItems": 200,
  "onlyNewItems": false
}
```

# Actor output Schema

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

Stories, comments or jobs.

# 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 = {
    "query": "web scraping"
};

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

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

```

## MCP server setup

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