You can monitor Reddit for brand mentions by searching with platform set to reddit in the Scavio search API, filtering new posts since the last run, and posting alerts to Slack when mentions are found.
Prerequisites
- Python 3.9+
- Scavio API key
- Slack webhook URL (optional)
Walkthrough
Step 1: Search Reddit for brand mentions
Set platform:reddit to restrict results to Reddit posts and comments.
import requests
API_KEY = "your-scavio-api-key"
def search_reddit(brand: str, num_results: int = 20) -> list:
r = requests.post(
"https://api.scavio.dev/api/v1/search",
json={"query": brand, "platform": "reddit", "num_results": num_results},
headers={"x-api-key": API_KEY},
timeout=15
)
r.raise_for_status()
return r.json().get("organic_results", [])
mentions = search_reddit("YourBrand")
for m in mentions:
print(m.get("title"), m.get("link"))Step 2: Deduplicate with SQLite
Store seen URLs so you only alert on new mentions.
import sqlite3
def init_db(path="reddit_mentions.db"):
conn = sqlite3.connect(path)
conn.execute("""
CREATE TABLE IF NOT EXISTS seen (
url TEXT PRIMARY KEY,
title TEXT,
first_seen TEXT
)
""")
conn.commit()
return conn
def filter_new(conn, mentions: list) -> list:
from datetime import date
new = []
for m in mentions:
url = m.get("link", "")
exists = conn.execute("SELECT 1 FROM seen WHERE url=?", (url,)).fetchone()
if not exists:
conn.execute("INSERT INTO seen VALUES (?, ?, ?)",
(url, m.get("title"), str(date.today())))
new.append(m)
conn.commit()
return newStep 3: Send Slack alert for new mentions
Post each new mention as a Slack message via webhook.
import json
def send_slack_alert(webhook_url: str, brand: str, mention: dict):
message = {
"text": f"*New Reddit mention of {brand}*",
"blocks": [
{"type": "section", "text": {"type": "mrkdwn",
"text": f"*<{mention['link']}|{mention['title'][:100]}>*"}},
{"type": "section", "text": {"type": "mrkdwn",
"text": mention.get("snippet", "")[:300]}}
]
}
requests.post(webhook_url, json=message, timeout=10)Step 4: Run as a daily cron
Save as reddit_monitor.py and schedule: 0 8 * * * python /path/to/reddit_monitor.py
BRAND = "YourBrand"
SLACK_WEBHOOK = "https://hooks.slack.com/services/xxx/yyy/zzz" # or None
conn = init_db()
mentions = search_reddit(BRAND, num_results=20)
new_mentions = filter_new(conn, mentions)
print(f"Found {len(new_mentions)} new mentions of '{BRAND}'")
for m in new_mentions:
print(f" {m['title'][:80]}")
print(f" {m['link']}")
if SLACK_WEBHOOK:
send_slack_alert(SLACK_WEBHOOK, BRAND, m)Python Example
import requests
import sqlite3
from datetime import date
API_KEY = "your-scavio-api-key"
BRAND = "YourBrand"
SLACK_WEBHOOK = None # Set to your Slack webhook URL
def search_reddit(brand, n=20):
r = requests.post("https://api.scavio.dev/api/v1/search",
json={"query": brand, "platform": "reddit", "num_results": n},
headers={"x-api-key": API_KEY}, timeout=15)
r.raise_for_status()
return r.json().get("organic_results", [])
def init_db(path="reddit_mentions.db"):
conn = sqlite3.connect(path)
conn.execute("CREATE TABLE IF NOT EXISTS seen (url TEXT PRIMARY KEY, title TEXT, first_seen TEXT)")
conn.commit()
return conn
def get_new(conn, mentions):
new = []
for m in mentions:
url = m.get("link","")
if not conn.execute("SELECT 1 FROM seen WHERE url=?", (url,)).fetchone():
conn.execute("INSERT INTO seen VALUES (?,?,?)", (url, m.get("title"), str(date.today())))
new.append(m)
conn.commit()
return new
def alert(webhook, brand, m):
if not webhook: return
requests.post(webhook, json={"text": f"New Reddit mention of {brand}: <{m['link']}|{m['title'][:100]}>"}, timeout=10)
if __name__ == "__main__":
conn = init_db()
mentions = search_reddit(BRAND)
new = get_new(conn, mentions)
print(f"[{date.today()}] {BRAND}: {len(new)} new mentions (of {len(mentions)} total)")
for m in new:
print(f" r/{m.get('source_subreddit','?')} | {m['title'][:70]}")
print(f" {m['link']}")
alert(SLACK_WEBHOOK, BRAND, m)JavaScript Example
const API_KEY = 'your-scavio-api-key';
async function searchReddit(brand, n = 20) {
const res = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'x-api-key': API_KEY },
body: JSON.stringify({ query: brand, platform: 'reddit', num_results: n })
});
const data = await res.json();
return data.organic_results ?? [];
}
const mentions = await searchReddit('YourBrand');
for (const m of mentions.slice(0, 5)) {
console.log(`${m.title?.slice(0, 80)}`);
console.log(` ${m.link}`);
}Expected Output
[2026-05-22] YourBrand: 3 new mentions (of 18 total)
r/SaaS | Has anyone tried YourBrand for team project management?
https://reddit.com/r/SaaS/comments/abc123/
r/entrepreneur | YourBrand vs Notion - which is better for solo founders?
https://reddit.com/r/entrepreneur/comments/def456/
r/productivity | YourBrand just launched a new AI feature
https://reddit.com/r/productivity/comments/ghi789/