Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YouTube Research Agent

A powerful tool to analyze YouTube channels and generate actionable content insights.

Features

  • Fetch & Analyze: Retrieves 20 most recent videos from any YouTube channel
  • Smart Insights: Identifies performance patterns in content type, duration, and titles
  • AI Suggestions: Generates data-driven video ideas based on what works
  • Zero API Keys: Uses yt-dlp - no YouTube API key required

Installation

Prerequisites

Install yt-dlp:

# macOS
brew install yt-dlp

# Linux
pip install yt-dlp
# or
sudo apt install yt-dlp

# Windows
pip install yt-dlp

Setup

npm install

Usage

Slash Command

/youtube @channelname
/youtube https://youtube.com/@channelname

Direct Script

node scripts/youtube-research.js @channelname

Output

Generates youtube-research.md with:

🔑 Key Insights

  • Performance patterns (content type, duration, title analysis)
  • Audience preferences
  • Data-driven observations

💡 Your Next Video

  • 3 specific video ideas based on successful patterns
  • Suggested duration and reasoning for each

📊 Top 10 Videos by Views

  • Title
  • View count
  • Duration
  • Clickable YouTube link

📈 Quick Stats

  • Total and average views
  • Average duration
  • Most common duration range

Example

/youtube @mkbhd

Output:

🎬 YouTube Channel Research Tool
================================

📺 Channel: https://youtube.com/@mkbhd

🔍 Fetching channel data...
✅ Found 20 videos
📊 Fetching detailed statistics...
✅ Fetched details for 20 videos
🧠 Analyzing performance patterns...
✨ Analysis complete!

📄 Report saved to: youtube-research.md
📊 Top video: "iPhone 16 Review: The Best iPhone Yet?"
   1,234,567 views

How It Works

  1. Fetch: Uses yt-dlp to extract video metadata (no API key needed)
  2. Analyze: Processes 20 recent videos for patterns in:
    • Content types (tutorial, review, list, etc.)
    • Duration sweet spots
    • Title structures and hooks
    • View count trends
  3. Generate: Creates insights and suggests next video ideas
  4. Export: Writes comprehensive markdown report

Technical Details

  • Language: Node.js (ES Modules)
  • Data Source: yt-dlp
  • Analysis: Pattern recognition, statistical averaging
  • Output: Markdown format

Error Handling

  • ✅ Missing yt-dlp installation detection
  • ✅ Invalid channel name validation
  • ✅ Network error handling
  • ✅ Insufficient data warnings

License

MIT

About

a /youtube slash command that analyzes any channel to get the 10 best recent videos and insights on what’s working

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages