Automated Reddit data collection and strategic intelligence reporting system
Transform raw Reddit data into actionable marketing intelligence with automated crawling, analysis, and professional reporting. Fully customizable for any brand or company.
This system automatically:
- Crawls Reddit posts from your configured subreddits (weekly, monthly, yearly data)
- Analyzes posts for pain points, trending topics, and brand relevance
- Generates professional intelligence reports (PDF) with:
- Subreddit activity rankings and profiles
- Pain point detection based on your brand's strengths
- Trending topic analysis
- Brand relevance scoring (0-100 per post)
- Karma-building strategies per community
- Weekly action plan
Output: Consulting-grade PDF reports that tell your team WHERE to post, WHAT to say, and HOW to gain karma.
Fully Customizable: Configure your brand name, strengths, pain points, and target subreddits in brand_config.py
This system is designed for any brand to monitor relevant Reddit communities and identify engagement opportunities.
Example Configuration (Cloud Storage Company):
- Subreddits: kubernetes, MachineLearning, devops, aws, dataengineering
- Brand Strengths: Cost optimization, data sovereignty, performance
- Pain Points: High cloud costs, compliance requirements, vendor lock-in
- Sample Output: 1,000+ posts analyzed, 410 high-engagement opportunities identified
Example Configuration (SaaS Company):
- Subreddits: startups, SaaS, entrepreneur, smallbusiness
- Brand Strengths: Ease of use, integrations, customer support
- Pain Points: Complex onboarding, poor UI/UX, expensive tools
You can configure your own:
- Industry-specific subreddits (technology, finance, healthcare, gaming, etc.)
- Brand differentiators and competitive advantages
- Customer pain points your product solves
- Custom report branding and messaging
# Required
- Python 3.8+
- Supabase account (free tier works)
- macOS (for automated scheduling)
# Install dependencies
pip install -r requirements.txtOption A: Use existing Supabase project
Run the migration in your Supabase SQL Editor:
# Copy contents of database/RUN_THIS_IN_SUPABASE.sql to Supabase SQL Editor
# Execute the scriptOption B: Fresh Supabase project
# 1. Create new project at https://supabase.com
# 2. Go to SQL Editor
# 3. Paste contents of database/RUN_THIS_IN_SUPABASE.sql
# 4. ExecuteA) Brand Configuration
# 1. Copy the example brand configuration
cp brand_config.py.example brand_config.py
# 2. Edit brand_config.py with your brand details
nano brand_config.pyCustomize these settings in brand_config.py:
BRAND_NAME: Your company nameBRAND_STRENGTHS: Keywords related to your competitive advantagesPAIN_POINT_KEYWORDS: Problems your product solvesTARGET_SUBREDDITS: Subreddits relevant to your industryREPORT_TITLEandREPORT_SUBTITLE: Custom report branding
B) Supabase Credentials
IMPORTANT: Never commit credentials to GitHub!
# 1. Copy the example environment file
cp .env.example .env
# 2. Edit .env with your Supabase credentials
nano .envAdd your credentials to .env:
SUPABASE_URL=https://YOUR_PROJECT.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_hereWhere to find these:
- Go to your Supabase project β Settings β API
- URL: Project URL
- Service Role Key: Under "Project API keys" β service_role (keep this secret!)
For LaunchAgents (automated scheduling): Edit the plist files and replace placeholders with your credentials:
# Edit crawler plist (rename from com.yourcompany.* to your actual company)
nano com.yourcompany.redditcrawler.plist
# Edit report plist
nano com.yourcompany.redditreport.plist
# Replace YOUR_SUPABASE_URL_HERE and YOUR_SUPABASE_SERVICE_ROLE_KEY_HEREManual run (test):
python3 local_reddit_crawler.pyExpected output:
π r/kubernetes
----------------------------------------
week: 88 fetched, 5 new, 83 duplicates
month: 100 fetched, 12 new, 88 duplicates
year: 100 fetched, 37 new, 63 duplicates
TOTAL: β 54 new, 234 duplicates
Time: ~5-7 minutes (rate-limited for Reddit compliance)
python3 generate_intelligence_report.pyOutput: [BRAND_SHORT_NAME]_Reddit_Intelligence_YYYYMMDD.pdf (e.g., YC_Reddit_Intelligence_20231115.pdf)
β FULLY AUTOMATED - No manual intervention required!
Every Monday, the system automatically:
- 9:00 AM: Crawls Reddit for fresh posts
- 9:15 AM: Generates intelligence report PDF
First, rename the plist files to match your company name:
# 1. Rename plist files (replace 'yourcompany' with your actual company name)
mv com.yourcompany.redditcrawler.plist com.acme.redditcrawler.plist
mv com.yourcompany.redditreport.plist com.acme.redditreport.plist
# 2. Edit the Label inside each plist file to match the new filename
nano com.acme.redditcrawler.plist # Update <key>Label</key> value
nano com.acme.redditreport.plist # Update <key>Label</key> value
# 3. Copy both plist files to LaunchAgents
cp com.acme.redditcrawler.plist ~/Library/LaunchAgents/
cp com.acme.redditreport.plist ~/Library/LaunchAgents/
# 4. Load both agents
launchctl load ~/Library/LaunchAgents/com.acme.redditcrawler.plist
launchctl load ~/Library/LaunchAgents/com.acme.redditreport.plist
# 5. Verify both are loaded
launchctl list | grep acmeExpected output:
- 0 com.acme.redditreport
- 0 com.acme.redditcrawler
| Time | Task | Duration | Output |
|---|---|---|---|
| 9:00 AM | Crawler fetches posts | 5-7 min | logs/crawler.log |
| 9:15 AM | Report generated | ~10 sec | [BRAND_SHORT_NAME]_Reddit_Intelligence_YYYYMMDD.pdf |
Fresh report every Monday - Just check the folder for the new PDF!
# Test now (don't wait for Monday)
# Replace 'yourcompany' with your actual company name from plist filenames
launchctl start com.yourcompany.redditcrawler
# Wait 7 minutes...
launchctl start com.yourcompany.redditreport
# View logs in real-time
tail -f logs/crawler.log
tail -f logs/report.log
# Disable automation
launchctl unload ~/Library/LaunchAgents/com.yourcompany.redditcrawler.plist
launchctl unload ~/Library/LaunchAgents/com.yourcompany.redditreport.plist
# Re-enable automation
launchctl load ~/Library/LaunchAgents/com.yourcompany.redditcrawler.plist
launchctl load ~/Library/LaunchAgents/com.yourcompany.redditreport.plist-
Executive Summary (Page 1-2)
- Key findings and metrics
- Strategic recommendations
- Top opportunities overview
-
Subreddit Intelligence (Page 3-5)
- Activity rankings (π₯ indicators)
- IC positioning angles per subreddit
- Karma-building strategies
- Risk assessments
-
Trending Topics & Pain Points (Page 6)
- Hot topics this week
- Pain point analysis (AWS costs, GDPR, etc.)
- IC solution fit scoring
-
Priority Opportunities (Page 7-9)
- Top 10 posts ranked by IC relevance (0-100)
- Engagement strategies per post
- Risk levels and timing windows
-
Karma-Building Playbook (Page 10)
- DOs and DON'Ts for Reddit engagement
- Example comment flows
- Platform-specific strategies
-
Weekly Action Plan (Page 11)
- Monday: 30 min (top 5 posts)
- Wednesday: 15 min (follow-ups)
- Friday: 10 min (wrap-up)
- Total: 55 minutes/week
Algorithm (0-100 points):
- Brand Strengths Match (+10 each): Keywords from your
BRAND_STRENGTHSconfiguration - Pain Points (+20): Keywords from your
PAIN_POINT_KEYWORDSconfiguration - High Engagement (+15): 100+ upvotes OR 50+ comments
Score Interpretation:
- 80-100: PERFECT FIT - Must engage
- 60-79: VERY RELEVANT - High priority
- 40-59: GOOD MATCH - Consider
- 20-39: MODERATE - Low priority
- 0-19: WEAK - Skip
Example (for a cloud storage company):
Post: "Our AWS bill is $15k/month - need cheaper S3-compatible storage with GDPR compliance"
Score: 65/100
- AWS cost pain point (+20)
- "cheaper" keyword (+10 cost strength)
- "storage" keyword (+10 storage strength)
- "GDPR" keyword (+10 sovereignty strength)
- High engagement (+15)
All customization is done in brand_config.py. Copy from the example template:
cp brand_config.py.example brand_config.py
nano brand_config.pyBRAND_NAME = "Your Company"
BRAND_SHORT_NAME = "YC" # Used for scoring and filenames
BRAND_FOOTER = "Generated for Your Company Marketing Team"
REPORT_TITLE = "Reddit Intelligence Report"
REPORT_SUBTITLE = "Strategic Social Listening Analysis"TARGET_SUBREDDITS = [
"technology",
"business",
"entrepreneur",
# Add your industry-specific subreddits:
"cloudnative",
"sysadmin",
"marketing"
]BRAND_STRENGTHS = {
'cost': ['cost', 'expensive', 'pricing', 'cheaper'],
'performance': ['fast', 'speed', 'latency', 'performance'],
# Add your competitive advantages
}
PAIN_POINT_KEYWORDS = {
'high_costs': ['expensive', 'cost too much', 'pricing'],
'complexity': ['complicated', 'complex', 'confusing'],
# Add pain points your product solves
}Edit com.yourcompany.redditcrawler.plist (your renamed plist file):
<!-- Weekly (Monday 9 AM) -->
<key>StartCalendarInterval</key>
<dict>
<key>Weekday</key>
<integer>1</integer> <!-- 1=Monday -->
<key>Hour</key>
<integer>9</integer>
</dict>
<!-- Daily -->
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>9</integer>
</dict>reddit-intelligence/
βββ local_reddit_crawler.py # Main crawler script
βββ generate_intelligence_report.py # Report generator script
βββ brand_config.py # Your brand config (git-ignored)
βββ .env # Your credentials (git-ignored)
βββ requirements.txt # Python dependencies
βββ LICENSE # MIT License
β
βββ config/ # Configuration templates
β βββ brand_config.py.example # Brand settings template
β βββ .env.example # Credentials template
β βββ com.yourcompany.redditcrawler.plist # LaunchAgent template
β βββ com.yourcompany.redditreport.plist # LaunchAgent template
β βββ README.md # Config setup guide
β
βββ database/ # SQL scripts
β βββ RUN_THIS_IN_SUPABASE.sql # Main database setup
β βββ check_schema.sql # Verification queries
β βββ performance_tracking.sql # Analytics queries
β βββ README.md # Database documentation
β
βββ reports/ # Generated intelligence reports
β βββ 2024/
β β βββ week_46/ # Nov 11-17, 2024
β β βββ week_47/ # Nov 18-24, 2024
β β βββ week_48/ # Nov 25-Dec 1, 2024
β β βββ week_49/ # Dec 2-8, 2024
β β βββ week_50/ # Dec 9-15, 2024
β β βββ week_51/ # Dec 16-22, 2024
β β βββ week_52/ # Dec 23-29, 2024
β βββ README.md # Reports guide
β
βββ docs/ # Additional documentation
β βββ EDGE_FUNCTION_OPTION.md # Cloud deployment guide
β βββ README.md # Docs index
β
βββ logs/ # Crawler logs (auto-created)
β
βββ archive/ # Legacy files (not in git)
| File | Purpose |
|---|---|
local_reddit_crawler.py |
Fetches posts from Reddit API, stores in Supabase |
generate_intelligence_report.py |
Analyzes data, generates PDF reports |
brand_config.py |
Your brand configuration (created from template) |
.env |
Your Supabase credentials (created from template) |
requirements.txt |
Python dependencies (supabase, reportlab, requests) |
| Directory | Purpose |
|---|---|
config/ |
Configuration templates for setup |
database/ |
SQL scripts for Supabase setup |
reports/ |
Weekly intelligence reports organized by calendar week |
docs/ |
Additional guides and documentation |
logs/ |
Crawler execution logs |
Problem: Reddit API error: 429
- Solution: Rate limited. Wait 60 seconds and retry. The crawler already includes delays.
Problem: Supabase connection error
- Solution: Check your service role key in
local_reddit_crawler.pyline 14.
Problem: Duplicate posts (all duplicates, no new posts)
- Solution: Normal! This means you already have all recent data. Wait a week for fresh posts.
Problem: No posts found
- Solution: Run the crawler first to populate data.
Problem: Low brand relevance scores
- Solution: Adjust keywords in
BRAND_STRENGTHSandPAIN_POINT_KEYWORDSinbrand_config.pyto match your priorities.
Problem: PDF generation errors
- Solution:
pip install reportlab --upgrade
Problem: Crawler not running on schedule
# Check status (replace 'yourcompany' with your company name)
launchctl list | grep yourcompany
# Check logs
tail -f logs/reddit_crawler.log
# Reload agent
launchctl unload ~/Library/LaunchAgents/com.yourcompany.redditcrawler.plist
launchctl load ~/Library/LaunchAgents/com.yourcompany.redditcrawler.plistsubreddits - Tracked communities
id,name,display_name,crawl_enabled,last_crawled_at
reddit_posts - Crawled posts
- Post metadata (title, text, author, url)
- Engagement metrics (score, comments, upvote_ratio)
- Timestamps (created_utc, created_date)
- Calculated fields (engagement_score, is_high_engagement)
Check latest crawl:
SELECT post_subreddit, COUNT(*), MAX(post_created_date)
FROM reddit_posts
GROUP BY post_subreddit
ORDER BY COUNT(*) DESC;Top posts this week:
SELECT post_title, post_subreddit, post_score, post_num_comments
FROM reddit_posts
WHERE post_created_date > NOW() - INTERVAL '7 days'
ORDER BY post_score DESC
LIMIT 20;Pain point mentions:
SELECT post_title, post_subreddit, post_score
FROM reddit_posts
WHERE post_title ILIKE '%aws cost%'
OR post_text ILIKE '%aws cost%'
ORDER BY post_score DESC;- β Run crawler weekly for fresh data
- β Let it fetch from all 3 time periods (week, month, year)
- β Check logs after each run
- β Monitor Supabase database size (free tier: 500MB)
- β Generate report Monday morning before team engagement
- β Focus on top 5 opportunities (highest IC relevance)
- β Share report with marketing/community team
- β Track which opportunities you engaged with
- β NO brand mentions in first comment (build credibility first)
- β Reference specific numbers from posts ("$8k/month resonates...")
- β Ask genuine follow-up questions
- β Only mention IC in follow-ups if conversation flows naturally
- β Never use promotional language ("Check out...", "Try...")
- β Never hijack promotional posts (beta launches, product announcements)
- β Never engage in posts older than 24 hours
Create a simple spreadsheet:
| Week | Posts Analyzed | Opportunities | Engaged | Karma Earned | IC Mentions | Notes |
|---|---|---|---|---|---|---|
| Nov 11 | 1000 | 10 | 3 | 142 | 2 | Focused on r/kubernetes |
| Nov 18 | 1150 | 12 | 5 | 287 | 3 | AWS cost thread went viral |
- Target: 5-8 engagements/week
- Time: 55 minutes/week
- Karma: 150-300 upvotes/week
- IC Mentions: 2-5/week (in follow-ups only)
- Negative responses: 0
- β Read-only access (no posting automation)
- β Respects Reddit rate limits (2-3s delays)
- β Uses standard Reddit JSON API (public data)
- β No personal data collection
- β Complies with Reddit API Terms of Service
Important: Always follow Reddit's User Agreement and use responsibly.
- Comment thread analysis (understand discussions, not just posts)
- Sentiment analysis (positive/negative/neutral detection)
- Competitor mention tracking
- Email/Slack notifications for high-priority opportunities
- Historical trend analysis (topic popularity over time)
- Web dashboard for exploring data
- Run crawler manually, verify data
- Generate first report, understand structure
- Share with team, get feedback
- Track which opportunities convert to high karma
- Refine IC relevance keywords for your use case
- Experiment with engagement timing
- Build reputation in 2-3 core subreddits
- Use reports to guide content strategy
- Track pain points that keep appearing β product roadmap input
Issues?
- Check logs:
logs/reddit_crawler.log - Verify database: Supabase dashboard β Table Editor
- Test crawler:
python3 local_reddit_crawler.py - Check dependencies:
pip install -r requirements.txt
Common Questions:
-
Q: Why so many duplicates? A: Normal! It means you already have those posts. Fresh data comes weekly.
-
Q: Can I run this on Windows/Linux? A: Yes, but auto-scheduling (LaunchAgent) is macOS-specific. Use cron for Linux, Task Scheduler for Windows.
-
Q: How do I add more subreddits? A: Edit
SUBREDDITSlist inlocal_reddit_crawler.py -
Q: Can I customize the report design? A: Yes! Edit
generate_intelligence_report.py- it uses ReportLab (Python PDF library)
MIT License - Use freely for your marketing intelligence needs.
Open Source Reddit Intelligence System
Built with β€οΈ and shared with the community.
Last updated: November 2024