Loads the transcript and video metadata from the specified YouTube video. It uses the youtube-transcript library to fetch the transcript and the youtubei.js library to fetch the video metadata.
An array of Documents representing the retrieved data.
Optional
splitter: BaseDocumentTransformer<DocumentInterface<Record<string, any>>[], DocumentInterface<Record<string, any>>[]>A Promise that resolves with an array of Document instances, each split according to the provided TextSplitter.
Static
createCreates a new instance of the YoutubeLoader class from a YouTube video URL.
The URL of the YouTube video.
Optional
config: Omit<YoutubeConfig, "videoId">Optional configuration options for the YoutubeLoader instance, excluding the videoId.
A new instance of the YoutubeLoader class.
A document loader for loading data from YouTube videos. It uses the youtube-transcript and youtubei.js libraries to fetch the transcript and video metadata.
Example