# Hacker News Scraper — Posts, Show HN & Hiring (`moneygain/hackernews-posts-scraper`) Actor

Extract Hacker News posts: title, URL, score, comment count, author and timestamp, including Show HN launches and who-is-hiring threads. Built for startup discovery and tech trend tracking.

- **URL**: https://apify.com/moneygain/hackernews-posts-scraper.md
- **Developed by:** [Artem Drozhdei](https://apify.com/moneygain) (community)
- **Categories:** News, Developer tools, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 verified hacker news story / posts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Posts & Show HN Scraper (Fast & Cheap)

**Scrape Hacker News stories, Show HN startup launches, Ask HN discussions, upvotes, and author profiles to JSON, CSV, or Excel in milliseconds without heavy browser overhead.**

Designed specifically for venture analysts, angel investors, AI engineers, tech recruiters, and product managers who require instant programmatic access to trending tech stories, new software products, and monthly hiring threads.

***

### ⚡ Why Choose This Hacker News Scraper?

Most legacy Hacker News scrapers rely on slow, brittle HTML scrapers or bloated headless browsers (Playwright, Puppeteer) that burn 2–4 GB of RAM, suffer IP rate-limits, and take 15–30 seconds to run.

This Actor connects directly to the official **Hacker News Algolia Distributed Search Network (DSN)**, retrieving clean, structured stories in **under 200 milliseconds** on a lightweight **128 MB RAM** footprint.

| Feature | ⚡ This Actor (Algolia DSN) | 🐢 Other Scrapers (Playwright/HTML) |
| :--- | :--- | :--- |
| **Memory Allocation** | **128 MB RAM** | 2,048 MB – 4,096 MB RAM |
| **Speed per 50 Stories** | **~0.15 seconds** | 12.0 – 25.0 seconds |
| **Compute Cost per 1k Items** | **<$0.0002** | $0.08 – $0.20 |
| **Pay-Per-Event (PPE)** | **$0.005 / item** (10–20% volume discounts) | Monthly fixed subscriptions |
| **Show HN / Ask HN Feeds** | **Instant native category filtering** | Fragile regex/HTML parsing |
| **Upvote & Comment Thresholds**| **Instant server-side numeric filters** | Client-side slow iteration |
| **AI Agent & MCP Ready** | **Yes (<1s structured JSON for Claude & Cursor)** | Too slow for interactive loops |

***

### 📦 Sample Output JSON

Data is returned clean, sanitized, and typed according to strict schema specifications:

```json
{
  "id": "42204918",
  "title": "Show HN: 15MB transcription model that runs in the browser/device",
  "url": "https://github.com/transcribe-local/engine",
  "hnUrl": "https://news.ycombinator.com/item?id=42204918",
  "points": 348,
  "author": "simon_w",
  "authorProfileUrl": "https://news.ycombinator.com/user?id=simon_w",
  "commentsCount": 84,
  "createdAt": "2026-11-19T20:45:12Z",
  "createdAtTimestamp": 1795121112,
  "storyType": "show_hn",
  "contentText": "Hey HN! We built a local WebAssembly speech recognition engine running completely in-browser without server dependencies..."
}
```

***

### 🎯 High-Value Use Cases

1. **VC & Angel Dealflow Scouting**: Automatically monitor `Show HN` submissions every morning to discover stealth startups, early traction, and top open-source repositories before competitors.
2. **Monthly Tech Hiring Lead Gen**: Extract direct hiring manager contacts and job descriptions from the monthly `"Ask HN: Who is hiring?"` mega-threads.
3. **AI & Tech Sentiment Tracking**: Monitor industry sentiment and developer discussions around major product releases (e.g. OpenAI, Anthropic, Apple, Meta, NVIDIA).
4. **Content & Social Media Automation**: Pipe viral top-voted Hacker News articles (>100 points) into Discord, Slack, Telegram channels, or Twitter bots.
5. **Developer Competitor Research**: Track developer reactions, technical critiques, and alternative product recommendations in your niche.

***

### 🛠️ Input Parameters

| Field | Type | Description | Default |
| :--- | :--- | :--- | :--- |
| `mode` | `String` | Feed to extract: `"front_page"`, `"show_hn"`, `"ask_hn"`, `"new"`, or `"search"`. | `"front_page"` |
| `query` | `String` | Keyword search query (e.g. `"LLM"`, `"Agent"`, `"Who is hiring"`). Used with `"search"` mode. | `""` |
| `maxItems` | `Integer` | Maximum total stories to extract (1 to 5,000). | `10` |
| `minPoints` | `Integer` | Filter stories with at least this many upvote points (e.g. `20`, `100`). | `0` |
| `minComments`| `Integer` | Filter stories with at least this many user comments (e.g. `10`, `50`). | `0` |

***

### 🤖 AI & No-Code Integrations

#### 1. Claude & Cursor MCP Server

Query live Hacker News stories in conversation with your AI coding agents via Apify MCP:

```json
{
  "mcpServers": {
    "apify": {
      "command": "npx",
      "args": ["-y", "@apify/mcp@latest"]
    }
  }
}
```

#### 2. Python Client (`apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run_input = {
    "mode": "show_hn",
    "maxItems": 25,
    "minPoints": 10
}

run = client.actor("Archibald322/hackernews-posts-scraper").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"[{item['points']} pts] {item['title']} -> {item['url']}")
```

#### 3. n8n Automation Workflow

A pre-built n8n template is included in `workflows/n8n_template.json` to stream daily Show HN startup launches directly into Google Sheets or Slack channels.

***

### 💰 Transparent Pay-Per-Event Pricing

You only pay for clean, verified dataset items extracted:

- **Free Trial**: First sample test run is 100% free!
- **Base Rate**: **$0.005** per story ($5.00 per 1,000 stories).
- **Bronze Tier (>1,000 items)**: **10% Discount** ($0.0045/item).
- **Silver Tier (>10,000 items)**: **15% Discount** ($0.00425/item).
- **Gold Tier (>50,000 items)**: **20% Discount** ($0.0040/item).

***

### ❓ Frequently Asked Questions (FAQ)

##### Q1: Is it legal to scrape Hacker News?

Yes. Hacker News openly publishes public discussion threads and provides official API endpoints for search indexing and community research.

##### Q2: Does this actor require expensive proxies?

No! Because direct high-speed Algolia DSN search endpoints are utilized, zero proxy overhead is needed, guaranteeing 100% success rate without proxy charges.

##### Q3: Can I search for historical posts from previous years?

Yes. Simply set `mode` to `"search"` and enter your query. The underlying Algolia index stores the full history of Hacker News dating back to 2007.

##### Q4: How fast is this scraper?

Batches of 50 stories are retrieved in approximately 120–150 milliseconds. Extracting 500 stories takes under 1.5 seconds.

##### Q5: Can I filter for only Show HN posts with high traction?

Yes! Select `mode: "show_hn"` and set `minPoints: 50`. The actor will only return high-engagement startup projects.

***

### 🔗 Explore More High-Speed B2B Scrapers & Enrichers by Our Team

| Actor Name | Best For | Architecture | Pricing (PPE) |
| :--- | :--- | :--- | :--- |
| [Y Combinator Startups Scraper](https://apify.com/Archibald322/ycombinator-startups-scraper) | 6,400+ YC Companies & Founders | Algolia DSN (128 MB) | $0.005 / item |
| [Substack Newsletter Scraper](https://apify.com/Archibald322/substack-newsletter-scraper) | Top Newsletters & Post Metrics | Dual API/RSS (128 MB) | $0.005 / item |
| [Ashby Jobs Scraper](https://apify.com/Archibald322/ashby-jobs-scraper) | AI Startup & Tech Careers Feeds | Zero-Browser API (128 MB) | $0.005 / item |
| [Greenhouse Jobs Scraper](https://apify.com/Archibald322/greenhouse-jobs-scraper) | Enterprise Career Vacancies | Direct REST (128 MB) | $0.005 / item |
| [Lever Jobs Scraper](https://apify.com/Archibald322/lever-jobs-scraper) | High-Growth Tech Vacancies | Direct REST (128 MB) | $0.005 / item |
| [RemoteOK Jobs Scraper](https://apify.com/Archibald322/remoteok-jobs-scraper) | Global Remote Jobs & Salaries | Direct REST (128 MB) | $0.005 / item |
| [Wellfound Jobs Scraper](https://apify.com/Archibald322/wellfound-jobs-scraper) | Tech Talent & Startup Salaries | GraphQL / `__NEXT_DATA__` | $0.005 / item |
| [TrustMRR Startups Scraper](https://apify.com/Archibald322/trustmrr-startups-scraper) | Verified SaaS Revenue & MRR | `__NEXT_DATA__` (128 MB) | $0.005 / item |
| [Hugging Face Models Scraper](https://apify.com/Archibald322/huggingface-models-scraper) | 1M+ AI LLMs & Datasets | Hub REST API (128 MB) | $0.005 / item |
| [Clutch Agencies Scraper](https://apify.com/Archibald322/clutch-agencies-scraper) | B2B Agencies & Client Reviews | Fast HTTP Scraper | $0.008 / item |

# Actor input Schema

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

Select the feed or category to scrape from Hacker News.

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

Keyword to search for across stories (e.g. 'AI Agent', 'OpenAI', 'Who is hiring'). Required when Mode is 'Custom Keyword Search'.

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

Maximum total posts/stories to retrieve.

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

Filter stories with at least this many upvote points.

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

Filter stories with at least this many comments.

## Actor input object example

```json
{
  "mode": "front_page",
  "maxItems": 5,
  "minPoints": 0,
  "minComments": 0
}
```

# Actor output Schema

## `results` (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 = {
    "mode": "front_page",
    "maxItems": 5,
    "minPoints": 0,
    "minComments": 0
};

// Run the Actor and wait for it to finish
const run = await client.actor("moneygain/hackernews-posts-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 = {
    "mode": "front_page",
    "maxItems": 5,
    "minPoints": 0,
    "minComments": 0,
}

# Run the Actor and wait for it to finish
run = client.actor("moneygain/hackernews-posts-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 '{
  "mode": "front_page",
  "maxItems": 5,
  "minPoints": 0,
  "minComments": 0
}' |
apify call moneygain/hackernews-posts-scraper --silent --output-dataset

```

## MCP server setup

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