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
2
likes
160
points
44
downloads

Documentation

Documentation
API reference

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

License

MIT (license)

Dependencies

args, html, http

More

Packages that depend on youtube_transcript_api