A Chrome extension that extracts and downloads transcripts from YouTube Shorts using the modern Innertube API.
- ✅ YouTube Shorts Support - Works specifically with YouTube Shorts
- ✅ Innertube API - Uses YouTube's internal API (2025 compatible)
- ✅ Auto-Generated Transcripts - Extracts ASR (auto speech recognition) captions
- ✅ Detailed Logging - Configurable logging with DEBUG/INFO/WARNING/ERROR levels
- ✅ Error Recovery - Retry logic with exponential backoff
- ✅ Clean Downloads - Sanitized filenames with metadata
- Download or clone this repository
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" and select this folder
- Extension is ready to use!
- Navigate to any YouTube Shorts video
- Click the extension icon in the toolbar
- Click "Download" button
- Transcript file will be downloaded automatically
- Debug logs are also downloaded (if enabled in config)
- Video ID Extraction: Extracts video ID from YouTube Shorts URLs
- API Key Extraction: Finds
INNERTUBE_API_KEYfrom page HTML using regex - Innertube API Request: Makes POST request to
youtubei/v1/playerwith Android client context - Caption Track Selection: Finds ASR (auto-generated) English captions
- XML Parsing: Downloads and parses transcript XML with fallback methods
- File Generation: Creates formatted transcript with metadata
- Centralized Configuration - All settings in CONFIG object
- Modular Architecture - Separate classes for extraction, logging, downloads
- Robust Error Handling - Comprehensive logging and retry mechanisms
- Multiple Format Support - Handles different XML node types (
text,p,s)
Edit the CONFIG object in content.js:
const CONFIG = {
LOGGING: {
ENABLED: true,
LEVEL: 'DEBUG', // DEBUG, INFO, WARNING, ERROR
CONSOLE_OUTPUT: true,
FILE_OUTPUT: true
},
API: {
CLIENT_NAME: 'ANDROID',
CLIENT_VERSION: '20.10.38',
RETRY_COUNT: 3
},
DOWNLOAD: {
FILE_PREFIX: 'yt-transcript-',
INCLUDE_TIMESTAMP: true,
SANITIZE_FILENAME: true
}
};manifest.json- Extension manifest (v3)content.js- Main extraction logic with Innertube APIpopup.html- Extension popup interfacepopup.js- Popup button handlerREADME.md- This documentation
Many YouTube transcript libraries stopped working in 2024-2025 due to YouTube changes. The Innertube API is YouTube's internal API used by their own clients (web, mobile, embedded), making it the most reliable method.
Android client impersonation provides the most stable access to caption data.
- Check browser console for detailed logs
- Ensure you're on a YouTube Shorts page
- Try refreshing the page if API key extraction fails
- Check downloaded log files for debugging information
MIT License - Feel free to use and modify!
v2.0 - Complete rewrite with Innertube API and modern architecture