How to Get a Tweet Notification Whenever an Account Posts

By Alex Chen•12 min read
Three routes to a tweet notification: the bell in the X app delivering a push to a phone; a polling script calling the search endpoint every minute and posting to Slack; a webhook rule where the API pushes matching posts to your own endpoint within seconds.
Three ways to get a tweet notification. Each one is a step up in reach and a step down in simplicity.
TL;DR
  • In the app: profile, bell icon, All posts. You must follow the account, it is one account at a time, and notifications arrive only on devices where X push is on.
  • The bell cannot alert on keywords, on accounts you do not follow, or deliver to Slack, email, a trading terminal, or a database.
  • Route 2, polling: one search call per minute with from: operators and since_time, then post matches to a Slack webhook. About $0.22 a day for a quiet watch list at 60-second polling.
  • Route 3, webhook rule: register a filter rule with /oapi/tweet_filter/add_rule, activate it, point it at your HTTPS endpoint, and the API pushes each matching post. Each rule check is billed like a call (15 credits), so it costs about the same as polling at the same interval; you just don't run the scheduler.
  • Pick by control and scale: bell for a few accounts on your phone; polling (recommended) for a watch list feeding Slack, email or your own system; a webhook rule only if you'd rather not run a scheduler at all.
  • Among TwitterAPI.io customers who monitor accounts, 60-second polling is the most common interval, about two thirds of filter rules are plain account lists, and over a third of webhook users still point their rule at a test URL (based on anonymized, aggregated API usage on TwitterAPI.io).

"Tweet notification" covers a spread of needs. At one end, you want your phone to buzz when one account posts. At the other, you need a Slack channel or a trading system to react within seconds whenever any of fifty accounts says something. X's built-in bell handles the first and nothing beyond it, and most guides stop there. This page covers the bell properly, then gets to the part people actually search for after it lets them down.

Everything beyond the bell here is built on API read calls, which need no X account: no automation on your own X account, no extension that asks for your password, nothing that can get your account locked. You need an API key from the twitterapi.io dashboard and a place to receive the alerts (a Slack webhook URL is the easiest). Each endpoint named below is a real path, and the scripts run as written.

One boundary: this page is about being notified when someone else posts. If you want to monitor mentions of a brand or a keyword across all of X, the structure is identical, but the alerts-for-keywords guide linked at the end goes deeper on query design.

Webhook users still pointing their rule at a test URL

over a third (based on anonymized, aggregated API usage on TwitterAPI.io)

01 — Section

Turn on tweet notifications in the X app (the bell)

This is the built-in feature, called account notifications in X's help pages. It works on iOS and Android, and on the web if you allow browser notifications.

1. Follow the account. The bell only appears on profiles you follow.

2. Open the profile and tap the bell next to the Follow button (on the web it is the bell to the left of the Following button).

3. Choose All posts or Only posts with live video. The bell fills in to show it is active.

4. Check push is on. Tap your avatar, Settings and privacy, Notifications, Preferences, Push notifications, and make sure notifications are enabled, including the option for posts from accounts you have turned on notifications for. On the phone itself, the X app must be allowed to send notifications.

On the web: Settings and privacy, Notifications, Preferences, Push notifications, then allow x.com in the browser's permission prompt. Browser notifications only arrive while that browser is open.

To turn it off: tap the bell again and choose Off, or manage all of them under Settings, Notifications, Preferences.

Notifications for a single account are reliable in our experience, but X batches and prioritizes pushes, so during a burst of posts you may receive one combined notification rather than one per post, and there is sometimes a delay of a few minutes. If that matters, the next sections are for you.

02 — Section

What the bell cannot do

Before building anything, be clear about why the built-in feature is not enough. These are the limits as the feature works in 2026.

NeedBell in the X app
Alerts for an account you do not followNo; you must follow it
Alerts for a keyword, phrase, cashtag, or hashtagNo; accounts only
Alerts for a list of many accountsOne bell per profile; no bulk setup
Filter out replies or repostsNo; All posts is the only post option
Deliver to Slack, email, Discord, a webhook, or a databaseNo; phone or browser push only
A log or history of what you were alerted aboutOnly the notifications tab, which mixes everything together
Guaranteed per-post, sub-minute deliveryNot guaranteed; pushes can be batched or delayed
Alerts to a team rather than one personEach person sets their own bells

If your need is in the right column with a "no", skip to the comparison table and pick a route.

03 — Section

Three ways to get tweet notifications, compared

The honest comparison, with cost taken from the twitterapi.io pricing page (checked in 2026): $0.15 per 1,000 posts returned, a $0.00015 minimum per call, and the same minimum for every check a webhook rule runs.

Bell in the X appPolling scriptWebhook rule
Setup time10 seconds10 minutes20 minutes (you need an HTTPS endpoint)
Accounts coveredOne per bell, must followAny public accounts, dozens per queryAny public accounts or keywords in the rule
KeywordsNoYes, X search operatorsYes, same operators
LatencyMinutes, sometimes batchedYour poll interval, typically 60 sSeconds after the post, per the rule interval
Delivers toPhone or browserAnywhere you can call from a scriptYour endpoint, then anywhere
Runs whereX's serversA cron job, GitHub Actions, or a tiny serverYour endpoint (serverless is fine)
Cost for 5 watched accounts, 20 posts a day in totalFreeAbout $0.22/day at 60 s polling, $0.05/day at 5 minAbout the same: $0.22/day at 60 s checks, $0.05/day at 5 min (every check is billed)
Needs your X accountYesNoNo

The cost is dominated by the minimum charge on empty checks (1,440 a day at 60 seconds), not by the posts. That is true of a webhook rule as well: the rule's checks are billed like calls, 15 credits each whether or not they find posts, so at the same interval a rule costs about the same as polling. We recommend polling for most setups: you see every request and response in your own logs, you choose the schedule and the query, and a since_time window keeps results free of duplicates. A webhook rule is the alternative when you don't want to run a scheduler at all, or need posts pushed straight into a system that reacts automatically.

Bar chart on a log scale of the daily cost of tweet notifications for a 5-account watch list that posts 20 times a day in total: polling or a webhook rule every 5 minutes about $0.05, polling or a webhook rule every 60 seconds about $0.22, 60-second polling on the official X API about $0.10 if only new posts are returned and about $36 if each call returns 5 posts, both plus a developer tier fee.
Daily cost for five accounts posting 20 times a day in total. Polling and a webhook rule cost the same at the same check interval; the official X API is shown for comparison.
04 — Section

Route 2: a polling script that sends tweet notifications to Slack

This is the route most monitoring customers converge on. One search call with the accounts joined by OR and a since_time operator returns only posts newer than the last run, so most runs return nothing and cost the minimum charge. Among TwitterAPI.io customers monitoring accounts, about two thirds of filter rules are plain account lists, and a 60-second interval is the most common choice (based on anonymized, aggregated API usage on TwitterAPI.io), so the defaults below are not arbitrary.

You need a Slack incoming webhook URL (Slack app settings, Incoming Webhooks) in the SLACK_WEBHOOK_URL environment variable, and TWITTERAPI_IO_KEY from the dashboard. Run the script every minute with cron (* * * * * python3 notify.py) or as a scheduled GitHub Actions workflow.

Two details that save a support ticket later. Keep the query under 512 characters; a long watch list must be split into two queries. And store the start time of the last successful run, not the current time, as the next since_time, so that a failed run is caught up by the next one instead of dropping posts.

If you run n8n, the same poll-diff-post loop ships as an importable workflow in the n8n Twitter workflow guide: new tweets to Slack.

python
"""Tweet notifications to Slack: new posts from a watch list since the last run.

Run every minute. Needs TWITTERAPI_IO_KEY and SLACK_WEBHOOK_URL in the environment.
"""
import json
import os
import time

import requests

HEADERS = {"X-API-Key": os.environ["TWITTERAPI_IO_KEY"]}
SLACK = os.environ["SLACK_WEBHOOK_URL"]
WATCH = ["NASA", "nasawebb", "SpaceX", "ESA", "JAXA_en"]   # public handles; keep the query under 512 chars
STATE_FILE = "notify-state.json"


def load_since():
    if os.path.exists(STATE_FILE):
        with open(STATE_FILE) as f:
            return json.load(f)["since_time"]
    return int(time.time()) - 600  # first run: last 10 minutes


def new_posts(since_time):
    query = "(" + " OR ".join(f"from:{h}" for h in WATCH) + f") since_time:{since_time}"
    r = requests.get(
        "https://api.twitterapi.io/twitter/tweet/advanced_search",
        params={"query": query, "queryType": "Latest"},
        headers=HEADERS,
        timeout=30,
    )
    r.raise_for_status()
    return r.json().get("tweets") or []


def notify(post):
    author = (post.get("author") or {}).get("userName", "?")
    text = (post.get("text") or "").replace("\n", " ")
    msg = f"*@{author}* posted: {text[:200]}\n{post.get('url')}"
    requests.post(SLACK, json={"text": msg}, timeout=15).raise_for_status()


if __name__ == "__main__":
    since = load_since()
    started = int(time.time())
    posts = new_posts(since)
    for p in sorted(posts, key=lambda t: t.get("id", "")):
        if p.get("isReply"):
            continue  # drop replies; remove this line to keep them
        notify(p)
    with open(STATE_FILE, "w") as f:
        json.dump({"since_time": started}, f)
    print(f"{len(posts)} new posts checked")
05 — Section

Route 3: let the API push tweet notifications to you (webhook rule)

Instead of asking every minute, you register a rule once and the API calls you. On twitterapi.io the rule lives in the tweet filter: POST /oapi/tweet_filter/add_rule with a tag (your label), a value (the same search syntax as above, for example from:NASA OR from:SpaceX), and an interval_seconds that sets how often the rule is evaluated. A new rule is created inactive; activate it with POST /oapi/tweet_filter/update_rule, and set the HTTPS callback URL for your rules in the dashboard. From then on, each post that matches is sent to your endpoint as a JSON POST. Billing follows the checks: every evaluation of the rule costs at least $0.00015 (15 credits), and matched posts $0.00015 each, so interval_seconds sets the floor of the bill. There is also a dedicated account monitor, POST /oapi/x_user_stream/add_user_to_monitor_tweet with an x_user_name body field, that watches an account's posts, quotes, replies, and reposts; the docs for both are in the sources.

The part people get stuck on is the receiving end, not the rule: among TwitterAPI.io users who have set a webhook, over a third still point it at a test address such as a webhook.site URL or an ngrok tunnel (based on anonymized, aggregated API usage on TwitterAPI.io). The receiver below is a complete, deployable endpoint in about 25 lines of Flask. Deploy it anywhere that gives you a public HTTPS URL (a small VPS, Railway, Render, or a serverless function), put that URL in the dashboard, and forward each post to Slack.

Three rules for a receiver that stays healthy. Return 200 within one second and do slow work after responding: TwitterAPI.io's push times out after 1 second and is not retried, so a slow handler loses that batch. De-duplicate on the post ID anyway, because two overlapping rules can deliver the same post twice. And log the raw body for the first day, so you can see the exact payload shape before you depend on any field.

python
"""Step 1: register and activate a filter rule (run once)."""
import os
import requests

HEADERS = {"X-API-Key": os.environ["TWITTERAPI_IO_KEY"]}
BASE = "https://api.twitterapi.io"

# Create the rule: same search syntax as advanced search
r = requests.post(
    f"{BASE}/oapi/tweet_filter/add_rule",
    headers=HEADERS,
    json={"tag": "space-agencies", "value": "from:NASA OR from:SpaceX OR from:ESA", "interval_seconds": 60},
    timeout=30,
)
r.raise_for_status()
rule_id = r.json().get("rule_id")
print("rule created:", rule_id)

# Rules start inactive: activate it
r = requests.post(
    f"{BASE}/oapi/tweet_filter/update_rule",
    headers=HEADERS,
    json={"rule_id": rule_id, "tag": "space-agencies", "value": "from:NASA OR from:SpaceX OR from:ESA", "interval_seconds": 60, "is_effect": 1},
    timeout=30,
)
r.raise_for_status()
print("activated:", r.json())

# Set the HTTPS callback URL for your rules in the twitterapi.io dashboard (Webhook settings).


"""Step 2: the receiver (deploy as app.py; pip install flask requests)."""
# import os, requests
# from flask import Flask, request
#
# app = Flask(__name__)
# SLACK = os.environ["SLACK_WEBHOOK_URL"]
# seen = set()  # swap for Redis or a DB table in production
#
# @app.post("/x-webhook")
# def x_webhook():
#     body = request.get_json(silent=True) or {}
#     posts = body.get("tweets") or ([body] if body.get("id") else [])
#     for p in posts:
#         if p.get("id") in seen:
#             continue
#         seen.add(p.get("id"))
#         author = (p.get("author") or {}).get("userName", "?")
#         requests.post(SLACK, json={"text": f"@{author}: {(p.get('text') or '')[:200]} {p.get('url')}"}, timeout=10)
#     return "ok", 200   # respond fast; do slow work after the response
#
# if __name__ == "__main__":
#     app.run(host="0.0.0.0", port=int(os.environ.get("PORT", 8000)))
06 — Section

Route 4: a fixed list of accounts, delivered in seconds (Twitter Stream)

If what you watch is a set list of accounts rather than keywords, TwitterAPI.io's Twitter Stream product is the subscription alternative: you add the accounts once, and their new posts are pushed to your webhook, typically within seconds. You pay a flat monthly price per plan instead of per call, so the check interval stops mattering.

PlanPer monthAccounts includedEach extra account
Starter$296$5
Growth$7920$4
Professional$14950$3
Enterprise$299150$2
Enterprise Plus$499500$1
Scale$9992,000$0.50

How it compares with polling the search API yourself, using the prices above: 6 accounts polled every 60 seconds (one OR query) cost about $6.50 a month, so polling is cheaper if a minute's delay is fine; to get close to the stream's seconds-level delivery you would poll every 5 seconds, about $78 a month, and the $29 plan wins. At 500 accounts, the 512-character query limit means about 25 OR queries per round: roughly $160 a month at a 60-second interval, against $499 for the stream with seconds-level delivery and nothing to schedule.

Rule of thumb: keywords and searches, poll the API (recommended) or use a webhook rule; a fixed account list where speed matters, use the stream. Plans and the current per-account price are on the Twitter Stream page.

07 — Section

What tweet notifications cost per day

Here is the arithmetic behind the chart above, for a watch list of five accounts that together post 20 times a day. Prices: twitterapi.io $0.15 per 1,000 posts returned ($0.00015 each), $0.00015 minimum per call, also charged for every filter-rule check; official X API pay-per-use $0.005 per post read (docs.x.com, checked in 2026).

RouteCalls per dayPosts returned or deliveredDaily cost
Bell in the X app0n/aFree
Polling every 60 s (twitterapi.io)1,440201,440 x $0.00015 + 20 x $0.00015 = about $0.22
Polling every 5 min (twitterapi.io)28820288 x $0.00015 + 20 x $0.00015 = about $0.05
Webhook rule, 60 s checks (twitterapi.io)1,440 checks run for you20 delivered1,440 x $0.00015 ≈ $0.22
Polling every 60 s, official X API, if each call returned the last 5 posts1,4407,200 reads7,200 x $0.005 = $36 (plus the developer tier)
Polling every 60 s, official X API, if only new posts are returned1,44020 reads20 x $0.005 = $0.10 (plus the developer tier)

The official-API rows span a wide range because its search endpoint charges per post returned and does not have a per-call minimum; with a tight since_id you pay for new posts only, but you still need a paid developer tier before the first call. On the third-party side, the minimum charge is the cost of asking; a webhook rule moves the asking to the provider's side, but each check is still billed. For most teams the deciding number is not the dollars, which are small either way, but the latency and the ten minutes of setup.

08 — Section

Which route should you use?

You follow the account and your phone is where you want the alert. Use the bell. Nothing else is simpler. If you want the alert as a text message, for an account you do not follow, or with replies and reposts filtered out, the Twitter to SMS guide wires the same polling loop to Twilio's Messages API and measures what ten organization accounts would cost in texts a month.

You want alerts for 2 to 50 accounts in a Slack channel, and a minute of delay is fine. Run the polling script from cron or GitHub Actions. No servers, no endpoint, pennies a day.

You need keywords, cashtags, or accounts you do not follow. Polling or webhook; the bell cannot do it. Start with polling to tune the query, then move the same value into a rule.

You can't or don't want to run a scheduler. Webhook rule. At the same check interval it costs about the same as polling and delivers the same posts; you give up the request-level logs and control you get from polling your own query, in exchange for nothing to host but the receiver.

You are tracking a single high-stakes account (a regulator, a company you hold, a news desk). Use both: the bell for the human, the webhook for the system, and compare them for a week; the API route will usually be ahead.

You want to notify a whole team. Anything but the bell; the bell is personal to each account and device.

You watch a fixed list of accounts and need posts within seconds. Twitter Stream subscription: a flat monthly price per plan (from $29 for 6 accounts), no per-call cost, nothing to schedule.

python
"""Tweet notifications by email: new posts from a watch list since the last run, sent via SMTP.

Run every minute (cron) or every 5 minutes (GitHub Actions schedule).
Needs TWITTERAPI_IO_KEY, SMTP_HOST, SMTP_USER, SMTP_PASS, MAIL_TO in the environment.
"""
import json
import os
import smtplib
import time
from email.message import EmailMessage

import requests

HEADERS = {"X-API-Key": os.environ["TWITTERAPI_IO_KEY"]}
WATCH = ["NASA", "SpaceX"]
STATE_FILE = "notify-email-state.json"


def since_time():
    if os.path.exists(STATE_FILE):
        with open(STATE_FILE) as f:
            return json.load(f)["since_time"]
    return int(time.time()) - 600


def fetch(since):
    query = "(" + " OR ".join(f"from:{h}" for h in WATCH) + f") since_time:{since}"
    r = requests.get(
        "https://api.twitterapi.io/twitter/tweet/advanced_search",
        params={"query": query, "queryType": "Latest"},
        headers=HEADERS,
        timeout=30,
    )
    r.raise_for_status()
    return [t for t in (r.json().get("tweets") or []) if not t.get("isReply")]


def send_email(posts):
    msg = EmailMessage()
    msg["Subject"] = f"{len(posts)} new post(s) from your X watch list"
    msg["From"] = os.environ["SMTP_USER"]
    msg["To"] = os.environ["MAIL_TO"]
    lines = []
    for p in posts:
        author = (p.get("author") or {}).get("userName", "?")
        lines.append(f"@{author} ({p.get('createdAt')})\n{p.get('text')}\n{p.get('url')}\n")
    msg.set_content("\n".join(lines))
    with smtplib.SMTP_SSL(os.environ["SMTP_HOST"], 465) as s:
        s.login(os.environ["SMTP_USER"], os.environ["SMTP_PASS"])
        s.send_message(msg)


if __name__ == "__main__":
    started = int(time.time())
    posts = fetch(since_time())
    if posts:
        send_email(posts)
    with open(STATE_FILE, "w") as f:
        json.dump({"since_time": started}, f)
    print(f"{len(posts)} new posts")

Researching this?Free starter credits cover end-to-end testing — Google sign-in, no card. Get a key.

09 — Questions

Questions readers ask

How do I turn on notifications for a specific account on X?

Follow the account, open its profile, tap the bell icon next to the Follow button, and choose All posts or Only posts with live video. Then make sure push notifications are enabled under Settings and privacy, Notifications, Preferences, and that your phone allows the X app to send notifications.

Why am I not getting tweet notifications even though the bell is on?

Usually push is off somewhere along the chain: the phone's notification permission for X, the app's Push notifications preference, or a Do Not Disturb or focus mode. Also check that you still follow the account; unfollowing clears the bell. X sometimes batches a burst of posts into one notification and can delay pushes by a few minutes.

Can I get notified when someone tweets without following them?

Not with the bell. You can with API read calls: a polling script that searches from:handle with a since_time every minute, or a webhook rule that pushes each new post to your endpoint. Neither needs you to follow the account or to use your own X account at all.

Can I get tweet notifications for a keyword or hashtag?

The X app has no keyword alerts. Use the same two API routes with a keyword query instead of from: operators, for example a phrase in quotes with lang:en and min_faves: to cut noise. The alerts-for-keywords guide linked on this page covers query design.

How do I get tweet notifications in Slack or by email?

Run the polling script on this page every minute; it posts new matches to a Slack incoming webhook, and the end-to-end example at the bottom sends them by email instead. For faster delivery, register a webhook rule and forward each delivered post to Slack from your endpoint.

How much does it cost to monitor a Twitter account with the API?

On twitterapi.io, polling a watch list every 60 seconds costs about $0.22 a day, mostly the $0.00015 minimum per call on empty checks; every 5 minutes about $0.05 a day; a webhook rule checking every 60 seconds costs about the same, because each check is billed whether or not it finds posts. The official X API charges $0.005 per post read and requires a paid developer tier.

How fast are API tweet notifications compared with the bell?

A polling script is as fresh as its interval, typically 60 seconds. A webhook rule evaluates on the interval you set and delivers within seconds of a match. The bell is usually fast but can be batched or delayed by a few minutes, and gives no guarantee.

10 — Further reading

Continue

Sources & further reading
More from this series

Writing about something you built with TwitterAPI.io? Our community rewards program pays API credits for honest tutorials, build logs and videos.

Build it

Stop reading. Start building.

Starter credits cover real testing on real data. Google sign-in, no card, no application queue.

Get an API key

Already building with TwitterAPI.io? Publish an honest tutorial or build log about it and earn up to $200 a month in API credits.