# Hacker News Scraper - search, feeds, comments, Who is Hiring (`codeyouknowadmin/hacker-news-scraper`) Actor

Search HN stories and comments by keyword, author, date, points; pull front page, newest, Ask HN, Show HN and job feeds; or parse monthly 'Who is hiring?' threads into structured postings (company, roles, remote, salary, tech, emails). Official API, monitor mode.

- **URL**: https://apify.com/codeyouknowadmin/hacker-news-scraper.md
- **Developed by:** [Denis Liamkin](https://apify.com/codeyouknowadmin) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 item returneds

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, feeds, comments & "Who is hiring?" in one Actor

Pull anything from Hacker News as clean JSON: **full-text search** of stories and comments (by keyword, author, date, points), the **front page / newest / Ask HN / Show HN / jobs feeds**, **all comments of a story**, and — unique to this Actor — the monthly **"Who is hiring?" / "Who wants to be hired?" / "Freelancer?"** threads parsed into structured job postings.

Uses the official HN Algolia API: no login, no proxies, no scraping of HN pages, so it doesn't break.

### What people use it for

- **Developer sentiment & market research** — every HN comment mentioning your product, competitor or technology, with dates and points.
- **Content & newsletter curation** — front page or Show HN, filtered by keyword, delivered daily to Slack/Sheets.
- **Launch monitoring** — get pinged when a story matching your keywords hits the front page.
- **Job hunting / sourcing** — the "Who is hiring?" thread as a filterable table (remote, visa, salary, tech stack, apply links), or "Who wants to be hired?" as a candidate list.
- **AI agents** — "what is HN saying about Postgres this week?" answered in one tool call via the Apify MCP server.

### Sample output

**Search / feed item (story):**

```json
{
  "id": "22238335",
  "type": "story",
  "hnUrl": "https://news.ycombinator.com/item?id=22238335",
  "author": "Sikul",
  "createdAt": "2020-02-04T17:30:40Z",
  "points": 1582,
  "title": "Why Discord is switching from Go to Rust",
  "url": "https://blog.discordapp.com/why-discord-is-switching-from-go-to-rust-a190bbca2b1f",
  "text": "",
  "numComments": 642,
  "isAskHn": false, "isShowHn": false, "isFrontPage": false
}
```

**Comment:**

```json
{
  "id": "49826817",
  "type": "comment",
  "hnUrl": "https://news.ycombinator.com/item?id=49826817",
  "author": "Frieren",
  "createdAt": "2026-09-24T06:09:04Z",
  "text": "> To get the extra work done, Jones and his crew secretly ...",
  "storyId": 49817741,
  "parentId": 49817741,
  "storyTitle": "Why 'What's Opera, Doc?' looks like that",
  "storyUrl": "https://animationobsessive.substack.com/p/..."
}
```

**"Who is hiring?" posting:**

```json
{
  "id": "hn:49711313",
  "type": "posting",
  "thread": "Ask HN: Who is hiring? (September 2026)",
  "company": "Pango",
  "headline": "Pango (YC S26) | Founding Software Engineer | On-site (hybrid) in Stockholm, Sweden | Full time",
  "roles": ["Founding Software Engineer"],
  "locations": ["On-site (hybrid) in Stockholm, Sweden"],
  "remote": false, "onsite": true, "visaSponsorship": false, "internships": false,
  "salaryMentions": [],
  "tech": ["rust", "golang"],
  "urls": [],
  "emails": ["steve@pango.ai"],
  "hnUrl": "https://news.ycombinator.com/item?id=49711313",
  "text": "Pango (YC S26) | Founding Software Engineer | ..."
}
```

### Pricing

**$1.00 per 1,000 items** (stories, comments, feed entries or parsed postings — one flat price). Reading a whole "Who is hiring?" month (~400 postings) is about **$0.40**; a daily keyword monitor usually costs a fraction of a cent. Free-plan users get up to 100 items per run.

### Modes

| Mode | What it does | Key inputs |
|---|---|---|
| `search` | Full-text search of stories, comments, Ask HN, Show HN, jobs or polls | `query`, `kind`, `sort`, `author`, `storyId` (all comments of a story), `dateFrom/To`, `minPoints`, `minComments` |
| `feed` | Front page, newest, Ask HN, Show HN, job posts, top comments | `feed`, `dateFrom/To` |
| `whoIsHiring` | Monthly hiring / wants-to-be-hired / freelancer threads → structured postings | `threadType`, `months`, `remoteOnly`, `visaOnly` |

`keywords` / `excludeKeywords` post-filter every mode; **`onlyNewSinceLastRun`** turns any mode into a monitor for scheduled runs (you only get — and pay for — new items).

### Tips

- Monitor your brand: `search`, `kind: comment`, `keywords: ["yourproduct"]`, `onlyNewSinceLastRun: true`, run hourly.
- Weekly digest: `feed: front_page`, `dateFrom` = 7 days ago, push to Google Sheets or Slack.
- Candidates: `whoIsHiring` + `threadType: wants_to_be_hired` + `keywords: ["react", "remote"]`.
- Combine with the Apify MCP server so your agent can query HN directly.

### See also

- [Remote Jobs Aggregator](https://apify.com/codeyouknowadmin/remote-jobs-aggregator) — 6 remote job boards in one deduplicated feed with job-alert monitor mode.
- [Y Combinator Companies & Jobs](https://apify.com/codeyouknowadmin/yc-companies-and-jobs) — every open role at YC startups with salary, equity and founders.

# Actor input Schema

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

search = full-text search of stories/comments; feed = front page, newest, Ask HN, Show HN, jobs; whoIsHiring = parse the monthly 'Who is hiring?' / 'Who wants to be hired?' / 'Freelancer?' threads into structured postings.

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

Full-text query, e.g. "rust async", "postgres", "YC W26". Leave empty to list everything matching the other filters. (search mode)

## `kind` (type: `string`):

Type of item to return. (search mode)

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

relevance = most relevant/popular first; date = newest first. (search mode)

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

Only items by this user, e.g. "pg". (search mode)

## `storyId` (type: `string`):

With 'Comments' kind: all comments of this story. E.g. 22238335. (search mode)

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

Only items created on/after this date (search & feed modes).

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

Only items created on/before this date (search & feed modes).

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

Only items with at least this many upvotes. (search mode)

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

Only stories with at least this many comments. (search mode)

## `feed` (type: `string`):

Which feed to pull. (feed mode)

## `threadType` (type: `string`):

companies hiring, candidates looking, or freelancers. (whoIsHiring mode)

## `months` (type: `integer`):

1 = current month's thread only. (whoIsHiring mode)

## `threadId` (type: `string`):

Parse one specific HN thread by id, overriding thread type/months. (whoIsHiring mode)

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

Keep only postings mentioning remote work. (whoIsHiring mode)

## `visaOnly` (type: `boolean`):

Keep only postings mentioning visa sponsorship. (whoIsHiring mode)

## `includeText` (type: `boolean`):

(whoIsHiring mode)

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

Keep items whose title/text/url contain ANY of these words (case-insensitive). Applied after fetching, in every mode.

## `excludeKeywords` (type: `array`):

Drop items containing ANY of these words.

## `onlyNewSinceLastRun` (type: `boolean`):

Remembers items already returned and outputs only new ones. Schedule it to monitor a keyword, a feed or the hiring thread.

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

Upper bound on results written (you pay per item).

## Actor input object example

```json
{
  "mode": "search",
  "query": "rust",
  "kind": "story",
  "sort": "relevance",
  "feed": "front_page",
  "threadType": "hiring",
  "months": 1,
  "remoteOnly": false,
  "visaOnly": false,
  "includeText": true,
  "onlyNewSinceLastRun": false,
  "maxItems": 500
}
```

# Actor output Schema

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

Hacker News stories, comments, feed entries or parsed Who-is-hiring postings, one item each, in the default dataset.

# 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": "rust"
};

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

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

```

## MCP server setup

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