# Hacker News Mentions Monitor - Brand, Keyword & Domain Alerts (`vyas0189/hn-mentions-monitor`) Actor

Find new Hacker News stories and comments that mention your brand, product, competitors or website. Exact-phrase matching, only new mentions on each run, no login.

- **URL**: https://apify.com/vyas0189/hn-mentions-monitor.md
- **Developed by:** [Vyas Ramankulangara](https://apify.com/vyas0189) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.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 Mentions Monitor

Get every new Hacker News story and comment that mentions your brand, product, competitors or website. Schedule it daily or hourly and it returns only the mentions you haven't seen yet. No login, no API key, no browser.

### What you get

One row per mention:

- Story or comment, with the matched keyword or domain (and every other term it matched)
- Author, time posted, points and comment count
- The comment's text, or the story's title, link and text
- A short snippet around the match
- Links to the item on Hacker News and to its parent story

### Why this one

- **Only new mentions.** Each monitor remembers what it already sent you, so scheduled runs never repeat a mention and you pay only for new ones.
- **Exact matches.** Hacker News search also returns near matches ("Go" inside "Google"). This Actor keeps only real whole-word or phrase matches, so you don't pay for noise.
- **Domains, not just words.** Add `yourcompany.com` to catch every story that links to your site or its subdomains, and comments that mention it.
- **No 1,000-result ceiling.** Searches walk back through time, so busy keywords return every match in your window.
- **Exclude words and a points floor** to cut the noise further.

### Good for

- Brand and product monitoring for startups and developer tools
- Tracking competitors' launches and what people say about them
- Finding "Ask HN" threads where your product is the answer
- Feeding mentions into Slack, a spreadsheet or an AI agent with Apify integrations and webhooks

Pairs well with the Bluesky Account Tracker by the same developer for cross-platform monitoring.

### Input

| Field | What it does |
|---|---|
| Keywords | Words or phrases to watch, e.g. `Apify`, `web scraping`. Not case sensitive. |
| Domains | Websites to watch, e.g. `apify.com`. |
| Search in | Stories, comments or both (default both). |
| Only new mentions | On by default. Turn off to get everything in the lookback window every run. |
| Look back (hours) | How far back the first run searches (default one week). |
| Monitor name | Optional. Keeps separate memories for separate monitors. |
| Exact match only | On by default. |
| Exclude keywords | Skip results containing these. |
| Minimum story points | Skip low-scoring stories. |
| Max mentions per keyword or domain | Cap per run (default 200). |

### How to schedule it

Create a task with your keywords, then add a schedule (for example every morning). Each run returns only new mentions. Connect the Slack, email or webhook integration to get them where you work.

### Pricing

You pay per mention returned. Runs that find nothing new cost almost nothing. You can set a maximum cost per run; the run stops cleanly when it's reached, and mentions it didn't return are picked up next time.

### Data and fair use

- Reads only public Hacker News data through the public Hacker News Search API (hn.algolia.com).
- Never posts, votes or messages anyone.
- Stays far below the API's rate limits and backs off when asked.
- The memory of seen mentions is kept in a key-value store named `hn-mentions-monitor-state` in your own Apify account. It holds item IDs and timestamps only. Delete it any time to start fresh.

Comments and usernames are personal data. You are responsible for using the results lawfully, including under GDPR and similar laws where they apply.

### Limits

- The search index can lag a few minutes behind Hacker News. Each run re-checks the last hour, so late-indexed mentions are still caught.
- Points and comment counts are as of the time the run found the item.

# Actor input Schema

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

Brand, product, competitor or topic names to watch for, e.g. Apify or "web scraping". Matched as whole words or phrases, not case sensitive.

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

Websites to watch, e.g. apify.com. Finds stories that link to the site (and its subdomains) and comments that mention it.

## `searchIn` (type: `string`):

Look in stories, comments or both.

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

Return only mentions you haven't received from this monitor before. Best for scheduled runs. Turn off to get everything in the lookback window every time.

## `lookbackHours` (type: `integer`):

How far back to search on the first run, or on every run when Only new mentions is off. 168 = one week.

## `monitorName` (type: `string`):

Optional. Give each monitor a name to keep its memory of seen mentions separate (e.g. my-brand). Without a name, the memory is tied to the exact keywords and domains.

## `exactMatch` (type: `boolean`):

Keep only results that contain the keyword as a whole word or phrase. The search engine alone also returns near matches, e.g. 'Go' inside 'Google'.

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

Skip results that contain any of these words or phrases.

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

Skip stories with fewer points. Comments are never filtered by points.

## `maxMentionsPerTerm` (type: `integer`):

Upper limit for each keyword or domain, per run.

## Actor input object example

```json
{
  "keywords": [
    "OpenAI"
  ],
  "searchIn": "both",
  "onlyNew": true,
  "lookbackHours": 168,
  "exactMatch": true,
  "minPoints": 0,
  "maxMentionsPerTerm": 200
}
```

# 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 = {
    "keywords": [
        "OpenAI"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("vyas0189/hn-mentions-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": ["OpenAI"] }

# Run the Actor and wait for it to finish
run = client.actor("vyas0189/hn-mentions-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": [
    "OpenAI"
  ]
}' |
apify call vyas0189/hn-mentions-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vyas0189/hn-mentions-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/HdJFMRkdqcJKfygcp/builds/TndhjDZumprd9BPIT/openapi.json
