# Hacker News Scraper & Keyword Monitor: Stories + Comments (`latamdatatools/hacker-news-monitor`) Actor

Track mentions of your brand, product, competitors or any keyword on Hacker News: stories, comments, Show HN and Ask HN with points, comments, author and links. Only new mentions since the last run, perfect for daily Slack or email alerts. Official Algolia HN API.

- **URL**: https://apify.com/latamdatatools/hacker-news-monitor.md
- **Developed by:** [Julian Genuario](https://apify.com/latamdatatools) (community)
- **Categories:** Social media, Marketing, News
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 hacker news 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 & Keyword Monitor: Stories + Comments

Know when Hacker News talks about **your brand, your product, your competitors or your technology**. This Actor searches **stories and comments** (plus Show HN, Ask HN, polls and jobs) through the **official Algolia HN Search API** and returns every mention with points, comment count, author, links and the story a comment belongs to.

Turn on **"only new"** and schedule it hourly or daily: each run returns only mentions you have not received yet. Connect the dataset to Slack, email, Google Sheets, Make, Zapier or n8n for instant alerts.

### What does Hacker News Scraper do?

Hacker News Scraper searches Hacker News through the official Algolia HN API for your brand, product, competitors or any keyword: stories, comments, Show HN and Ask HN, with points, comment count, author and links. Its only-new mode returns new mentions since the last run, for daily Slack or email alerts.

### How to use Hacker News Scraper

1. Click **Try for free** on this page (a free Apify account is enough to start).
2. Fill in the input (see the examples below) or keep the prefilled example.
3. Click **Start** and wait for the run to finish.
4. Download the results from the **Output** tab as JSON, CSV, Excel or HTML, or read them with the Apify API.
5. Optional: create a **Schedule** to run it daily or weekly, and connect a webhook or an integration (Make, Zapier, n8n, Slack).

### Who uses it

- **Founders and marketers**: catch launches, reviews and complaints about your product the moment they appear.
- **DevRel**: find threads where your library, API or framework is mentioned and join the conversation.
- **Competitive intelligence**: follow competitors' launches (Show HN) and how the community reacts.
- **Investors and researchers**: track topics and technologies over time.

### Features

- Several keywords per run; phrases with spaces are searched as exact phrases.
- **Exact word match** on by default: the search engine also returns typo and prefix matches; this keeps only items where your keyword really appears in the title, URL or text (a comment matches on its own text).
- Filters: item types, minimum points and comments for stories, authors to exclude (e.g. your own team).
- Items found by several keywords appear once, with all `matchedKeywords`.
- **Only new** mode with separate memory per alert name; re-reads a short overlap so late-indexed items are not missed, without duplicates.
- Comment HTML converted to clean text; links kept.

### Input example

```json
{
  "keywords": ["apify", "web scraping", "crawlee"],
  "types": ["story", "comment"],
  "daysBack": 7,
  "onlyNew": true,
  "alertName": "brand-daily",
  "excludeAuthors": ["my_teammate"]
}
```

### Output

```json
{
  "id": "50235676",
  "type": "story",
  "title": "Website to Markdown – keyless HTML→clean Markdown for RAG, pay-per-use",
  "url": "https://apify.com/noniner/website-to-markdown",
  "domain": "apify.com",
  "text": null,
  "author": "fredxhansson",
  "points": 2,
  "numComments": 0,
  "createdAt": "2026-10-25T20:20:04Z",
  "hnUrl": "https://news.ycombinator.com/item?id=50235676",
  "storyId": "50235676",
  "storyTitle": "Website to Markdown – keyless HTML→clean Markdown for RAG, pay-per-use",
  "storyUrl": null,
  "parentId": null,
  "matchedKeywords": ["apify"],
  "fetchedAt": "2026-10-26T22:50:00.000Z"
}
```

`type` is `story`, `comment`, `show_hn`, `ask_hn`, `poll` or `job`. For comments, `storyTitle` / `storyUrl` / `storyId` tell you which thread it is in and `parentId` what it replies to. Newest first.

### Pricing

Pay per event:

- **USD 0.01 per run** (start).
- **USD 1 per 1,000 items** returned (USD 0.001 each).

Items filtered out, duplicates across keywords and (in "only new" mode) items already delivered are **not charged**. A run with no new mentions costs only the start fee.

### Notes

- Data comes from the public Algolia HN Search API (the search used by news.ycombinator.com), queried politely (about 2 requests per second).
- Points and comment counts are a snapshot at run time; they keep growing on HN.
- The API returns at most 1,000 results per keyword per run; use a shorter window or more specific keywords for very common words.

### Cost examples

Prices at the current pay-per-event rate: USD 0.01 per run and USD 1.00 per 1,000 items (filtered items, duplicates and items already delivered in only-new mode are free). You can set a maximum charge per run in the run options.

| Job | Approximate cost |
|---|---|
| Test run: 2 keywords, last 3 days (measured: 4 items, 4 s) | about $0.014 |
| Daily brand monitor in only-new mode (~10 new mentions) | about $0.02 per run |
| Research: 500 stories and comments about a topic | about $0.51 |
| Hourly monitor, 24 runs a day with ~2 new items each | about $0.29 per day |

### Use it from your code, an integration or an AI agent

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("latamdatatools/hacker-news-monitor").call(run_input={
  "keywords": [
    "apify",
    "web scraping"
  ],
  "types": [
    "story",
    "comment"
  ],
  "daysBack": 7,
  "onlyNew": True,
  "alertName": "brand-daily"
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["type"], item["author"], item["hnUrl"], item["matchedKeywords"])
```

**JavaScript / Node.js** (`npm install apify-client`):

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('latamdatatools/hacker-news-monitor').call({
  keywords: [
    'apify',
    'web scraping'
  ],
  types: [
    'story',
    'comment'
  ],
  daysBack: 7,
  onlyNew: true,
  alertName: 'brand-daily'
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.map((i) => [i.type, i.hnUrl, i.matchedKeywords]));
```

**No code:**

- **Schedules:** save your input as a Task and run it every hour or every morning from Apify Console (Schedules).
- **Integrations:** send the results to Google Sheets, Slack, email, Make, Zapier, n8n or Airbyte from the Integrations tab, or call your own webhook when a run finishes.
- **AI agents:** add it as a tool in Claude, Cursor, VS Code and other MCP clients through the Apify MCP server (`https://mcp.apify.com`), so the agent can check what Hacker News says about a product, company or topic.

### FAQ

**Can I call it from my own code or from an AI agent?** Yes. Start runs and fetch results with the Apify API or the JavaScript / Python clients, or use it as a tool from Claude, Cursor and other MCP clients through the Apify MCP server (`mcp.apify.com`).

**Can I run it automatically?** Yes. Create a Schedule in Apify Console (for example every morning) and add a webhook or an integration to get the results where you need them.

**Which export formats are available?** JSON, JSONL, CSV, Excel (XLSX), XML, RSS and HTML table, from the Output tab or the API.

**What does it cost?** See the Pricing section above. You only pay for the events listed there.

### Changelog

- 0.1 (2026-10): first version.

# Actor input Schema

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

Brands, products, competitors, technologies... One per line. Phrases with spaces are searched as exact phrases.

## `types` (type: `array`):

Stories include Show HN, Ask HN, polls and jobs.

## `daysBack` (type: `integer`):

Search window. With "only new", later runs start from the last item seen (but never before this window).

## `strictMatch` (type: `boolean`):

Keep only items where the keyword appears as a whole word or phrase in the title, URL or text (the search engine also returns typo and prefix matches).

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

Ignore stories with fewer points. Comments have no public points.

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

Ignore stories with fewer comments.

## `excludeAuthors` (type: `array`):

HN usernames to ignore (for example your own team).

## `onlyNew` (type: `boolean`):

Return only items not delivered in earlier runs with the same alert name. Schedule it hourly or daily.

## `alertName` (type: `string`):

Separate memory per alert.

## `maxItemsPerKeyword` (type: `integer`):

Up to 1,000 per keyword per run (API limit).

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

Total cap after merging keywords.

## Actor input object example

```json
{
  "keywords": [
    "apify",
    "web scraping"
  ],
  "types": [
    "story",
    "comment"
  ],
  "daysBack": 7,
  "strictMatch": true,
  "minPoints": 0,
  "minComments": 0,
  "onlyNew": false,
  "alertName": "default",
  "maxItemsPerKeyword": 500,
  "maxItems": 2000
}
```

# Actor output Schema

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

No description

## `runSummary` (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 = {
    "keywords": [
        "apify",
        "web scraping"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("latamdatatools/hacker-news-monitor").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 = { "keywords": [
        "apify",
        "web scraping",
    ] }

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

```

## MCP server setup

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

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/wheByO6ECl5MJXudm/builds/S61ECEoBOjsa7SIhz/openapi.json
