Twitter Alerts: Fixing Your Notifications vs Building Keyword Alerts

10 min readSocialAPI Engineering

Twitter Alerts: Fixing Your Notifications vs Building Keyword Alerts

Two completely different problems share this search term, and the answers have nothing in common.

1. Your notifications are broken or annoying. A badge won't clear, alerts stopped arriving, Android is behaving differently from web. ★This is a settings problem, and the fix is in the app.★

2. You want to know when someone mentions a topic. Your brand, a competitor, a keyword — from accounts you don't follow. ★X has no feature for this. Notifications only cover things that happen to your account.★

The first half of this article fixes the first problem. The second half builds the second.


Fixing X's own notifications

The badge that won't go away

Usually a sync issue rather than a real unread item.

  1. Open the notifications tab and scroll to the top
  2. Check the Mentions tab separately — an unread mention leaves a badge the main tab doesn't clear
  3. Force-close and reopen the app
  4. Still stuck? Log out and back in

⚠️ There's no "mark all as read" button. The badge clears by viewing, which is why a mention buried in a busy tab can leave it stuck indefinitely.

Notifications not arriving

Check these in order:

  • App settings → Notifications → Push notifications, and confirm the categories you want are on
  • Device settings → X → Notifications enabled at OS level
  • Battery optimisation (Android) — ★this is the most common cause on Android specifically★, since aggressive power saving suspends background delivery
  • Quality filter — Settings → Notifications → Filters. It hides notifications from accounts X considers low quality, and it's on by default

Too many notifications

  • Mute conversations you've replied to but don't want to keep following
  • Advanced filters — mute notifications from accounts without a profile photo, new accounts, or accounts that don't follow you
  • Turn off per-account post notifications — the bell icon on a profile

★None of this is something a third-party tool can fix for you.★ These are your account's own settings, and any tool offering to "fix notifications" wants account access for something you can do yourself in thirty seconds.


The thing notifications can't do

Notifications are about your account. Mentions, replies, likes, follows, quotes — all events involving you.

★They cannot tell you that someone posted about your topic without tagging you.★ And that's the majority of relevant conversation: people discuss brands, products, and competitors constantly without @-mentioning anyone.

The closest native option is turning on post notifications for specific accounts (the bell on their profile). That works for a handful of accounts you already know. It doesn't scale, and it can't watch a keyword.

Watching topics rather than accounts means querying search on a schedule — which is what an API is for.


Building keyword alerts

The mechanism is simple: search on a schedule, compare against what you've seen, alert on what's new.

import requests, json, pathlib

BASE = "https://api.socialapi.tech"
KEY  = "your_api_key"
HDRS = {"X-API-Key": KEY}
SEEN = pathlib.Path("seen.json")

def search(query, limit=50):
    r = requests.get(f"{BASE}/v1/search/advanced",
                     params={"query": query, "product": "Latest", "limit": limit},
                     headers=HDRS, timeout=60)
    r.raise_for_status()
    return r.json()["data"]

def check(query, min_faves=0):
    seen = set(json.loads(SEEN.read_text())) if SEEN.exists() else set()
    fresh = []

    for post in search(query):
        if post["id"] in seen:
            continue
        seen.add(post["id"])
        # ★threshold before alerting, not after★
        if post.get("like_count", 0) >= min_faves:
            fresh.append(post)

    SEEN.write_text(json.dumps(sorted(seen)[-5000:]))   # cap the file
    return fresh

for p in check('"acme corp" -filter:retweets', min_faves=2):
    print(f"@{p['author']['username']} ({p['like_count']} likes): {p['text'][:80]}")

Two details doing real work:

  • ★Dedupe on post ID, not on text.★ Search returns overlapping results between runs, and without the seen set you alert on the same post every cycle.
  • ★Cap the seen file.★ Left unbounded it grows forever; the last few thousand IDs are all you need since search only returns recent posts anyway.

The part that decides whether anyone uses it

★Alert systems don't fail by missing things. They fail by being noisy enough that people stop reading them.★

Once alerts are ignored, missing things is guaranteed — so noise is the failure mode that matters. Three rules handle most of it:

1. Set an engagement threshold. A brand mention with zero likes reached nobody. Thresholding needs engagement counts on every result — they come back with the post. min_faves:2 removes a surprising share of the volume without losing anything that mattered. Raise it until the alerts are worth reading.

2. Exclude reposts. -filter:retweets. One viral mention otherwise generates hundreds of near-identical alerts.

3. Batch instead of streaming to humans. ★Immediate alerts are right for incidents and wrong for everything else.★ A digest every few hours gets read; a stream of individual pings gets muted, and a muted channel is worse than no channel.

⚠️ The tuning trap: people set thresholds too low at first, get flooded, and abandon the system. Start stricter than feels right and loosen it — the failure you can see (too quiet) is recoverable; the failure you can't (ignored channel) isn't.


What to actually watch

Query Catches
"brand name" -filter:retweets Direct mentions in text
to:yourbrand Replies directed at you
url:yourdomain.com People sharing your links
"brand" (broken OR "doesn't work" OR down) Support issues
"competitor" (switching OR alternative) Buying signals

★The @ mention and to: are different sets★ — someone naming you without replying never enters your reply thread. Watching only one misses roughly half the traffic; the distinction is covered here.

Also worth watching: quotes of your posts, which don't appear in the reply thread either, and are where substantive criticism usually lives.


Questions people ask

Why won't my Twitter notification badge go away? Usually an unread item in the Mentions tab specifically. Check it separately, then force-close the app.

How do I clear Twitter notifications? By viewing them — there's no bulk clear. Check Mentions separately from the main tab.

Why aren't my Twitter notifications working? Check app settings, OS-level permissions, and battery optimisation. On Android, power saving is the most common cause.

How do I delete Twitter notifications? You can't delete individual notifications; they age out. Dismissing the badge is a matter of viewing them.

Why do my Twitter notifications not work on Android? Battery optimisation suspending background delivery is the usual answer. Exempt the app in your device's battery settings.

How do I turn off Twitter notifications? Settings → Notifications → Preferences → Push notifications. You can disable by category rather than all at once.

Can I get notified when someone tweets a keyword? Not natively — notifications only cover events involving your account. It requires polling search yourself or using a tool that does.

How do I set up Twitter keyword alerts? Search on a schedule, deduplicate against what you've seen, and alert on new results above an engagement threshold.

Can I get notified when a specific person tweets? Yes — the bell icon on their profile. That's per-account and doesn't scale past a handful.

What is the quality filter? A setting that hides notifications from accounts X judges low quality. It's on by default and can hide legitimate mentions.

How do I stop notifications from people I don't follow? Advanced filters under Notifications → Filters let you mute accounts that don't follow you, are new, or have no profile photo.

Why do I get notifications for tweets I don't care about? Usually a muted conversation you replied to, or post notifications left on for an account.

Can I monitor mentions without an account? Reading public data doesn't require your account, but logged-out browsing is heavily limited — this is what an API is for.

How often should keyword alerts run? Every 5-15 minutes covers most needs. Faster costs more and rarely changes what you do — polling frequency drives cost.

How do I avoid duplicate alerts? Deduplicate on post ID and store what you've alerted on. Text-based deduplication fails because near-identical posts differ slightly.

Why am I getting too many alerts? Threshold too low, or reposts included. Add min_faves: and -filter:retweets.

Can I get alerts in Slack or email? Yes — that's your side of the integration. The alerting logic is the same; only delivery differs.

Should alerts be instant or batched? Instant for incidents, batched for everything else. ★A digest gets read; a stream of pings gets muted.★

What's the difference between mentions and keyword alerts? Mentions are @-tagged and notified natively. Keyword alerts catch discussion that never tags you — usually the larger share.

Can I alert on hashtags? Yes, same mechanism with #tag as the query — see measuring hashtags.

Can I alert on trends? Trends are a separate list you'd poll and diff — see how trending works.

Do alerts work for protected accounts? No. Protected posts aren't publicly readable regardless of method.

How do I test my alert setup? Post something with your keyword from a second account and confirm it arrives. Test the whole path before relying on it.

What if my keyword is too generic? Add qualifiers or an engagement threshold. A generic keyword produces noise no amount of delivery tuning fixes.

What is the difference between alerts and monitoring? An alert interrupts you; monitoring builds a record. ★Same pipeline, different output★ — the monitoring side.

Why am I not getting alerts for a keyword? Usually the query, not the delivery. ★Test the query as a plain search first★ — if it returns nothing there, no alerting layer can fix it.

How do I know if my account is limited? Try posting, then check findability — ★if posts publish but nobody finds them, that is visibility, not a limit★ — how to test.

How do I set up a keyword alert? Save the query, poll it on a schedule, and diff against what you have seen. ★That is what every alerting tool does underneath.★

Can I get alerts for a competitor's posts? Yes — a from: query on a schedule — searching one account.

How fast can an alert be? ★As fast as your polling interval, or near-live with a stream★ — what live means.

Why are my alerts noisy? The query is too broad. ★Add qualifiers or an engagement threshold★ — no delivery tuning fixes a bad query.

Can I alert on a hashtag? Yes — ★though hashtags catch the word, not the subject★ — the trade-off.

Can I alert on mentions of my brand? Yes — ★search the brand terms, and expect a window rather than a complete set★.

How do I avoid duplicate alerts? Store post IDs and diff — ★deduplicate by ID, never by text★.

Can I alert on a follower change? Only by snapshotting and diffing — how tracking works.

Do alerts work for protected accounts? No — ★nothing reaches protected accounts★.

Should alerts run continuously? ★Match the interval to how fast the subject moves★ — constant intervals matter more than short ones.

What breaks alerting most often? ★A query that was never tested as a plain search.★


The short version

If your notifications are broken, it's a settings problem: Mentions tab, OS permissions, battery optimisation, quality filter. No tool can fix it for you and none should be asking for your account to try.

If you want to know when people discuss your topic, notifications can't do it — that's search on a schedule, and the hard part isn't fetching, it's ★keeping the volume low enough that the alerts stay worth reading★.

Our API covers the fetching — search with full operator syntax, engagement counts on every post so you can threshold before alerting, and cursor paging. Read-only, flat price per call, no rate limit of your own to manage.

Related reading: polling versus streaming for monitoring · why quotes and replies are different sets · tracking hashtag campaigns · what polling frequency costs.