Brand Mention Monitor for Reddit and X, with Webhooks
Build a brand mention monitor for Reddit and X: one keyword monitor, a signed webhook receiver in Python, and what it costs a month at real volumes.
Weir Team
Published · Updated · 7 min read
A brand mention monitor searches Reddit and X on a schedule, keeps only new mentions, and posts them to your webhook.
This tutorial builds one with Weir's monitor and webhook endpoints. You get one monitor for both platforms, a Python receiver that checks signatures, and a cost estimate. Weir is our product.
Paste this to start watching your brand on both platforms:
curl --request POST --url https://api.weirapp.io/v1/monitors \
--header "Authorization: Bearer $WEIR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"name": "Acme mentions", "schedule": "daily",
"target": {"kind": "search", "query": "\"acme analytics\"", "sources": ["reddit", "x"]}}'
- Create a webhookYour HTTPS endpoint, with a secret shown once.
- Create a monitorA search across Reddit and X, pointed at the webhook.
- Verify each deliveryCheck the signature on the raw body.
- Forward mentionsSend each one to Slack, a database or a ticket queue.
Step 1: Create the webhook
Create the webhook first, so the monitor can point at it. You need a Weir API key in WEIR_API_KEY and a public HTTPS URL.
Only want alerts in Slack, Discord or Telegram? Then you need no receiver: use the chat app's webhook link as the url, and Weir posts readable messages there. The steps below are for your own server.
curl --request POST --url https://api.weirapp.io/v1/webhooks \
--header "Authorization: Bearer $WEIR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"name": "Brand mentions", "url": "https://hooks.example.com/weir",
"events": ["monitor.result.created"]}'
The response's data holds the webhook id and a secret.
The secret is shown once and can't be recovered, so put it in WEIR_WEBHOOK_SECRET now.
monitor.result.created fires when a run finds something new. Subscribe to monitor.run.failed too: it arrives when a run fails after its retries. A monitor's /runs lists every run.
Step 2: Create a Reddit and X keyword monitor
Run the curl from the top of this post, with "webhookId" set to the webhook's id. You can also add it later with PATCH /v1/monitors/{id}.
| Field | Values |
|---|---|
target.kind |
search, subreddit, subreddit_comments, reddit_user, x_user, reddit_thread, x_thread |
target.sources |
reddit, x, or both |
schedule |
manual, 15min and hourly (paid tiers), daily, weekly |
webhookId |
The webhook's id, or null |
Five things matter for brand monitoring:
- Quote multi-word brand names. You pay for every result, irrelevant ones included.
- "New" means new content, not a new id. A repost of the same text doesn't alert you twice.
- Reddit search skips comments. Add a
subreddit_commentsmonitor with your brand as itsqueryfor busy communities. - Each run reads one page of new X matches, about 20 posts. A brand mentioned more often than that between runs needs hourly runs or a narrower query.
- The free tier allows one monitor and one webhook. Hourly needs a paid tier, which starts with any $5 purchase.
Test it without waiting for the schedule. The run call answers 202 and runs in the background:
curl --request POST --url "https://api.weirapp.io/v1/monitors/$MONITOR_ID/run" \
--header "Authorization: Bearer $WEIR_API_KEY"
curl --url "https://api.weirapp.io/v1/monitors/$MONITOR_ID/results?limit=10" \
--header "Authorization: Bearer $WEIR_API_KEY"
Each stored result has source, itemType, url, title, body, authorHandle, communityName and firstSeenAt. Triggering runs and reading results cost nothing.
Step 3: Verify the webhook signature
Each delivery is a POST with three headers: weir-signature, weir-timestamp and weir-event-id.
The signature is HMAC-SHA256(secret, "{timestamp}.{eventId}.{rawBody}"), hex encoded. Three rules decide whether your check works:
- Hash the raw body bytes. Parsing and re-serialising JSON reorders keys and breaks the signature.
- Reject a timestamp more than five minutes from now, so a delivery can't be replayed.
- Compare in constant time.
Here is the check from Weir's docs:
import hashlib, hmac, os, time
def verify_weir(raw_body: bytes, signature: str, timestamp: str, event_id: str) -> bool:
try:
if abs(time.time() - int(timestamp)) > 300:
return False
except ValueError:
return False
message = f"{timestamp}.{event_id}.".encode() + raw_body
secret = os.environ["WEIR_WEBHOOK_SECRET"].encode()
expected = hmac.new(secret, message, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected.encode(), signature.encode())
And a Flask receiver that uses it:
import json
from flask import Flask, abort, request
app, seen = Flask(__name__), set() # keep seen ids in a database in production
@app.post("/weir")
def weir_webhook():
raw, h = request.get_data(), request.headers # the exact bytes that were signed
if not verify_weir(raw, h.get("weir-signature", ""), h.get("weir-timestamp", ""), h.get("weir-event-id", "")):
abort(400)
event = json.loads(raw)
if event["id"] not in seen: # deliveries are at least once
seen.add(event["id"])
for item in event.get("data", {}).get("results", []):
print(item["url"], item.get("title") or item.get("text", "")[:120])
return "", 200
The body carries up to 25 new items in data.results, each in its platform's own shape:
{
"id": "evt_…",
"type": "monitor.result.created",
"data": { "kind": "search", "itemType": "post", "newResults": 3, "results": [] }
}
A Reddit post has title, selftext, subreddit and url. An X post has text, author.username and url. The monitor docs have the same check in Node and Go.
POST /v1/webhooks/{id}/test sends a real signed test delivery, free.
Step 4: Design for how deliveries behave
Your receiver has to cope with retries and duplicates:
- At least once. The same delivery can arrive twice with the same
weir-event-id. - Respond within 10 seconds. Return
2xxfirst, then do the slow work. - Retries back off over about nine hours. A
4xxother than429is not retried. - 20 failures in a row disable the webhook. One success resets the count.
- One delivery per run, up to 25 items. Read the rest with
GET /v1/monitors/{id}/results.
The exact retry times and a full signed delivery are on our social listening webhooks page.
What does brand monitoring cost per month?
A run costs 1 credit plus the rate for each new result. An X post is 1 credit; a Reddit post or comment is 3. Mentions already reported cost nothing.
Two worked examples, with assumed volumes you should swap for yours:
The small brand pays 59 credits a run, inside the free grant.
The busier brand pays 414 credits a day. After the free 5,000, it buys 7,420 credits a month.
The official X API charges $0.005 per post read, as of October 2026. It is still the right choice if you need a contract with X. Our X API pricing breakdown has the details, and Weir's packs are on the pricing page.
Alternative: poll the search endpoints yourself
Polling makes sense if you already run a scheduler or need intervals under an hour.
X has a clean resume point. POST /v1/x/search takes sinceId, so store the newest id you've seen:
import os, requests
API = "https://api.weirapp.io"
HEADERS = {"Authorization": f"Bearer {os.environ['WEIR_API_KEY']}"}
def new_x_mentions(since_id=None):
body = {"phrase": "acme analytics", "onlyOriginal": True,
"excludeWords": ["hiring"], "sort": "latest", "limit": 50}
if since_id:
body["sinceId"] = since_id
r = requests.post(f"{API}/v1/x/search", json=body, headers=HEADERS, timeout=30)
r.raise_for_status() # a 402 means out of credits: only a top-up fixes it
posts = r.json()["data"]
return posts, max((p["id"] for p in posts), key=int, default=since_id)
Reddit's search has no sinceId. Ask for sort: "new" in a short time window, and drop ids you've already seen.
When not to use Weir monitors
- You need real time. Monitors run every 15 minutes at best, and daily on the free tier.
- You need a contract with X or Reddit. Weir is not licensed by Reddit, so access can change.
- You need private data. Weir reads public posts only, never DMs or locked accounts.
- You store mentions long term. Check the platforms' terms and your privacy rules first. This isn't legal advice.
For the Reddit side on its own, see the Reddit API alternative page.
FAQ
How do I get alerts when my brand is mentioned on Reddit?
Not with Weir right now: its Reddit source has been refused upstream since early November 2026. F5Bot's free plan emails Reddit keyword matches, and our F5Bot alternatives guide compares paid options.
Can one monitor watch Reddit and X together?
Yes. A search target takes sources: ["reddit", "x"] and one query. Reddit returns nothing for now, but X results still arrive. Each delivery keeps each platform's own fields, so check for subreddit or text when you route items.
How often do brand monitors run?
Daily or weekly on the free tier. Hourly and 15-minute runs need a paid tier, which starts with your first $5 purchase. For anything faster, poll the search endpoints from your own scheduler.
Why does my webhook signature check fail?
Usually because the code hashes parsed JSON instead of the raw body. Parsing reorders keys. Use request.get_data() in Flask or express.raw in Express, and sign timestamp.eventId.rawBody.
Sources
- Weir docs, Monitors and webhooks (checked October 2026): https://docs.weirapp.io/monitors
- Weir docs, Billing and credits (checked October 2026): https://docs.weirapp.io/billing
- X API pay-per-use pricing (checked October 2026): https://docs.x.com/x-api/getting-started/pricing