# How to Build a Twitter Mention Monitor

A Twitter mention monitor runs a search for your brand's handle, name, website and common misspellings on a schedule, removes your own posts, and sends each new mention to your team, sorted into questions, complaints and praise.

[![apidojo](/blog/authors/apidojo.png)**Apidojo** *15+ years of experience in data retrieval.*](/blog/authors/apidojo/)

**7 October 2026** Published

**3 min** Read

![Cover card reading 'How to Build a Twitter Mention Monitor'](/blog/covers/mention-monitor.png)

**A Twitter mention monitor runs a search for your brand’s handle, name, website and common misspellings on a schedule, removes your own posts, and sends each new mention to your team, sorted into questions, complaints and praise.** With apidojo’s Twitter Scraper Unlimited on Apify, an hourly mention check costs $0.016 per run plus a small fee per mention beyond the first 40.

The scheduling, deduplication and cost model come from [how to monitor a keyword on X with an API](/blog/twitter-scraping/monitor-keyword/). This guide adds what’s specific to mentions: the query, the triage and the routing.

## How Do You Write a Mention Query?

**Write one query that catches every way people refer to your brand, then remove your own account and reposts.** Listed below are the 5 parts of a mention query ([twitter-advanced-search reference](https://github.com/igorbrigadir/twitter-advanced-search)).

1.  **Your handle**: `@acme`.
2.  **Your name**, in quotes if it has more than one word: `"acme analytics"`.
3.  **Your domain**: `url:acme.com`.
4.  **Common misspellings**: `acmee OR akme`.
5.  **Exclusions**: `-from:acme -filter:retweets`.

```
(@acme OR "acme analytics" OR url:acme.com OR acmee) -from:acme -filter:retweets within_time:2h
```

Mention search by hand is covered in [how to search tweets mentioning a user](/blog/twitter-search/tweets-mentioning-user/).

## How Do You Sort Mentions Into Questions, Complaints and Praise?

**Sort mentions with simple keyword rules first; they route most posts correctly and are easy to adjust.** The table shows a starting set; tune the words to your product.

| Category | Matching words | Route to |
| --- | --- | --- |
| Complaint | broken, refund, not working, worst, cancel, bug | Support, urgent |
| Question | ?, how do, does it, anyone know, help | Support |
| Praise | love, thanks, great, recommend | Marketing |
| Other | everything else | Daily digest |

## How Do You Build the Monitor in Python?

**Run the query through Twitter Scraper Unlimited, skip post IDs you’ve already handled, label each new mention and send it to the right channel.** The fields come from the actor’s output example ([Apify](https://apify.com/apidojo/twitter-scraper-lite)).

```
import json, os, pathlib, requests
from apify_client import ApifyClient

QUERY = '(@acme OR "acme analytics" OR url:acme.com) -from:acme -filter:retweets within_time:2h'
RULES = {
    "complaint": ["broken", "refund", "not working", "worst", "cancel", "bug"],
    "question": ["?", "how do", "does it", "anyone know", "help"],
    "praise": ["love", "thanks", "great", "recommend"],
}
WEBHOOKS = {"complaint": os.environ["SUPPORT_HOOK"], "question": os.environ["SUPPORT_HOOK"],
            "praise": os.environ["MARKETING_HOOK"], "other": os.environ["DIGEST_HOOK"]}

def label(text: str) -> str:
    t = text.lower()
    for name, words in RULES.items():
        if any(w in t for w in words):
            return name
    return "other"

seen_file = pathlib.Path("seen_mentions.json")
seen = set(json.loads(seen_file.read_text())) if seen_file.exists() else set()
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("apidojo/twitter-scraper-lite").call(run_input={"searchTerms": [QUERY], "sort": "Latest"})

for t in client.dataset(run.default_dataset_id).iterate_items():
    if t["id"] in seen:
        continue
    kind = label(t["text"])
    requests.post(WEBHOOKS[kind], json={"text": f"[{kind}] @{t['author']['userName']}: {t['text']}\n{t['url']}"})
    seen.add(t["id"])

seen_file.write_text(json.dumps(sorted(seen)))
```

Run it hourly with cron or an Apify schedule, as described in [how to monitor a keyword on X with an API](/blog/twitter-scraping/monitor-keyword/).

## What Does a Mention Monitor Cost?

**An hourly mention monitor costs $11.52 over 30 days in query fees, plus $0.0004 for each mention beyond the first 40 in a run.** A brand with 20 mentions an hour stays inside the included results; a brand with 200 an hour adds about $0.064 per run (Apify).

## How Do You Report on Mentions Over Time?

**Store every labelled mention with its date and engagement, then chart weekly counts by category.** A rising share of complaints is an early warning; a spike in praise after a launch is a result to share. Scoring tone more precisely than keyword rules is covered in [how to collect tweets for sentiment analysis](/blog/twitter-scraping/sentiment-analysis-dataset/).

## The scrapers behind this

-   [Twitter Scraper Unlimited Single tweets, reply threads, X Articles and small queries; no minimum $0.016 / query + $0.40 / 1K](/scrapers/twitter-scraper-lite/)

## Questions people ask

### Does a mention monitor catch posts that don't tag the brand?

Yes, if the query includes your name and domain, not just the handle.

### Can you monitor competitors' mentions too?

Yes, add their handles and names as separate queries; see [how to build a competitor tweet tracker](/blog/twitter-scraping/competitor-tweet-tracker/).

### Where do you start?

At the [apidojo Twitter Scraper](/scrapers/twitter-scraper/).

## More X data use cases

-   [How to Monitor a Keyword on X With an API Build a keyword monitor for X: the query, hourly schedule, deduplication, Slack alerts and a cost table for 3 schedules.](/blog/twitter-scraping/monitor-keyword/)
-   [How to Build a Competitor Tweet Tracker Track competitors' posts, engagement, formats and follower growth on X with a daily collector and a weekly pandas report.](/blog/twitter-scraping/competitor-tweet-tracker/)
-   [How to Collect Tweets for Sentiment Analysis Collect, clean and score tweets for sentiment analysis, from the search query to VADER scoring and weekly sentiment reports.](/blog/twitter-scraping/sentiment-analysis-dataset/)
-   [How to Build a Twitter Dataset for LLM and RAG Collect posts and threads, format them as JSON Lines with citation metadata, index them for retrieval and keep the dataset fresh.](/blog/twitter-scraping/llm-rag-dataset/)

![apidojo](/blog/authors/apidojo.png)

## [Apidojo](/blog/authors/apidojo/)

15+ years of experience in data retrieval.

API Dojo is always ready for you. With 15+ years of experience, data acquisition has never been that easy. Cheapest prices with high availability.

-   🏯 15+ years of experience in data retrieval.
-   💰 Cheapest prices, qualified data.
-   ⚙️ High availability, extreme maintenance.
-   🐉 Hyper communicative, excellent support.

-   [apify.com](https://apify.com/apidojo)
-   [x.com](https://x.com/apidojo_)
-   [github.com](https://github.com/apidojo-io)
