A RAG (Retrieval Augmented Generation) tool that scrapes YouTube channel videos, extracts transcripts, and enables AI-powered chat interactions using Google's Gemini API.
- Extract video lists from YouTube channels using Apify
- Automatically fetch transcripts using free YouTube Transcript API
- AI-powered content search with Gemini API
- Interactive terminal chat interface with markdown support
- Local transcript storage
- Python 3.8+
- Gemini API key
- Apify API token (only for channel scraping)
# Clone repository
git clone <repo-url>
cd Youtube-comment-RAG
# Install dependencies
pip install -r requirements.txt
# Configure API keys
cp .env.example .env
# Edit .env and add your API keysScrape videos and chat:
python main.pyChat with existing transcripts:
python chat.pyTest single video (no Apify needed):
python -m tests.test_transcript- "What are the main topics covered in these videos?"
- "What did the creator say about [topic]?"
- "Which videos mention [keyword]?"
- "Compare approaches discussed in different videos"
├── main.py # Main orchestration script
├── chat.py # Standalone chat interface
├── youtube_scraper.py # Transcript extraction
├── gemini_rag.py # Gemini API integration
├── tests/ # Test files
├── utils/ # Utility scripts
└── docs/ # Documentation
MIT License - see LICENSE file for details.
For complete license and legal information including third-party licenses, see LICENSE_INFO.md.
Contributions welcome! See CONTRIBUTING.md for guidelines.