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.

const loader = new YoutubeLoader(
"https:
"en",
true,
);
const docs = await loader.load();

Hierarchy (view full)

Constructors

Methods

Constructors

Methods

  • 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.

    Returns Promise<Document[]>

    An array of Documents representing the retrieved data.

""