Someone asks Reddit for an alternative to your product, and a competitor's fan answers first. You find out a week later, if at all. Reddit's own notifications only cover your username, not the words people use when they talk about you.
This guide builds a small monitor in Python. It searches Reddit for the brand and competitor names you choose, throws away the noise, and posts each new mention to a Slack or Discord channel through a webhook. It uses one SteadyAPI endpoint and about 90 lines of code.
Prerequisites
- A SteadyAPI API key from steadyapi.com. Read the cost section before you run it on a schedule.
- Python 3.8+ with
requests. - A Slack or Discord incoming webhook URL for the channel that should get the alerts.
How the search endpoint behaves
GET /v1/reddit/search (weight 1) takes a required search term and these optional parameters:
filter:posts(the default) orcomments.sortType:relevance(the default),hot,top,neworcomments.subreddit: limit the search to one community.timeFilter:all,year,month,week,dayorhour.
For monitoring, use sortType=new. I ran searches for a few product names and checked the results:
- A call returns about 22 results, and
meta.cursorwasnull. Plan on one page per search. - Search is fuzzy. For "Supabase", 21 of 22 results actually contained the word. For "Linear app", only 14 of 22 did. Always check the text yourself.
- Posts from search often have no score. Most search results came back with
scoreandnum_commentsset tonull. A mention monitor does not need them. timeFilterdid not change thenewresults. Day and week returned the same posts, so the script filters by age itself.- Comments are a separate search.
filter=commentsreturns fewer results, and each one hasbody,link_title,authorandpermalink.
The monitor
The script runs the search for each keyword twice, once for posts and once for comments. It keeps only results where the keyword appears as a whole word, drops anything older than 24 hours, skips anything it has already sent, and posts the rest to your webhook.
import html
import json
import os
import re
import sys
import time
from datetime import datetime, timezone
from pathlib import Path
import requests
BASE = "https://api.steadyapi.com"
API = f"{BASE}/v1/reddit"
HEADERS = {"Authorization": f"Bearer {os.environ['STEADYAPI_KEY']}"}
WEBHOOK_URL = os.environ["WEBHOOK_URL"] # a Slack or Discord incoming webhook
KEYWORDS = ["Supabase", "Obsidian"] # your brand and your competitors
MAX_AGE_HOURS = 24
POLL_SECONDS = 15 * 60
SEEN_FILE = Path("seen_mentions.json")
def search(term, kind):
"""One search call. kind is 'posts' or 'comments'."""
params = {"search": term, "filter": kind, "sortType": "new"}
for attempt in range(3):
r = requests.get(f"{API}/search", headers=HEADERS, params=params, timeout=60)
if r.status_code in (429, 500, 502, 503):
time.sleep(2 ** attempt)
continue
r.raise_for_status()
data = r.json()
if data.get("success") is False:
return [] # "Please enter a valid search term." means no results
return data["body"]
raise RuntimeError(f"search for {term!r} failed after retries")
def mentions(term):
"""Fresh posts and comments that really contain the term."""
word = re.compile(rf"\b{re.escape(term)}\b", re.IGNORECASE)
now = datetime.now(timezone.utc).timestamp()
for kind in ("posts", "comments"):
for item in search(term, kind):
text = item.get("title", "") + " " + (item.get("selftext") or item.get("body") or "")
if not word.search(text):
continue # Reddit search is fuzzy, so check the text yourself
if now - float(item["created_utc"]) > MAX_AGE_HOURS * 3600:
continue
yield term, kind, item
def format_message(term, kind, item):
where = f"r/{item['subreddit']}"
title = html.unescape(item.get("title") or item.get("link_title") or "")
label = "Post" if kind == "posts" else "Comment"
url = "https://www.reddit.com" + item["permalink"]
return f"[{term}] {label} in {where} by u/{item['author']}: {title}\n{url}"
def notify(text):
# Discord expects "content". Slack expects "text".
payload = {"content": text[:1900]} if "discord" in WEBHOOK_URL else {"text": text}
r = requests.post(WEBHOOK_URL, json=payload, timeout=30)
r.raise_for_status()
def run_once():
order = json.loads(SEEN_FILE.read_text()) if SEEN_FILE.exists() else []
seen = set(order)
sent = 0
for keyword in KEYWORDS:
for term, kind, item in mentions(keyword):
if item["id"] in seen:
continue
notify(format_message(term, kind, item))
seen.add(item["id"])
order.append(item["id"])
sent += 1
SEEN_FILE.write_text(json.dumps(order[-5000:]))
print(f"{datetime.now():%H:%M:%S} sent {sent} new mentions")
if __name__ == "__main__":
if "--once" in sys.argv:
run_once()
else:
while True:
run_once()
time.sleep(POLL_SECONDS)
Set STEADYAPI_KEY and WEBHOOK_URL, then run python monitor.py --once to test. Drop --once to keep it running and poll every 15 minutes. You can also leave --once on and call the script from cron.
I tested this against a local webhook receiver. The first run sent 55 messages for the two keywords. The second run, a few seconds later, sent 0, because every id was already in seen_mentions.json. Each message looks like this in the Slack payload:
{"text": "[Supabase] Post in r/appjet by u/EmergencyAd6707: Appjet Pro is free for Open Source projects\nhttps://www.reddit.com/r/appjet/comments/1xtv5pz/appjet_pro_is_free_for_open_source_projects/"}
Tune it before you trust it
- Expect a flood on the first run. Every mention from the last 24 hours is new. Lower
MAX_AGE_HOURSfor the first run, or run once with the notify call turned off to fillseen_mentions.json. - Use phrases for common words. A brand like "Linear" matches ordinary text. Add a longer keyword such as "Linear app", or add a check for words that must appear nearby.
- Add your own filters. Skip your company's account, your own subreddit, or authors you do not care about before you send.
- Group by keyword. If one competitor floods the channel, send each keyword to its own webhook.
Best practices for webhooks and cost
Slack incoming webhooks take a JSON body with text. Discord takes content, limited to 2,000 characters, so the script trims at 1,900. Keep webhook URLs out of your repository, because anyone who has one can post to your channel.
Each cycle makes 4 search calls here: two keywords, posts and comments. Each is weight 1, so a cycle is 4 requests. SteadyAPI caches identical search requests for about 15 minutes, so polling faster returns the same results. At one cycle every 15 minutes, that is about 11,500 requests a month, which fits the Developer plan ($39.99/mo, 50,000 requests). Hourly polling is about 2,900 a month and fits the Starter plan ($14.99/mo, 10,000 requests). The Free plan's 500 requests a month covers about 125 cycles, so polling every 15 minutes is out of reach on Free. The standard rate limit is 10 requests per second per account, and only HTTP 200 responses count toward your quota.
Bonus: check a mention by asking
If you use Claude Code, Cursor, VS Code, or any MCP client, you can connect it to https://api.steadyapi.com/mcp with your API key. Then you can search Reddit for your product name in plain English before you set up any alerts.
Conclusion
You searched Reddit for brand and competitor names, filtered out fuzzy matches and old posts, remembered what you had sent, and delivered new mentions to Slack or Discord. The same loop works for any keyword list.
Create a free account at steadyapi.com (no card required) and try the monitor with your own product name. The API documentation lists every Reddit parameter with ready-made examples in cURL, JavaScript, PHP, and Python.