Product Updates
New updates and improvements
v2.0.0
Transcript API
transcribeVideo(id, options?)— fetch captions for a single video without an API keytranscribePlaylist(id, options?)— batch fetch transcripts for every video in a playlistlistCaptionTracks(id)— discover available language tracks before downloading- Output formatters:
toSRT(),toVTT(),toPlainText() TranscriptClient— reusable client with shared config
Batch Transcript
- Configurable
concurrency(1–20 workers) for parallel transcript fetching from/torange filtering to process a subset of the playlistonProgresscallback for real-time progress tracking- Partial failure handling — individual video failures are caught and recorded, not thrown
- Returns per-video results with
status: "success" | "failed"
Caching
InMemoryCache— process-only cache with TTL and size limits (~0.03ms hits)FsCache— filesystem persistence with JSON storage (~0.3ms hits)CacheStoreinterface for custom backends (Redis, etc.)- Automatic cache key generation per video ID, language, and metadata flag
Retry & Resilience
- Exponential backoff retry for transient HTTP failures (429, 5xx)
retriesandretryDelayoptions on all transcript requestsAbortSignalsupport to cancel in-flight retry loops
Comments API
comments(videoId, opts?)— fetch all comment threads with auto-paginationtopComments(videoId, limit?)— top comments sorted by relevancecommentReplies(commentId)— fetch all replies to a specific commentcommentsWithReplies(videoId)— threads + all replies in one callsearchComments(videoId, query)— keyword search within commentscommentStats(videoId, threads)— aggregate stats (unique authors, reply ratio, most liked)commentQuery(videoId)— fluent builder for filtering and slicing comments
Internationalization (i18n)
regions(hl?)— list all supported YouTube regions (110+)languages(hl?)— list all supported languages (80+)videoCategoriesByRegion(regionCode, hl?)— fetch region-specific video categories- Localized names via
hlparameter (e.g.,jafor Japanese)
REST API
- New endpoints:
/api/comments/{videoId},/api/comments/{videoId}/top,/api/comment-replies/{id} - New endpoint:
/api/transcript/{id}— single video transcript (no API key) - New endpoint:
/api/playlist/{id}/transcript— batch playlist transcript - Removed URL utility endpoints (moved to standalone
lyra-sdk/urlsubpath)
Framework Examples
- Added Hono, NestJS, and Next.js API server examples alongside Express
- API Reference now shows framework-specific code samples (Express, Hono, Next.js)
v1.1.0
Playlist Query
- Added
POST /api/playlist/{id}/queryendpoint for filtering, sorting, and slicing playlist videos - Filter by duration, views, and likes with min/max ranges
- Sort by views, likes, or duration in ascending or descending order
- Range parameter to paginate results (1-indexed start/end)
v1.0.0
Video API
getVideo(id)— fetch full video details by ID or URLgetVideos(ids)— batch fetch multiple videosgetVideoTitle(id)— lightweight title-only lookup (1 quota unit)
Channel API
getChannel(id)— fetch channel metadata by ID, @username, or URLgetChannelVideos(id, limit)— fetch recent uploads for a channel
Playlist API
getPlaylist(id)— fetch complete playlist with all videos and total durationgetPlaylistInfo(id)— playlist metadata only (1 quota unit)getPlaylistIds(id)— fetch all video IDs with auto-pagination
URL Utilities
parseUrl(url)— parse a YouTube URL into a structured resultextractUrl(url, type?)— extract video, playlist, or channel IDs from a URL
Express REST API
- Full REST API wrapper around all SDK functions
- Interactive OpenAPI documentation at
/docs/api-reference - Local development server via
npm run dev:express