Bowmark AIdocs

YouTube

A YouTube video's own caption transcript, read off the site's own Transcript panel — timestamped lines plus the full text as one string.

A YouTube video's own caption transcript, read off the site's own Transcript panel — timestamped lines plus the full text as one string. Language selection is not offered yet; this reads whichever track the panel shows by default.

Domain: youtube.com

Also known as: YouTube, youtube.com, youtu.be

Call it directly

bowmark.providers.youtube.getTranscript(input: { video: string }): Promise<YoutubeTranscript>

Functions

FunctionWhat it does
getTranscriptReturns a YouTube video's own caption transcript.

Types

interface YoutubeTranscriptSegment {
  timestamp: string;
  startSeconds: number;
  text: string;
}

interface YoutubeTranscript {
  videoId: string;
  segments: YoutubeTranscriptSegment[];
  fullText: string;
}

Examples

const { segments, fullText } = await bowmark.providers.youtube.getTranscript({ video: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" });
for (const s of segments) log(`${s.timestamp} ${s.text}`);