DEV Community

Lucas Gragg
Lucas Gragg

Posted on

Building a subreddit scanner for keywords

I've been working on reddit monitor bot for a while and wanted to share what I learned.

The problem

Monitor any subreddit or keyword in real time and get instant alerts when relevant posts or comments appear. Ideal for brand monitoring, lead generation, competitor tracking, and trend discovery.

What I built

Here are the main features I ended up shipping:

  • Real-time subreddit and keyword monitoring
  • Configurable alert filters (score, flair, author)
  • Telegram and Discord notification support
  • Sentiment analysis on matched posts
  • Export matched posts to CSV or database

Code sample

# Basic structure
class Bot:
    def __init__(self, config):
        self.config = config

    def run(self):
        while True:
            self.scan()
            self.execute()
Enter fullscreen mode Exit fullscreen mode

If you want the full working version with all the battle-tested edge cases
handled, I packaged it here: Reddit Monitor Bot

Happy to answer questions about the architecture in the comments.

Top comments (0)