# Social Mention Monitor — Brand Mentions on HN, Bluesky & News (`xtracto/social-mention-monitor`) Actor

Track new mentions of your brand or keywords on Hacker News, Bluesky, Google News, Lemmy, Stack Overflow and Mastodon. Each scheduled run reports only mentions you have not seen, with author, link, time and engagement.

- **URL**: https://apify.com/xtracto/social-mention-monitor.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** Social media, Automation
- **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 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## Social Mention Monitor — Brand Mentions on Hacker News, Bluesky, News & More

Track new mentions of your brand, product or keywords on Hacker News, Bluesky, Google News, Lemmy, Stack Overflow and Mastodon. Each run lists the matching mentions with author, link, time and engagement, and marks the ones you haven't seen yet. Turn on `onlyNew` and schedule it to get only new mentions.

### Why use this actor

- **New mentions flagged**: every row carries `isNew`. With `onlyNew` on, each mention is reported once, and a quiet day outputs nothing and costs nothing.
- **Real matches, not search noise**: some of these sites' own search returns near-matches (a search for "apify" brought back an unrelated story). A mention is kept only when your keyword really appears in it as a whole word.
- **Six sources, one row shape**: platform, author, title/text, link, time, likes/points/comments.
- **Exclude words** to drop job ads or an unrelated meaning of your brand name.
- **Stack Overflow tags count**: a question tagged with your keyword is a mention even if the title doesn't say it.
- No account, no login, no API key.

### How it works

1. Enter keywords, optionally words to exclude, and pick sources.
2. Schedule the actor, e.g. every hour or every morning.
3. Each run reads the recent window from every source and keeps the real matches.
4. Mentions this watch has already reported are skipped; the rest come out as rows. Connect a webhook, Slack or email integration for alerts.

No scraping setup and no database to maintain; history is kept for you between runs.

### Input

```json
{
  "keywords": ["apify", "web scraping"],
  "excludeKeywords": [],
  "sources": ["hackernews", "bluesky", "googlenews", "lemmy", "stackoverflow", "mastodon"],
  "lookbackHours": 48,
  "maxPerSource": 100,
  "onlyNew": false,
  "reportBaseline": true,
  "newsLanguage": "en",
  "newsCountry": "US"
}
```

| Field | Type | Description |
|---|---|---|
| `keywords` | array | Words or phrases to watch. Whole-word, case-insensitive |
| `excludeKeywords` | array | Drop mentions containing any of these |
| `sources` | array | `hackernews` (stories and comments), `bluesky`, `googlenews`, `lemmy`, `stackoverflow`, `mastodon` (by hashtag) |
| `lookbackHours` | integer | Window read each run; keep it longer than your schedule interval |
| `maxPerSource` | integer | Results read per source and keyword per run (10–100) |
| `onlyNew` | boolean | Output only mentions not reported before (for scheduled runs). Off: every run lists all matches in the window |
| `reportBaseline` | boolean | With `onlyNew`: on a watch's first run, also output mentions already in the window (marked `baseline`) |
| `newsLanguage`, `newsCountry` | string | Google News edition, e.g. `en` / `US`, `de` / `DE`, `id` / `ID` |

Each different combination of keywords, excluded words and sources is its own watch with its own history.

### Output

Real rows from a run on 2026-10-22:

```json
{
  "events": ["baseline"],
  "isNew": true,
  "firstRun": true,
  "platform": "bluesky",
  "mentionId": "bluesky:at://did:plc:hawvia7wfrbpizfy2anqq7ui/app.bsky.feed.post/3myh2uwvezh2c",
  "url": "https://bsky.app/profile/zytedata.bsky.social/post/3myh2uwvezh2c",
  "author": "zytedata.bsky.social",
  "title": null,
  "text": "My boring but effective web scraping setup https://www.youtube.com/watch?v=HZkW9MqBFQ8",
  "publishedAt": "2026-10-22T06:45:32Z",
  "likes": 0,
  "reposts": 0,
  "comments": 0,
  "matchedKeywords": ["web scraping"]
}
```

```json
{
  "events": ["baseline"],
  "isNew": true,
  "firstRun": true,
  "platform": "stackoverflow",
  "title": "How should I lock FEFO inventory batches when reserving stock concurrently with SQLAlchemy and PostgreSQL?",
  "url": "https://stackoverflow.com/questions/80011735/how-should-i-lock-fefo-inventory-batches-when-reserving-stock-concurrently-with",
  "publishedAt": "2026-10-22T03:14:53Z",
  "score": -2,
  "comments": 0,
  "tags": ["python", "postgresql", "sqlalchemy"],
  "matchedKeywords": ["python"]
}
```

| Field | Type | Description |
|---|---|---|
| `isNew` | boolean | `true` the first time this watch sees the mention |
| `events` | array | `new_mention`, `baseline` (a watch's first run), or `seen_before` |
| `platform` | string | `hackernews`, `bluesky`, `googlenews`, `lemmy`, `stackoverflow`, `mastodon` |
| `mentionId` | string | Stable id used to never report a mention twice |
| `url` | string | Link to the post, story, comment, question or article |
| `author` | string | Author handle, or the publication for news |
| `title`, `text` | string | Headline/title and body text, where the platform has them |
| `publishedAt` | string | UTC time |
| `matchedKeywords` | array | Which of your keywords it matched |
| `likes`, `reposts`, `comments`, `points`, `score` | integer | Engagement, as each platform reports it |
| `kind`, `linkUrl` | string | Hacker News: story or comment, and the link it points to |
| `community`, `tags`, `hashtag` | | Lemmy community, Stack Overflow tags, Mastodon hashtag |

### Notes and limits

- **Reddit is not included**: it no longer serves content to visitors who are not logged in.
- **Mastodon is searched by hashtag** (your keyword without spaces, e.g. `#webscraping`), because its full-text search needs an account.
- **Google News** links are Google's redirect links to the article.
- Stack Overflow allows a limited number of anonymous requests per day per IP; very frequent schedules with many keywords may hit it, and the status message will say so.
- If one source is down, the others still run and the failure is named in the status message. A run fails only when every source failed.

### Related actors

| Actor | Use it for |
|---|---|
| Google News Scraper | Full Google News results for any query |
| Bluesky Search Scraper | One-off Bluesky searches with full post detail |
| Website Change Monitor | Watch any page for changes |

# Actor input Schema

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

Brand, product or topic names to watch. A mention counts only when the word really appears in it (whole word, any case).

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

Drop mentions that contain any of these words (e.g. job ads, an unrelated meaning of your brand name).

## `sources` (type: `array`):

Where to look. Mastodon is searched by hashtag (the keyword without spaces), since full-text search there needs an account.

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

Read mentions published in this window each run. Keep it longer than your schedule interval; nothing is reported twice.

## `maxPerSource` (type: `integer`):

The most mentions to keep from each source in one run.

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

Off: every run lists all matching mentions in the lookback window, each marked isNew the first time this watch sees it. On: a run lists only mentions not reported before. Turn it on when you schedule the monitor.

## `reportBaseline` (type: `boolean`):

Only used with 'Only new mentions': whether the first run also reports the mentions already in the window (on) or only remembers them (off).

## `newsLanguage` (type: `string`):

Google News language, e.g. en, de, id.

## `newsCountry` (type: `string`):

Google News edition, e.g. US, GB, ID.

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

Not needed: all sources are open.

## Actor input object example

```json
{
  "keywords": [
    "apify",
    "web scraping"
  ],
  "sources": [
    "hackernews",
    "bluesky",
    "googlenews",
    "lemmy",
    "stackoverflow",
    "mastodon"
  ],
  "lookbackHours": 48,
  "maxPerSource": 100,
  "onlyNew": false,
  "reportBaseline": true,
  "newsLanguage": "en",
  "newsCountry": "US",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One row per new mention, stored in the run's 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": [
        "apify",
        "web scraping"
    ],
    "sources": [
        "hackernews",
        "bluesky",
        "googlenews",
        "lemmy",
        "stackoverflow",
        "mastodon"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/social-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": [
        "apify",
        "web scraping",
    ],
    "sources": [
        "hackernews",
        "bluesky",
        "googlenews",
        "lemmy",
        "stackoverflow",
        "mastodon",
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("xtracto/social-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": [
    "apify",
    "web scraping"
  ],
  "sources": [
    "hackernews",
    "bluesky",
    "googlenews",
    "lemmy",
    "stackoverflow",
    "mastodon"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call xtracto/social-mention-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xtracto/social-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/IQdBIVoCGPQ86sNkS/builds/8HjqtyUJSTFRqbc3t/openapi.json
