AI-powered YouTube video analysis using Google's Gemini 2.5 Flash API
interYT is a powerful Chrome browser extension that transforms how you interact with YouTube content. Get instant answers about video transcripts, analyze comments sentiment, generate summaries, and discover related content - all powered by Google's Gemini 2.5 Flash API.
- π€ AI-Powered Q&A - Ask questions about video content with context-aware answers using Gemini 2.5 Flash
- π Video Summarization - Generate concise bullet-point summaries (up to 1536 tokens for comprehensive coverage)
- π¬ Comment Analysis - Fetch and analyze top comments with AI-powered sentiment summaries (512 tokens)
- π Related Videos - Get AI-suggested videos with direct YouTube links (π) or search fallback (π)
- π Google Search Integration - Enriched answers with real-time external information
- π― Metadata Extraction - Automatically includes channel name and video description for richer AI responses
- π Auto-Fetch Transcripts - Seamlessly detects and loads YouTube transcripts
- π Timestamp Links - AI responses include clickable timestamps to jump to video moments
- π¨ Modern Dark UI - Clean, professional interface with gradient accents
- π 3-Tab Interface - Organized tabs for Q&A, Comments, and Tools
- π Question History - Saves your last 5 Q&A sessions locally
- π Secure Settings - Built-in settings page for easy API key management (encrypted by Chrome)
- π PDF Export - Save Q&A history and summaries to PDF
- π€ Social Sharing - Share insights via WhatsApp or Telegram
- Q/A Answers: 2048 tokens (~1500 words) - Complete, detailed responses
- Video Summaries: 1536 tokens (~1150 words) - Comprehensive summaries
- Comment Summaries: 512 tokens (~380 words) - Detailed sentiment analysis
- Chromium based browser (sorry firefox, my love)
- Google Gemini API key (Get one free at AI Studio)
-
Download Extension Files
git clone https://github.com/dangerouslyconfident/interYT.git cd interYT -
Load Extension in Chrome
- Open Chrome and navigate to
chrome://extensions/ - Enable Developer mode (toggle in top-right corner)
- Click Load unpacked
- Select the
interYTfolder
- Open Chrome and navigate to
-
Configure API Key
- Right-click the interYT extension icon
- Select Options
- Paste your Gemini API key
- Click Save
-
Start Using
- Visit any YouTube video
- Click "..." below the video β Show transcript
- Click the interYT extension icon to start asking questions!
- Open a YouTube video with transcripts available
- Click the interYT extension icon
- The transcript will auto-load
- Type your question in the input field
- Get AI-powered answers with Google Search integration
Example Questions:
- "What are the main points discussed?"
- "Summarize the video's conclusion"
- "What examples were given about AI?"
- Go to the Tools tab
- Click Summarize Video
- Get a concise bullet-point summary (5-7 points)
- Go to the Comments tab
- Click Fetch Comments
- View top comments and AI sentiment summary
- Go to the Tools tab
- Click Find Related Videos
- Get AI-suggested videos on similar topics
interYT/
βββ manifest.json # Extension configuration (Manifest V3)
βββ popup.html # Main popup UI
βββ popup.js # Core logic & Gemini API calls
βββ popup.css # Styling with gradients & animations
βββ settings.html # Settings page UI
βββ settings.js # API key management
βββ content.js # YouTube page scraper
βββ lib/
β βββ jspdf.umd.min.js # PDF export library (364KB)
βββ images/ # Extension icons (16px, 48px, 128px)
βββ demo/ # Web-based demo interface
βββ server.py # Python HTTP server for local testing
βββ README.md # This file
- Model: Google Gemini 2.5 Flash (gemini-2.5-flash-preview-09-2025)
- Features: System instructions, Google Search tool, context enrichment
- Error Handling: Exponential backoff retry logic for 429/5xx errors
- Token Limits: Maximized for complete responses (Q/A: 2048, Summaries: 1536, Comments: 512)
- API keys stored in
chrome.storage.local(encrypted by Chrome) - Never transmitted except to Gemini API
- No hardcoded credentials
- Secure settings page with validation
- Multiple fallback DOM selectors for YouTube's changing structure
- Resilient comment extraction
- Automatic transcript detection
- Console logging with
[interYT]prefix for debugging
- π Added: Related videos now include direct YouTube links when Gemini provides URLs
- π― Enhanced: Smart URL parser handles 9 different Gemini response formats (numbered lists, bullets, with/without URLs)
- β¨ Visual Indicators: π icon for direct video links, π icon for YouTube search fallback
- π‘οΈ Backward Compatible: Gracefully falls back to YouTube search when URLs not available
- π Improved UX: Click opens exact video directly instead of searching - instant access!
- π Stable Release: First production-ready version with all major features working reliably
- π Fixed: Comment summary now properly stored for sharing/export (was showing "gemini-preview...")
- π€ Enhanced: Share feature text limit increased from 150 to 400 characters for better context
- π¬ Added: Comment sentiment summary now included in shared content
- β¨ Complete: All features (Q&A, summaries, comments, export, share) fully functional
- π Fixed: Loading spinners now ALWAYS stop - centralized
hideCommentsLoaders()function - π‘οΈ Enhanced: 10-second timeout fallback prevents infinite spinners
- π Debugging: Comprehensive Gemini API response logging (full structure, finish reasons, extraction paths)
- π§ͺ functionCall Handling: Added explicit support for
functionCallresponses with args parsing - π Traverse ALL Properties: Enhanced
findTextInObjectwith cycle detection to search entire response - β¨ Reliability: All exit paths (timeout, early returns, errors) properly hide loaders
- π Maximized: Q/A answers β 2048 tokens (~1500 words) - no more cut-offs!
- π Expanded: Video summaries β 1536 tokens (~1150 words) - comprehensive coverage
- π¬ Doubled: Comment summaries β 512 tokens (~380 words) - detailed sentiment analysis
- β¨ Complete: All features now use maximum token limits for full-length responses
- π Fixed: Video summary generation (increased tokens 400β600, softened strict prompts)
- π§ Enhanced: Comprehensive error logging for API response debugging
- π οΈ Fixed: Regex bug in related videos Pattern 4 (escaped dash in character class)
- π Improved: Video summaries limited to 5-7 concise bullet points (400 tokens)
- π₯ Fixed: Related videos feature with robust multi-pattern parser (5 formats supported)
- π§ Enhanced: Better Gemini prompts for "Title - Description" format
- π― UX: Summaries no longer feel overwhelming or cut off
- π Fixed: Comment summary with intelligent fallback logic and validation
- π Fixed: Proper scrolling for all content containers (no more cut-offs)
- β¨ Enhanced: Uniform gradient scrollbars across all scrollable areas
- π§ Improved: Smart API response parsing with whitelisted text-bearing keys
- π‘οΈ Stability: Better error messages and graceful degradation
- π¨ Polished: Professional UI with abstract gradients and warm accents
- β¨ Enhanced: Smooth crossfade transitions between tabs (150ms)
- π Fixed: Overflow issues with custom gradient scrollbars
- π« Added: Micro-interactions (ripple effects, tactile feedback, smooth hovers)
- π― Improved: Professional cubic-bezier easing for all transitions
- β¨ Added: Video metadata extraction (channel name & description)
- π§ Enhanced: AI context now includes channel/description for more accurate answers
- π Added: 3-tab interface (Q&A, Comments, Tools)
- π‘οΈ Resilient: Multiple fallback selectors for YouTube's changing DOM
- β¨ Added: Video summarization, timestamp-linked answers, related videos, PDF export
- π€ Added: WhatsApp and Telegram sharing
- π Security: Settings page for API key management (no more hardcoded keys)
- π Fixed: Improved DOM selectors, better error messages, bundled jsPDF locally
- Browser Extension Only: Cannot run directly in web browsers' built-in viewers (requires installation)
- YouTube DOM Changes: YouTube frequently updates their page structure - extension uses multiple fallback selectors
- Transcript Required: Videos must have transcripts enabled (auto-generated or manual)
- API Key Required: Users must obtain their own free Gemini API key from Google AI Studio
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Edit files in your IDE/Replit
- Go to
chrome://extensionsin your browser - Click the reload icon on interYT extension card
- Test on YouTube videos
- Extension loads without errors
- Settings page opens and saves API key
- Transcript auto-fetches correctly
- Q&A generates accurate responses
- Comment fetching and summarization works
- No console errors (check DevTools)
- All spinners stop properly
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini API - Powers all AI features
- jsTXT - Enables TXT export functionality
- YouTube - For the platform and content
- Chrome Extensions Team - For the Manifest V3 platform
- GitHub Issues: Report bugs or request features
- Google AI Studio: Get your free Gemini API key
- Chrome Extensions Docs: Learn about extension development
- Import Q&A history
- Custom AI prompt templates
- Support for more video platforms (Vimeo, Dailymotion)
- Batch comment analysis
- Bookmark favorite Q&A sessions
- Dark/light theme toggle
- Keyboard shortcuts
Made with β€οΈ by dangerouslyconfident & Special thanks to shwetankg07
If you found this helpful, consider giving it a β on GitHub!