ScavioScavio
FeaturesPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Track Brand Mentions on Reddit
Tutorial

How to Track Brand Mentions on Reddit

Track Reddit mentions of your brand with Python. Build a scheduled tracker that records post id, subreddit, score, and timestamp for trend reports.

Get Free API KeyAPI Docs

Reddit is where your users talk about you without a marketing filter. This tutorial builds a brand-mention tracker that records every post containing your brand name and writes it to a CSV you can load into a BI tool. It is a lightweight alternative to enterprise social listening suites and costs 2 credits per run.

Prerequisites

  • Python 3.8+
  • requests library
  • A Scavio API key
  • A list of brand keywords (product names, misspellings, handles)

Walkthrough

Step 1: Define the keywords to track

Include common misspellings and product names. Each keyword is one search request.

Python
KEYWORDS = ["scavio", "scavio api", "scavio.dev"]

Step 2: Fetch posts for each keyword

Loop over keywords, sort by new, and collect the posts into a single list.

Python
import os, requests

KEY = os.environ["SCAVIO_API_KEY"]

def search(q):
    r = requests.post(
        "https://api.scavio.dev/api/v1/reddit/search",
        headers={"Authorization": f"Bearer {KEY}"},
        json={"query": q, "sort": "new"},
        timeout=30,
    )
    return r.json()["data"]["posts"]

posts = []
for k in KEYWORDS:
    posts.extend(search(k))

Step 3: Write to CSV

One row per post with the fields you want to trend over time.

Python
import csv

with open("brand_mentions.csv", "w", newline="") as f:
    w = csv.writer(f)
    w.writerow(["id", "subreddit", "author", "title", "timestamp", "url"])
    for p in posts:
        w.writerow([p["id"], p["subreddit"], p["author"], p["title"], p["timestamp"], p["url"]])

Step 4: Schedule it

Run the script on cron or GitHub Actions. Append to the same CSV over time to build a trend dataset.

Bash
# crontab -e
# 0 * * * * /usr/bin/python3 /path/to/track_reddit.py >> /var/log/track_reddit.log 2>&1

Python Example

Python
import os, csv, requests, pathlib

KEY = os.environ["SCAVIO_API_KEY"]
KEYWORDS = ["scavio", "scavio api"]
OUT = pathlib.Path("brand_mentions.csv")

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

def main():
    rows = []
    for k in KEYWORDS:
        for p in search(k):
            rows.append([p["id"], p["subreddit"], p["author"], p["title"], p["timestamp"], p["url"], k])
    new_file = not OUT.exists()
    with OUT.open("a", newline="") as f:
        w = csv.writer(f)
        if new_file:
            w.writerow(["id", "subreddit", "author", "title", "timestamp", "url", "matched_keyword"])
        w.writerows(rows)
    print(f"wrote {len(rows)} rows")

if __name__ == "__main__":
    main()

JavaScript Example

JavaScript
import fs from "node:fs";
const KEY = process.env.SCAVIO_API_KEY;
const KEYWORDS = ["scavio", "scavio api"];
const OUT = "brand_mentions.csv";

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

const rows = [];
for (const k of KEYWORDS) {
  for (const p of await search(k)) {
    rows.push([p.id, p.subreddit, p.author, p.title, p.timestamp, p.url, k]);
  }
}
if (!fs.existsSync(OUT)) {
  fs.writeFileSync(OUT, "id,subreddit,author,title,timestamp,url,matched_keyword\n");
}
fs.appendFileSync(OUT, rows.map((r) => r.map((v) => JSON.stringify(v)).join(",")).join("\n") + "\n");

Expected Output

JSON
wrote 12 rows

brand_mentions.csv:
id,subreddit,author,title,timestamp,url,matched_keyword
t3_1smxyz1,SaaS,marketer42,"Has anyone used scavio?",2026-04-16T09:12:00+0000,https://...,scavio
t3_1smxyz2,devtools,engineer7,"scavio vs serpapi review",2026-04-16T10:40:00+0000,https://...,scavio

Related Tutorials

  • How to Build a Reddit Monitoring Agent
  • How to Analyze Reddit Sentiment with an LLM

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+. requests library. A Scavio API key. A list of brand keywords (product names, misspellings, handles). A Scavio API key gives you 250 free credits per month.

Yes. The free tier includes 250 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.

Related Resources

Best Of

Best Cross-Platform Brand Monitoring APIs in 2026

Read more
Best Of

Best Cross-Platform Brand Monitoring APIs (2026)

Read more
Use Case

Multi-Platform Social Listening

Read more
Solution

Monitor Brand Mentions on Reddit

Read more
Solution

Monitor Your Brand on TikTok Without Enterprise Pricing

Read more
Use Case

Search Surface Brand Monitoring

Read more

Start Building

Track Reddit mentions of your brand with Python. Build a scheduled tracker that records post id, subreddit, score, and timestamp for trend reports.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy