Tutorial

How to Monitor Brand Mentions on Reddit in Real Time

Build a real-time Reddit brand monitoring system using the Scavio API. Track mentions, score sentiment, and alert on new discussions about your brand.

Reddit is where honest product discussions happen. Users share unfiltered opinions about tools, services, and companies without the marketing polish of official channels. Monitoring these mentions gives you early warning of customer complaints, product feedback, and competitive comparisons. This tutorial builds a real-time Reddit monitoring system that searches for brand mentions, tracks new posts, scores them by engagement, and outputs actionable alerts.

Prerequisites

  • Python 3.8 or higher
  • requests library installed
  • A Scavio API key
  • Brand names and product names to monitor

Walkthrough

Step 1: Define monitoring targets

List all brand name variations, product names, and competitor names to track. Include common misspellings.

Python
MONITOR = {
    "brand": ["mycompany", "my-company", "mycompany.io"],
    "product": ["myproduct", "my product"],
    "competitors": ["competitor-a", "competitor-b"],
}

Step 2: Search Reddit for each keyword

Query the Scavio Reddit search endpoint for each keyword, sorted by new to catch recent posts.

Python
def search_reddit(keyword: str) -> list[dict]:
    r = requests.post(
        "https://api.scavio.dev/api/v1/reddit/search",
        headers={"Authorization": f"Bearer {API_KEY}"},
        json={"query": keyword, "sort": "new"},
        timeout=30
    )
    r.raise_for_status()
    return r.json()["data"]["posts"]

Step 3: Score posts by engagement

Calculate an engagement score based on upvotes, comment count, and subreddit activity level.

Python
def engagement_score(post: dict) -> int:
    score = int(post.get("score", 0) or 0)
    comments = int(post.get("num_comments", 0) or 0)
    return score + comments * 3

Step 4: Generate alert report

Combine all mentions, deduplicate, sort by engagement score, and output a priority-ranked alert list.

Python
def monitor_all() -> list[dict]:
    all_posts = []
    seen_ids = set()
    for category, keywords in MONITOR.items():
        for kw in keywords:
            posts = search_reddit(kw)
            for p in posts:
                if p["id"] not in seen_ids:
                    seen_ids.add(p["id"])
                    p["category"] = category
                    p["matched_keyword"] = kw
                    p["engagement"] = engagement_score(p)
                    all_posts.append(p)
    return sorted(all_posts, key=lambda x: x["engagement"], reverse=True)

Python Example

Python
import os
import requests

API_KEY = os.environ["SCAVIO_API_KEY"]
KEYWORDS = ["scavio", "scavio api", "scavio.dev"]

def search(kw: str) -> list[dict]:
    r = requests.post("https://api.scavio.dev/api/v1/reddit/search",
                      headers={"Authorization": f"Bearer {API_KEY}"},
                      json={"query": kw, "sort": "new"}, timeout=30)
    r.raise_for_status()
    return r.json()["data"]["posts"]

def monitor():
    seen = set()
    all_posts = []
    for kw in KEYWORDS:
        for p in search(kw):
            if p["id"] not in seen:
                seen.add(p["id"])
                all_posts.append(p)
    all_posts.sort(key=lambda x: int(x.get("score", 0) or 0), reverse=True)
    for p in all_posts[:10]:
        print(f"[{p.get('score', 0):>4}] r/{p['subreddit']}: {p['title']}")
        print(f"       {p['url']}")

if __name__ == "__main__":
    monitor()

JavaScript Example

JavaScript
const API_KEY = process.env.SCAVIO_API_KEY;
const KEYWORDS = ["scavio", "scavio api"];

async function search(kw) {
  const r = await fetch("https://api.scavio.dev/api/v1/reddit/search", {
    method: "POST",
    headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
    body: JSON.stringify({ query: kw, sort: "new" })
  });
  return (await r.json()).data.posts;
}

async function main() {
  const seen = new Set();
  const posts = [];
  for (const kw of KEYWORDS) {
    for (const p of await search(kw)) {
      if (!seen.has(p.id)) { seen.add(p.id); posts.push(p); }
    }
  }
  posts.sort((a, b) => (b.score || 0) - (a.score || 0));
  posts.slice(0, 10).forEach(p => console.log(`[${p.score}] r/${p.subreddit}: ${p.title}`));
}
main().catch(console.error);

Expected Output

JSON
[  47] r/SaaS: Has anyone used scavio for SERP data? Review inside
       https://reddit.com/r/SaaS/comments/...
[  23] r/devtools: scavio vs serpapi for building AI agents
       https://reddit.com/r/devtools/comments/...
[  12] r/webdev: Scavio API - real-time search for developers
       https://reddit.com/r/webdev/comments/...

Related Tutorials

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Python 3.8 or higher. requests library installed. A Scavio API key. Brand names and product names to monitor. A Scavio API key gives you 500 free credits per month.

Yes. The free tier includes 500 credits per month, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Start Building

Build a real-time Reddit brand monitoring system using the Scavio API. Track mentions, score sentiment, and alert on new discussions about your brand.