Raw Reddit mentions are noise without context. The complaint all over r/DigitalMarketingHack is the same: F5Bot emails you every time your keyword appears (free, up to 200 keywords, great for that), but half the "mentions" are neutral, and some "positive" ones are actually subtle complaints. The missing layer is sentiment and intent, is this person recommending you, asking about you, or warning others off you? Paid suites add that (Brand24 from $249/mo, Mentionlytics from $69/mo). This tutorial builds the same layer yourself: pull mentions with Scavio's Reddit search endpoint (2 credits per query, returns threads and scores), then classify each with an LLM. You keep F5Bot for instant alerts and add the context it cannot.
Prerequisites
- A Scavio API key (50 free credits, no card)
- Python 3.9+ or Node 18+
- An LLM you can call for classification (Claude, GPT, or local)
Walkthrough
Step 1: Pull recent mentions for your brand keyword
The Reddit search endpoint returns matching threads with their scores and subreddits. Search your brand name plus a couple of variants. This costs 2 credits per query because Reddit responses are data-heavy.
import os, requests
H = {"Authorization": f"Bearer {os.environ['SCAVIO_API_KEY']}", "Content-Type": "application/json"}
r = requests.post("https://api.scavio.dev/api/v1/reddit/search",
headers=H, json={"query": "your brand name"}).json()
threads = r["data"]["results"]Step 2: Classify each mention for sentiment and intent
Send each thread title and snippet to your LLM with a tight prompt: return sentiment (positive, neutral, negative) and intent (recommendation, question, complaint, comparison). This is the layer F5Bot lacks, you are turning raw mentions into something you can triage.
def classify(title, snippet):
prompt = f"""Classify this Reddit mention.
Return JSON: {{"sentiment": "positive|neutral|negative", "intent": "recommendation|question|complaint|comparison"}}
Title: {title}
Snippet: {snippet}"""
# call your LLM, parse the JSON it returns
return llm_json(prompt)Step 3: Pull full thread context before you reply
For anything flagged negative or a comparison, fetch the full post with comments using the reddit/post endpoint. Context is everything, a "negative" mention is sometimes a fixed bug someone is thanking you for. Only escalate after you have read the thread.
post = requests.post("https://api.scavio.dev/api/v1/reddit/post",
headers=H, json={"url": threads[0]["url"]}).json()Step 4: Route by priority, not by volume
Negative complaints and comparison threads go to a human now. Recommendations get logged as social proof. Neutral questions can get a templated nudge. You have replaced a flood of identical alerts with a triaged queue, which is the actual job.
Python Example
import os, requests
H = {"Authorization": f"Bearer {os.environ['SCAVIO_API_KEY']}", "Content-Type": "application/json"}
def monitor(brand):
r = requests.post("https://api.scavio.dev/api/v1/reddit/search",
headers=H, json={"query": brand}).json()
out = []
for t in r["data"]["results"]:
tag = classify(t["title"], t.get("selftext", "")) # your LLM call
out.append({"url": t["url"], "score": t["score"], **tag})
return sorted(out, key=lambda x: x["sentiment"] == "negative", reverse=True)
print(monitor("your brand name"))JavaScript Example
const H = { Authorization: `Bearer ${process.env.SCAVIO_API_KEY}`, "Content-Type": "application/json" };
async function monitor(brand) {
const res = await fetch("https://api.scavio.dev/api/v1/reddit/search", {
method: "POST", headers: H, body: JSON.stringify({ query: brand }),
});
const { data } = await res.json();
const tagged = [];
for (const t of data.results) {
const tag = await classify(t.title, t.selftext || ""); // your LLM call
tagged.push({ url: t.url, score: t.score, ...tag });
}
return tagged.sort((a, b) => (b.sentiment === "negative") - (a.sentiment === "negative"));
}Expected Output
A triaged list of Reddit mentions, each tagged with sentiment and intent, sorted so complaints and comparison threads surface first, instead of a flat stream of every keyword hit.