youtube_transcript_api 1.0.0 copy "youtube_transcript_api: ^1.0.0" to clipboard
youtube_transcript_api: ^1.0.0 copied to clipboard

Fetch YouTube transcripts/subtitles without API keys. Supports auto-generated & manual transcripts, translations, multiple formats (JSON/VTT/SRT), proxy support, and CLI.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.0.0 - 2024-12-02 #

πŸŽ‰ Initial Release #

A complete Dart port of the Python youtube-transcript-api library with enhanced features.

Added #

Core Functionality

  • 🎯 Fetch YouTube transcripts for any video without API keys
  • πŸ“ Support for both manually created and auto-generated subtitles
  • 🌍 Multiple language support with intelligent fallback
  • πŸ”„ Translation support for available transcripts
  • πŸ” List all available transcripts for a video
  • 🎭 Filter by manually created or auto-generated transcripts

Output Formatters

  • πŸ“„ Plain text (with and without timestamps)
  • πŸ“Š JSON (simple and with full metadata)
  • πŸ“Ί WebVTT (.vtt) - Standard web video format
  • 🎬 SubRip (.srt) - Universal subtitle format
  • πŸ“‹ CSV (.csv) - Spreadsheet-compatible format
  • πŸ”§ Extensible formatter system for custom formats

Advanced Features

  • πŸ” InnerTube API Integration - Bypasses YouTube's PoToken protection
  • πŸ€– Android client emulation for improved reliability
  • 🌐 Proxy support:
    • Generic HTTP/HTTPS proxy configuration
    • Webshare rotating residential proxy integration
    • Custom headers and timeout configuration
  • πŸ”„ Automatic retry logic for blocked requests
  • 🚫 Comprehensive error handling with specific exceptions

Developer Experience

  • 🎨 Null-safe, modern Dart implementation
  • πŸ“¦ Clean, type-safe API design
  • ⚑ Async/await throughout
  • πŸ” Iterator interface for FetchedTranscript
  • πŸ› οΈ Extensive documentation and examples
  • βœ… Comprehensive test suite (32 tests, 100% passing)
  • πŸ” Detailed error messages with context

CLI Tool

  • πŸ’» Full-featured command-line interface
  • πŸ“₯ Multiple input/output formats
  • πŸ“ File export support
  • πŸ—‚οΈ List available transcripts from terminal

Platform Support

  • βœ… Dart CLI applications
  • βœ… Flutter mobile apps (iOS & Android)
  • βœ… Flutter web applications
  • βœ… Flutter desktop (Windows, macOS, Linux)

Technical Highlights #

  • πŸ—οΈ Architecture: Clean separation of concerns with dedicated modules for HTTP, parsing, formatting, and models
  • πŸ”’ Security: Uses defusedxml principles for safe XML parsing
  • 🎯 Reliability: InnerTube API ensures consistent access even to protected videos
  • πŸ“ˆ Performance: Efficient parsing with minimal memory footprint
  • πŸ§ͺ Quality: 100% of core functionality covered by tests

Compatibility #

  • Dart SDK: >=3.0.0 <4.0.0
  • Python Library Compatibility: Feature parity with youtube-transcript-api v1.2.3
  • YouTube API: Uses official InnerTube API (same as YouTube mobile apps)

[Unreleased] #

Planned #

  • Batch fetching for multiple videos
  • Caching support to reduce API calls
  • Rate limiting protection
  • Cookie-based authentication for restricted videos
  • Enhanced error recovery and retry logic
1
likes
160
points
17
downloads

Publisher

unverified uploader

Weekly Downloads

Fetch YouTube transcripts/subtitles without API keys. Supports auto-generated & manual transcripts, translations, multiple formats (JSON/VTT/SRT), proxy support, and CLI.

Repository (GitHub)
View/report issues
Contributing

Topics

#youtube #transcript #subtitles #youtube-api #cli

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

args, html, http

More

Packages that depend on youtube_transcript_api