ScavioScavio
Pricing
Tools
Sign InsGet Startedg
  1. Home
  2. Tutorials
  3. How to Build a Personal Reddit Monitor
Tutorial

How to Build a Personal Reddit Monitor

Track topics, keywords, and subreddits via API with daily digest email. Python monitoring pipeline at $0.005/query. Prerequisites: Python 3.8+, requests library.

Get Free API KeyAPI Docs

A personal Reddit monitor tracks topics you care about across all subreddits and sends you a daily digest of new discussions. Unlike Reddit notifications, which only work for subscribed communities, this monitor searches across the entire platform for your keywords. Each search costs $0.005, so monitoring 10 keywords daily runs $0.05/day.

Prerequisites

  • Python 3.8+
  • requests library
  • A Scavio API key from scavio.dev
  • Keywords or topics to monitor

Walkthrough

Step 1: Configure monitoring keywords

Set up the keywords and topics you want to track on Reddit.

Python
import os, requests, json, sqlite3, hashlib
from datetime import datetime

API_KEY = os.environ['SCAVIO_API_KEY']
SH = {'Authorization': f'Bearer {API_KEY}', 'Content-Type': 'application/json'}

MONITOR_CONFIG = {
    'keywords': [
        'scavio api', 'serp api recommendation', 'search api for agents',
        'mcp search tool', 'web scraping alternative 2026'
    ],
    'digest_email': '[email protected]',
    'min_relevance': 2  # Minimum keyword matches to include
}

db = sqlite3.connect('reddit_monitor.db')
db.execute('''CREATE TABLE IF NOT EXISTS seen (
    hash TEXT PRIMARY KEY, title TEXT, link TEXT,
    keyword TEXT, first_seen TEXT
)''')
db.commit()
print(f'Monitoring {len(MONITOR_CONFIG["keywords"])} keywords on Reddit')
print(f'Daily cost estimate: ${len(MONITOR_CONFIG["keywords"]) * 0.005:.3f}')

Step 2: Search Reddit for each keyword

Pull recent discussions for each monitored keyword.

Python
def search_keyword(keyword):
    data = requests.post('https://api.scavio.dev/api/v1/reddit/search',
        headers=SH, json={'query': keyword}).json()["data"]
    results = data.get('results', [])
    new_posts = []
    for r in results[:10]:
        link = r.get('link', '')
        post_hash = hashlib.md5(link.encode()).hexdigest()
        # Check if already seen
        existing = db.execute('SELECT hash FROM seen WHERE hash=?', (post_hash,)).fetchone()
        if not existing:
            post = {'hash': post_hash, 'title': r.get('title', '')[:100],
                    'link': link, 'snippet': r.get('snippet', '')[:200],
                    'keyword': keyword}
            new_posts.append(post)
            db.execute('INSERT INTO seen VALUES (?,?,?,?,?)',
                (post_hash, post['title'], link, keyword, datetime.now().isoformat()))
    db.commit()
    return new_posts

all_new = []
for kw in MONITOR_CONFIG['keywords']:
    new = search_keyword(kw)
    all_new.extend(new)
    print(f'  "{kw}": {len(new)} new posts')
print(f'\nTotal new posts: {len(all_new)}')

Step 3: Score posts by relevance

Rank new posts by how many monitored keywords they match.

Python
def score_relevance(post, all_keywords):
    text = f"{post['title']} {post['snippet']}".lower()
    matches = sum(1 for kw in all_keywords if kw.lower() in text)
    return matches

def rank_posts(posts, keywords, min_relevance=1):
    for post in posts:
        post['relevance'] = score_relevance(post, keywords)
    ranked = [p for p in posts if p['relevance'] >= min_relevance]
    ranked.sort(key=lambda x: x['relevance'], reverse=True)
    return ranked

ranked = rank_posts(all_new, MONITOR_CONFIG['keywords'], MONITOR_CONFIG['min_relevance'])
print(f'\nHigh-relevance posts ({len(ranked)}):')
for p in ranked[:10]:
    print(f'  [{p["relevance"]}] {p["title"][:60]}')
    print(f'      via: "{p["keyword"]}"')

Step 4: Generate daily digest

Format all new findings into a digest for email or terminal output.

Python
def daily_digest(new_posts, ranked_posts):
    now = datetime.now().strftime('%Y-%m-%d')
    cost = len(MONITOR_CONFIG['keywords']) * 0.005
    lines = []
    lines.append(f'Reddit Monitor Digest - {now}')
    lines.append(f'Keywords: {len(MONITOR_CONFIG["keywords"])} | New posts: {len(new_posts)} | Cost: ${cost:.3f}')
    lines.append('')
    if ranked_posts:
        lines.append('HIGH RELEVANCE:')
        for p in ranked_posts[:10]:
            lines.append(f'  [{p["relevance"]}] {p["title"][:65]}')
            lines.append(f'      {p["link"]}')
        lines.append('')
    # Keyword breakdown
    lines.append('BY KEYWORD:')
    keyword_counts = {}
    for p in new_posts:
        kw = p['keyword']
        keyword_counts[kw] = keyword_counts.get(kw, 0) + 1
    for kw, count in sorted(keyword_counts.items(), key=lambda x: -x[1]):
        lines.append(f'  {kw}: {count} new posts')
    # Stats
    total_seen = db.execute('SELECT COUNT(*) FROM seen').fetchone()[0]
    lines.append(f'\nTotal posts tracked: {total_seen}')
    lines.append(f'Monthly cost estimate: ${cost * 30:.2f}')
    digest = '\n'.join(lines)
    print(digest)
    # Save digest
    with open(f'digest_{now}.txt', 'w') as f:
        f.write(digest)
    return digest

daily_digest(all_new, ranked)

Python Example

Python
import os, requests
SH = {'Authorization': 'Bearer ' + os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}

def monitor(keywords):
    for kw in keywords:
        data = requests.post('https://api.scavio.dev/api/v1/reddit/search',
            headers=SH, json={'query': kw}).json()["data"]
        results = data.get('results', [])[:3]
        print(f'{kw}: {len(results)} posts')
        for r in results:
            print(f'  - {r.get("title", "")[:60]}')
    print(f'Cost: ${len(keywords) * 0.005:.3f}')

monitor(['serp api', 'search api recommendation'])

JavaScript Example

JavaScript
const SH = { 'Authorization': `Bearer ${process.env.SCAVIO_API_KEY}`, 'Content-Type': 'application/json' };
async function monitor(keywords) {
  for (const kw of keywords) {
    const data = await fetch('https://api.scavio.dev/api/v1/reddit/search', {
      method: 'POST', headers: SH,
      body: JSON.stringify({ query: kw })
    }).then(r => r.json()).then(p => p.data);
    console.log(`${kw}: ${(data.results || []).length} posts`);
    (data.results || []).slice(0, 2).forEach(r => console.log(`  - ${r.title.slice(0, 60)}`));
  }
}
monitor(['serp api', 'search api recommendation']).catch(console.error);

Expected Output

JSON
Monitoring 5 keywords on Reddit
Daily cost estimate: $0.025
  "scavio api": 3 new posts
  "serp api recommendation": 5 new posts
  "search api for agents": 4 new posts
  "mcp search tool": 2 new posts
  "web scraping alternative 2026": 3 new posts

Total new posts: 17

Reddit Monitor Digest - 2026-05-19
Keywords: 5 | New posts: 17 | Cost: $0.025

HIGH RELEVANCE:
  [3] Looking for a serp api recommendation for my AI agent project
      https://reddit.com/r/...
  [2] Best search API for agents in 2026? Need MCP support
      https://reddit.com/r/...

Monthly cost estimate: $0.75

Related Tutorials

  • How to Build a Reddit Stock Sentiment Scanner

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 from scavio.dev. Keywords or topics to monitor. A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, 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 E-Commerce Price Tracking API in 2026

Read more
Best Of

Best API for Price Monitoring in 2026

Read more
Solution

Reddit Data Without Direct API

Read more
Comparison

Reddit API / Search API vs Social Listening Tools (Brandwatch, Mention, Sprout Social)

Read more
Comparison

Google Places API vs SERP Local Pack API

Read more
Glossary

Subscription vs Pay-as-You-Go API Model

Read more

Start Building

Track topics, keywords, and subreddits via API with daily digest email. Python monitoring pipeline at $0.005/query. Prerequisites: Python 3.8+, requests library.

Get Free API KeyRead the Docs
ScavioScavio

One scraper API for every social, search, e-commerce and real estate platform. Built for AI agents.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

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

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative
  • Serper Alternative
  • Tavily vs Scavio
  • SerpAPI vs Scavio
  • All alternatives
  • Compare Scavio vs alternatives

Search APIs

  • Google Search API
  • Amazon Product API
  • YouTube API
  • Reddit API
  • Walmart Product API
  • TikTok API
  • Instagram API

Tools

  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy