# Hacker News Mention Monitor - Keyword, Brand & Domain Alerts (`tali-works/hacker-news-mention-monitor`) Actor

Get alerted when Hacker News mentions your brand, product, keyword, domain or a user, in stories AND comments. Whole-word matching (no fuzzy junk), monitor mode returns only new hits, sweeps past the 1,000-result cap. Official free HN API. $0.50 per 1,000 mentions.

- **URL**: https://apify.com/tali-works/hacker-news-mention-monitor.md
- **Developed by:** [Trevor Staubach](https://apify.com/tali-works) (community)
- **Categories:** Social media, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 mentions

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 Mention Monitor: Keyword, Brand, Domain & User Alerts

Hacker News Mention Monitor watches **Hacker News** for your keywords and returns every new **story and comment** that mentions them. Each hit links back to the original Hacker News item, so you can read it in context and reply.

Use it to find out when HN talks about **your brand, product, competitors, your domain, or a topic you care about**: launch feedback, pain-point threads, "what do you use for X?" questions, and links to your site.

**$0.50 per 1,000 mentions.** No login, API key or proxy needed. Monitor runs that find nothing new cost only the Actor start fee ($0.00005).

### Why this Actor

- **Comments, not just titles.** Most HN discussion happens in comments. Every comment is checked on its *own* text, so you don't get every comment under a story just because the story title matched.
- **No fuzzy junk.** The HN search engine also returns prefix and typo matches (search "Acme" and you get "Acmex"). Every hit is re-checked locally with a whole-word match, so rows really mention your term.
- **New-only monitor mode.** Turn on *Monitor mode*, schedule it hourly, and each run returns only mentions you haven't seen. Already-seen hits are not charged.
- **No 1,000-result ceiling.** The search API stops paging at hit 1,000. This Actor splits the time range into smaller windows until each one holds fewer than 1,000 hits, so busy keywords and long look-backs come back complete.
- **Domain watching.** Track every story that links to `yourdomain.com` (or any subdomain) and every story or comment that pastes a link to it.
- **Built on HN's official public search API** (the free, keyless Algolia HN Search API behind hn.algolia.com). No HTML scraping, no login, no ban risk.

Need bulk HN data instead (full comment threads, front page, "Who is hiring?" jobs parsed into salary and location)? Use our [Hacker News Scraper](https://apify.com/tali-works/hacker-news-scraper).

### Input

| Field | What it does |
|---|---|
| `keywords` | Brands, product names, topics or phrases. Case-insensitive whole-word match in the story title, story text, story URL, or the comment's own text. `open source` also matches `open-source`. |
| `domains` | e.g. `example.com`. Stories linking to the domain or a subdomain, plus stories and comments containing a link to it. |
| `authors` | HN usernames. Returns everything those users post (a founder, competitor or your own team). To find people *mentioning* a username, put it in `keywords`. |
| `includeStories` / `includeComments` | Search stories, comments, or both (default both). |
| `lookbackDays` | How far back to search (default 7; decimals allowed, 0.25 = 6 hours). Used on normal runs and the first monitor run. |
| `since` | Optional start date (YYYY-MM-DD, ISO time or unix seconds). Overrides `lookbackDays`. |
| `minPoints` | Only stories at or above this score. Comments have no public score, so they are not filtered. |
| `excludeKeywords` | Drop hits that mention any of these words, e.g. to remove an unrelated meaning of your brand name. |
| `matchMode` | `wholeWord` (default) or `substring`. |
| `maxTotalItems` | Cost cap per run (default 1,000; 0 = no cap). Newest mentions come first. |
| `onlyNew` | Monitor mode: output only mentions not returned by earlier runs. |
| `monitorKey` | Name for this monitor's memory, e.g. `acme-brand`, so editing the input keeps the memory. |

Example: brand + domain alerts, comments and stories, hourly schedule:

```json
{
  "keywords": ["Acme", "Acme Cloud"],
  "domains": ["acme.io"],
  "excludeKeywords": ["Looney Tunes"],
  "onlyNew": true,
  "monitorKey": "acme-brand",
  "lookbackDays": 2
}
```

### Output

One row per matching story or comment, newest first. Each row has a direct link back to Hacker News.

| Field | Description |
|---|---|
| `type` | `story` or `comment` |
| `hnUrl` | Link to the item: `https://news.ycombinator.com/item?id=<id>` |
| `matchType` / `matchedTerm` / `matchedTerms` | `keyword`, `domain` or `author`; the term that matched (all matched terms if several did) |
| `excerpt` | ~280 characters around the first match |
| `author` / `authorUrl` | Who posted it |
| `createdAt` / `createdAtUnix` | When it was posted (UTC) |
| `storyTitle` / `storyHnUrl` / `storyId` | The story (for comments: the parent story it belongs to) |
| `linkedUrl` / `linkedDomain` | The article the story links to (empty for Ask HN and other text posts) |
| `parentHnUrl` / `parentId` | For comments: the item it replies to |
| `points` / `numComments` | Story score and comment count (empty for comments) |
| `storyType` | `show_hn`, `ask_hn`, `job` or `poll` when it applies |
| `text` | Full plain text of the comment or story body |
| `isNew` | `true` in monitor mode |

Example comment row:

```json
{
  "type": "comment",
  "id": "50240994",
  "hnUrl": "https://news.ycombinator.com/item?id=50240994",
  "matchType": "domain",
  "matchedTerm": "github.com",
  "matchedTerms": ["github.com"],
  "excerpt": "https://github.com/infumap/imwebsearch . web-search routes each query to the free quota of one of a number of providers. ...",
  "author": "math",
  "createdAt": "2026-10-26T08:56:47Z",
  "storyTitle": "DeepSeek search and fetch – $0.75 per 1000 successful requests",
  "storyHnUrl": "https://news.ycombinator.com/item?id=50138531",
  "linkedUrl": "https://api-docs.deepseek.com/guides/search/",
  "parentHnUrl": "https://news.ycombinator.com/item?id=50139399",
  "points": null
}
```

Export as JSON, CSV, Excel, or send to Google Sheets, Slack, email or webhooks with Apify integrations.

### Scheduling a monitor

1. Set your `keywords` / `domains`, turn on **Monitor mode** (`onlyNew`), and give it a `monitorKey`.
2. Run it once. The first run returns mentions from the look-back window and saves them as the baseline.
3. Go to **Schedules > Create**, pick this Actor and this input, and run it every 15 minutes, hourly or daily.
4. Each run scans from the previous run (minus a 3-hour overlap, to catch items the search index picks up late) and returns only mentions it hasn't returned before. Already-seen hits are free.
5. Add an integration (Slack, email, webhook) on the schedule to get alerts. Runs with no new mentions produce an empty dataset.

The memory lives in the named key-value store `hn-mention-monitor-state` in your account and is kept until you delete it. If a run stops at `maxTotalItems`, the leftover mentions are returned on the next run.

### Pricing

- **$0.50 per 1,000 mentions** written to the dataset (pay-per-event), plus the Apify Actor start fee of $0.00005 per run.
- Search hits dropped by the whole-word check or `excludeKeywords`, and already-seen hits in monitor mode, are **not charged**.
- Set *Max cost per run* in the run options or `maxTotalItems` to cap spend.
- An hourly monitor for a brand with 50 mentions a day costs about $0.03 a day, plus start fees.

### Limits and fair use

- Data comes from the public Algolia HN Search API, which allows about 10,000 requests per hour per IP. This Actor makes 2 requests per time window and pauses between requests. A typical monitor run makes fewer than 10.
- New HN items usually show up in search within minutes. The 3-hour overlap in monitor mode covers slower indexing.
- Items deleted on HN may drop out of search results.
- This tool returns links and excerpts for monitoring and research. Every row links back to Hacker News; please don't use it to republish HN content in bulk.

### FAQ

**Does it find mentions in comments under unrelated stories?** Yes. That's the main point: each comment is matched on its own text.

**Will "Go" match every "go" in English?** Whole-word matching still matches the plain word. For short or common names, use a more specific phrase (`Go 1.24`, `golang`) or add `excludeKeywords`.

**Can I track a competitor's launches?** Add their product name and domain, set `minPoints` to see only stories that took off, or add the founder's username to `authors`.

**Can I watch several brands in one run?** Yes. Add several keywords and domains. A row that matches several terms appears once, with all of them in `matchedTerms`.

**How is this different from your Hacker News Scraper?** This Actor is a *monitor*: it re-checks matches, remembers what it already returned, and is priced for frequent scheduled runs. The [Hacker News Scraper](https://apify.com/tali-works/hacker-news-scraper) is for bulk exports: full threads, front page and parsed hiring posts.

### About

Built and maintained by **Tali, an AI agent**, for Trevor Staubach. Code and README are AI-written and tested on live data. Found a bug or need a field? Open an issue on the Actor's Issues tab.

# Actor input Schema

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

Words or phrases to watch, e.g. your brand, product, competitor or a topic. Case-insensitive, whole-word match in the story title, story text, story URL or the comment's own text. Phrases like 'open source' also match 'open-source'.

## `domains` (type: `array`):

Domains to watch, e.g. example.com or https://blog.example.com. Matches stories linking to the domain (or any subdomain) and stories/comments whose text contains a link to it.

## `authors` (type: `array`):

Return every story/comment posted by these Hacker News users (e.g. a founder, competitor or your own team). Username or https://news.ycombinator.com/user?id=... URL. To catch people mentioning a username, add it to Keywords instead.

## `includeStories` (type: `boolean`):

Stories, Show HN, Ask HN, jobs.

## `includeComments` (type: `boolean`):

A comment matches only if the comment itself mentions your term (not just the story it sits under).

## `lookbackDays` (type: `number`):

How far back to search on a normal run or on the first monitor run. Later monitor runs only scan since the previous run (with a 3-hour safety overlap). Use decimals for hours, e.g. 0.25 = 6 hours.

## `since` (type: `string`):

Optional. Overrides 'Look back'. YYYY-MM-DD, ISO timestamp (UTC if no zone) or unix seconds.

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

Only stories with at least this score. Comments have no public score, so they are not filtered by this.

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

Drop hits that mention any of these words (whole word), e.g. to remove an unrelated meaning of your brand name.

## `matchMode` (type: `string`):

The HN search engine also returns prefix and partial matches; every hit is re-checked against your term. Whole word: 'Acme' matches 'Acme' and 'acme.io' but not 'Acmes' or 'Acmex'.

## `maxTotalItems` (type: `integer`):

Stop after this many output rows (newest first). 0 = no cap. In monitor mode, if a run is capped the remaining mentions are returned on the next run.

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

Remember what earlier runs returned (named key-value store 'hn-mention-monitor-state') and output only mentions not seen before. Already-seen hits are free. Schedule the Actor (Schedules > Create), e.g. hourly.

## `monitorKey` (type: `string`):

Optional name for this monitor's memory, e.g. 'acme-brand'. Keeps the memory when you edit the input. By default the key is derived from your terms and filters, so changing them starts a fresh baseline.

## Actor input object example

```json
{
  "keywords": [
    "Supabase",
    "Postgres"
  ],
  "includeStories": true,
  "includeComments": true,
  "lookbackDays": 7,
  "matchMode": "wholeWord",
  "maxTotalItems": 1000,
  "onlyNew": false
}
```

# Actor output Schema

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

All mentions 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 = {
    "keywords": [
        "Supabase",
        "Postgres"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tali-works/hacker-news-mention-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": [
        "Supabase",
        "Postgres",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("tali-works/hacker-news-mention-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": [
    "Supabase",
    "Postgres"
  ]
}' |
apify call tali-works/hacker-news-mention-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tali-works/hacker-news-mention-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/jQDUkGHPb6bU1mhTN/builds/1a97tSLnnEh3AEgcG/openapi.json
