# Hacker News Scraper: Stories, Comments & Who's Hiring (`iveeeeeen/hacker-news-scraper-api`) Actor

Hacker News data from the official HN API and Algolia HN Search: front page, new, best, Ask/Show HN, jobs, full-text search with points/date filters, comment threads, and parsed monthly 'Who is hiring?' job posts (company, remote, salary, visa). $0.30 per 1k items.

- **URL**: https://apify.com/iveeeeeen/hacker-news-scraper-api.md
- **Developed by:** [Ivan Alvarado](https://apify.com/iveeeeeen) (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.30 / 1,000 hn 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: Stories, Comments, Search & "Who Is Hiring" Jobs

**Get Hacker News data fast and reliably from the official HN API (Firebase) and Algolia's HN Search API.** It doesn't scrape HTML, so it won't break or get blocked.

### Modes

| Mode | What you get |
|---|---|
| `front_page`, `new`, `best`, `ask`, `show`, `jobs` | Live lists with rank, points, comment count, URL/domain, author, text |
| `search` | Full-text search of stories and/or comments, sorted by date or relevance, filtered by minimum points and date |
| `user` | A user's profile (karma, about) plus their latest stories and/or comments |
| `who_is_hiring` | The latest monthly **"Who is hiring?"**, **"Who wants to be hired?"** or **Freelancer** thread, parsed into structured posts: **company, remote/hybrid/onsite, salary, visa sponsorship, apply links**, with keyword filtering |

Turn on `maxCommentsPerStory` to also get threaded comments (with `depth` and `parentId`) for each story.

### Input examples

```json
{ "mode": "front_page", "maxItems": 30, "maxCommentsPerStory": 20 }
```

```json
{ "mode": "search", "searchQuery": "web scraping", "minPoints": 50, "createdAfter": "2026-01-01", "sortBy": "relevance" }
```

```json
{ "mode": "who_is_hiring", "keywords": ["remote", "python"], "maxItems": 500 }
```

### Output examples

```json
{ "type": "story", "id": 45612345, "rank": 1, "title": "mitmproxy adds --emudhra option", "url": "https://github.com/...", "domain": "github.com", "points": 104, "commentCount": 20, "author": "…", "createdAt": "2026-10-21T23:51:37.000Z", "storyType": "story", "hnUrl": "https://news.ycombinator.com/item?id=45612345" }
```

```json
{ "type": "job-post", "threadTitle": "Ask HN: Who is hiring? (October 2026)", "company": "Sidekick Labs", "headerParts": ["Sidekick Labs", "Senior SWE, R&D Engineer", "REMOTE", "$170k"], "remote": "remote", "salary": "$170k", "visaSponsorship": null, "applyUrls": ["https://…"], "text": "…" }
```

### Pricing (pay per event)

**$0.0003 per item** (story, comment or job post), so 1,000 items cost $0.30. There is no start fee.

### Use cases

Tech trend tracking, launch monitoring (Show HN), brand and keyword mentions, recruiting and job-market analysis, developer sentiment research, and datasets for LLMs.

# Actor input Schema

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

Choose a list, search, or the latest 'Who is hiring?' thread.

## `searchQuery` (type: `string`):

Full-text query, e.g. 'web scraping' or 'postgres'.

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

Stories, comments or both.

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

Newest first or most relevant.

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

Which monthly thread to parse (latest month).

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

Only posts containing any of these, e.g. remote, python, Berlin.

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

Maximum stories or job posts to return (comments are counted separately).

## `maxCommentsPerStory` (type: `integer`):

Also fetch up to N comments (threaded, with depth/parentId) per story. Each comment is one item.

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

Skip stories below this score.

## `createdAfter` (type: `string`):

ISO date, e.g. 2026-10-01.

## `username` (type: `string`):

HN username, e.g. pg. Returns the profile (karma, about) plus their stories/comments (see 'Search in').

## Actor input object example

```json
{
  "mode": "front_page",
  "searchType": "story",
  "sortBy": "date",
  "hiringThread": "hiring",
  "maxItems": 30,
  "maxCommentsPerStory": 0,
  "minPoints": 0
}
```

# Actor output Schema

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

No description

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

No description

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

// Run the Actor and wait for it to finish
const run = await client.actor("iveeeeeen/hacker-news-scraper-api").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("iveeeeeen/hacker-news-scraper-api").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 iveeeeeen/hacker-news-scraper-api --silent --output-dataset

```

## MCP server setup

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

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/0La5ahfnF884fFbbj/builds/lphZkf0gDN4dPpoTE/openapi.json
