Skip to content
Shell
7.1 KB
Raw Blame

πŸ” Reddit Research Agent

Extract market research gold from Reddit using the hidden JSON API.

An autonomous agent that discovers pain points, product opportunities, competitor mentions, and buying signals from Reddit discussions.

The Hidden Trick

Add /.json to any Reddit URL:

https://www.reddit.com/r/SaaS/comments/xyz/title/
                        ↓
https://www.reddit.com/r/SaaS/comments/xyz/title/.json

You get the entire thread including all nested comments as structured JSON. No API key required.

Quick Start

# Install dependencies
npm install

# Set Claude API key (for analysis)
export ANTHROPIC_API_KEY=sk-ant-...

# Run a scan
npx tsx src/agent/index.ts run

What You Get

Pain Points

  • Problems people are experiencing
  • Frustrations with current solutions
  • What's missing from the market

Product Opportunities

  • Features people wish existed
  • Gaps competitors aren't filling
  • Ideas with validation built-in

Competitor Intelligence

  • Products mentioned (positive/negative)
  • Why people switch
  • Pricing sensitivity

Buying Signals

  • "Looking for recommendations..."
  • "Just switched from X to Y..."
  • "Would pay for something that..."

Usage

Python Scripts (Quick Research)

# Find goldmine threads in a subreddit
python3 find_goldmine_threads.py SaaS
python3 find_goldmine_threads.py entrepreneur --query "frustrating"

# Extract a specific thread
python3 reddit_extractor.py "https://reddit.com/r/SaaS/comments/xyz/"

TypeScript Agent (Automated Research)

# Single scan cycle
npx tsx src/agent/index.ts run

# Scheduled agent (daily at 9 AM)
npx tsx src/agent/index.ts schedule

# Add subreddits to track
npx tsx src/agent/index.ts add SaaS "wish existed"
npx tsx src/agent/index.ts add smallbusiness

# View statistics
npx tsx src/agent/index.ts stats

# Web dashboard to explore insights
npx tsx src/agent/index.ts dashboard 3456

# Parallel scan multiple subreddits
npx tsx src/agent/index.ts parallel "SaaS,entrepreneur,smallbusiness"

Example Output

πŸ† TOP GOLDMINE THREADS
======================================================================

1. [Score: 39.7] I Took Over a Commercial Gym and it's Been a Nightmare
   πŸ“Š 1336 pts | πŸ’¬ 292 comments | πŸ‘ 97%
   πŸ”— https://reddit.com/r/smallbusiness/comments/...

2. [Score: 36.76] We're getting crushed by the big bakery chains
   πŸ“Š 358 pts | πŸ’¬ 254 comments | πŸ‘ 96%
   πŸ”— https://reddit.com/r/smallbusiness/comments/...

Analyzed Insights

## Pain Points
- Manual order processing eating admin time (frequency: 5)
- Can't afford custom software development
- Competing on price is a losing battle

## Opportunities
- [high] Shopify-style ordering for wholesale bakeries
- [medium] Baker-specific software suite
- [high] Community engagement tools for local businesses

## Key Quote
> "If not, I will 100% create a plug-n-play baker software suite
> for free and sell it to other bakers for profit."

High-Value Subreddits

Category Subreddits
B2B/SaaS r/SaaS, r/startups, r/entrepreneur
Small Business r/smallbusiness, r/Entrepreneur
Dev Tools r/webdev, r/programming, r/devops
Consumer r/productivity, r/ADHD, r/homelab
Niche Hobbies Any passionate community

Goldmine Queries

The agent automatically searches for high-value phrases:

  • "wish existed" - Product ideas with built-in demand
  • "hate about" - Pain points and frustrations
  • "frustrating" - Problems to solve
  • "looking for" - Active buying intent
  • "alternative to" - Competitor weakness
  • "switched from" - Migration patterns
  • "paying for" - Willingness to spend

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Reddit Research Agent                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Scanner ──▢ Analyzer (Claude) ──▢ Storage (SQLite)         β”‚
β”‚     β”‚              β”‚                     β”‚                   β”‚
β”‚     β–Ό              β–Ό                     β–Ό                   β”‚
β”‚  Reddit JSON   Insights           Reports & Alerts          β”‚
β”‚                                          β”‚                   β”‚
β”‚                                    β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”             β”‚
β”‚                                    β”‚           β”‚             β”‚
β”‚                              Dashboard    Integrations       β”‚
β”‚                              (Web UI)    (Slack/Email/       β”‚
β”‚                                           Notion)            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Project Structure

reddit-research/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ reddit/         # Reddit API fetching
β”‚   β”œβ”€β”€ agent/          # Analysis, runner, multi-agent
β”‚   β”œβ”€β”€ db/             # SQLite storage
β”‚   β”œβ”€β”€ alerts/         # Slack & Email notifications
β”‚   β”œβ”€β”€ sync/           # Notion integration
β”‚   β”œβ”€β”€ dashboard/      # Web UI server
β”‚   └── utils/          # Rate limiting, helpers
β”œβ”€β”€ docs/               # Documentation
β”‚   β”œβ”€β”€ ARCHITECTURE.md
β”‚   β”œβ”€β”€ QUICKSTART.md
β”‚   └── API.md
β”œβ”€β”€ *.py                # Python quick scripts
└── package.json

Documentation

Production Features

Web Dashboard

Browse insights visually at http://localhost:3456:

  • Pain points, opportunities, competitors, buying signals
  • Top subreddits and recent scan stats
  • JSON API at /api for custom integrations

Alerts (Slack & Email)

Get notified on high-value thread discoveries:

export SLACK_WEBHOOK_URL=https://hooks.slack.com/services/...
export EMAIL_API_KEY=re_xxx  # Resend or SendGrid
export EMAIL_PROVIDER=resend
export [email protected]
export [email protected]

Notion Sync

Auto-push insights to your Notion workspace:

export NOTION_API_KEY=secret_xxx
export NOTION_PARENT_PAGE_ID=xxx-xxx-xxx  # or NOTION_DATABASE_ID

Rate Limiting

Built-in token bucket rate limiter with exponential backoff prevents Reddit blocking (60 req/min limit handled automatically).

Multi-Agent Parallel Scanning

Scan multiple subreddits concurrently:

npx tsx src/agent/index.ts parallel "SaaS,entrepreneur,webdev" --queries "wish existed,frustrated"

Cost

Operation Cost
Reddit fetching Free
Quick analysis Free
Claude analysis ~$0.01/thread
100 threads/day ~$1/day

License

MIT


πŸ’° "There is a lot of MONEY in niche subreddits"