# Hacker News Scraper: Top, New, Best, Show & Ask HN (`lowcountrytech/hacker-news-scraper`) Actor

Scrape Hacker News stories from the front page (top), new, best, Ask HN, Show HN or job lists: title, link, domain, points, comment count, date, rank and Ask/Show text. Official HN API, no login. Filter by points and keywords. Pay only per story.

- **URL**: https://apify.com/lowcountrytech/hacker-news-scraper.md
- **Developed by:** [Lowcountry Tech Solutions LLC](https://apify.com/lowcountrytech) (community)
- **Categories:** News, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 stories

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

Scrape Hacker News stories from any list (front page, new, best, Ask HN, Show HN, jobs) with title, link, domain, points, comment count, date and rank.

**No login · No proxy needed · JSON, CSV, Excel or API · Tested daily**

Sample output from the default input:

| Rank | Title | Domain | Points | Comments count |
|---|---|---|---|---|
| 1 | SimCity, but with Permits | permit.petercai.com | 442 | 240 |
| 2 | DeepInfer: High-performance inference framework… | github.com | 2081 | 814 |
| 3 | Feds suspect ransom negotiator ran ShinyHunters… | krebsonsecurity.com | 20 | 1 |

### What does Hacker News Scraper do?

This actor reads Hacker News through its official API: it takes the list you choose, fetches each story's details, and returns one clean record per story with its rank in the list at run time. Filter by minimum points or keywords. The default run returns the current front page (30 stories) in a few seconds.

- All six official lists: top (front page), new, best, Ask HN, Show HN and jobs
- Points, comment count and rank captured at run time, for tracking how stories perform
- Ask HN and Show HN text included as plain text
- Minimum points and keyword filters (title, link and text)
- Official API: no HTML scraping, no login, no proxy; submitter usernames are not included

### Who is it for?

- Founders and marketers tracking Show HN launches and how they rank
- Newsletters and digests that collect the day's best Hacker News stories
- Brand and competitor monitoring: alerts when a domain or keyword reaches HN
- Researchers studying what tech audiences upvote and discuss
- Feeding HN headlines to an AI agent or dashboard on a schedule

### How much does it cost?

This actor uses **pay-per-event** pricing, so you pay only for what you get:

| Event | Price |
|---|---|
| Story (per story) | $0.0005 ($0.50 per 1,000) |
| Actor start (per run) | $0.00005 |

Paid Apify plans get the Store's discount tiers on the story price: $0.45 per 1,000 at Bronze, $0.40 at Silver, and $0.35 at Gold and above.

The default input returns up to 30 stories, which costs about $0.015. Apify's free plan includes monthly credit that covers thousands of stories. Set **Maximum stories** or a maximum cost per run to cap spending.

### How to use it

1. Click **Try for free**.
2. Pick a list (front page by default).
3. Optionally set a minimum number of points or keywords.
4. Click **Start**, then download the stories as JSON, CSV, Excel or HTML, or read them via the API.
5. Schedule the actor (e.g. hourly) to track rankings over time.

### Input

| Field | Type | Description | Default |
|---|---|---|---|
| `listType` | string | Which Hacker News list to read: `top` (front page ranking), `new`, `best`, `ask` (Ask HN), `show` (Show HN) or `job` (YC company job posts). | `"top"` |
| `minPoints` | integer | Keep only stories with at least this many points. 0 keeps everything. | `0` |
| `keywords` | array of strings | Keep only stories whose title, link or text contain any of these words. Whole words, case-insensitive, plurals included: `ai` matches "AI" and "AIs" but not "paint"; `agent` matches "agents". Domains work too, e.g. `openai.com`. Leave empty for all. | `[]` |
| `maxItems` | integer | Stop after this many stories. You are charged per story, so this also caps the cost of a run. Use 0 for no limit. | `30` |
| `proxyConfiguration` | object | Optional. The target is a public page or API and normally works without a proxy. | `{"useApifyProxy":false}` |

Example input:

```json
{
  "listType": "top",
  "minPoints": 0,
  "keywords": [],
  "maxItems": 30
}
```

### Output

Each story is one record in the dataset:

| Field | Type | Description |
|---|---|---|
| `id` | integer | Hacker News item ID. |
| `rank` | integer | Position in the chosen list at run time (1 = first). |
| `listType` | string | The list the story was read from (top, new, best, ask, show, job). |
| `type` | string | Item type: `story`, `job` or `poll`. |
| `title` | string | Story title. |
| `url` | string or null | The linked article or project; null for text posts such as most Ask HN. |
| `domain` | string or null | Domain of the linked URL, without `www.`. |
| `points` | integer or null | Points (upvotes) at run time. |
| `commentsCount` | integer or null | Number of comments at run time; null for job posts. |
| `postedAt` | string | When the story was submitted (ISO 8601). |
| `hnUrl` | string | The discussion page on Hacker News. |
| `text` | string or null | Post text for Ask HN, Show HN and job posts, as plain text (email addresses removed). |
| `scrapedAt` | string | When this record was scraped (ISO 8601). |

Sample:

```json
[
  {
    "id": 50170593,
    "rank": 1,
    "listType": "top",
    "type": "story",
    "title": "SimCity, but with Permits",
    "url": "https://permit.petercai.com/",
    "domain": "permit.petercai.com",
    "points": 442,
    "commentsCount": 240,
    "postedAt": "2026-10-20T18:29:09.000Z",
    "hnUrl": "https://news.ycombinator.com/item?id=50170593",
    "text": null,
    "scrapedAt": "2026-10-20T12:00:00.000Z"
  },
  {
    "id": 50163277,
    "rank": 2,
    "listType": "top",
    "type": "story",
    "title": "DeepInfer: High-performance inference framework for DeepSeek models",
    "url": "https://github.com/deepseek-ai/DeepInfer",
    "domain": "github.com",
    "points": 2081,
    "commentsCount": 814,
    "postedAt": "2026-10-20T09:08:54.000Z",
    "hnUrl": "https://news.ycombinator.com/item?id=50163277",
    "text": null,
    "scrapedAt": "2026-10-20T12:00:00.000Z"
  }
]
```

### Limitations

- Points, comment counts and ranks change quickly; each record reflects the moment of the run.
- With narrow keyword or points filters the actor reads the whole list (up to 500 stories) to find matches, which takes longer.
- Comment text and submitter usernames are not included.

### FAQ

**How many stories can I get?**

The API lists up to 500 stories for top, new and best, and up to 200 for Ask HN, Show HN and jobs. Set **Maximum stories** to the number you want.

**Does it include comments?**

Hacker News Scraper includes each story's comment count but does not export comment text.

**Why is the submitter missing?**

Submitter usernames identify individuals, so the actor leaves them out. Use `hnUrl` to open the discussion.

**Is it legal to scrape this data?**

Hacker News Scraper reads only publicly available, non-personal news data from the official Hacker News API, without logging in and at a polite request rate. It respects robots.txt. You are responsible for how you use the results; check the target's terms and the laws that apply to you. If you are unsure, ask a lawyer.

**Can I call it from my own code, Make, Zapier, n8n, or an AI agent?**

Hacker News Scraper has an HTTP API, official JavaScript and Python clients, and integrations with Make, Zapier, n8n and LangChain. AI agents can run it as a tool through the Apify MCP server: add `https://mcp.apify.com?tools=lowcountrytech/hacker-news-scraper` to your MCP client and the actor becomes the tool `lowcountrytech--hacker-news-scraper`. Set `maxTotalChargeUsd` in the call options to cap what one run can cost.

**Something broke or a field is missing. What now?**

Open an issue on the Issues tab with the input you used. The actor is tested daily and repaired quickly when the source site changes.

***

Hacker News Scraper is an independent tool. It is not affiliated with, endorsed by, or sponsored by Hacker News. Hacker News is a trademark of its owner.

# Actor input Schema

## `listType` (type: `string`):

Which Hacker News list to read: `top` (front page ranking), `new`, `best`, `ask` (Ask HN), `show` (Show HN) or `job` (YC company job posts).

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

Keep only stories with at least this many points. 0 keeps everything.

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

Keep only stories whose title, link or text contain any of these words. Whole words, case-insensitive, plurals included: `ai` matches "AI" and "AIs" but not "paint"; `agent` matches "agents". Domains work too, e.g. `openai.com`. Leave empty for all.

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

Stop after this many stories. You are charged per story, so this also caps the cost of a run. Use 0 for no limit.

## `proxyConfiguration` (type: `object`):

Optional. The target is a public page or API and normally works without a proxy.

## Actor input object example

```json
{
  "listType": "top",
  "minPoints": 0,
  "keywords": [],
  "maxItems": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "listType": "top",
    "maxItems": 30,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("lowcountrytech/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 = {
    "listType": "top",
    "maxItems": 30,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("lowcountrytech/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 '{
  "listType": "top",
  "maxItems": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call lowcountrytech/hacker-news-scraper --silent --output-dataset

```

## MCP server setup

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