get_transcript1 creditPulls the transcript of one video from an id or a full URL. Plain text by default, timed segments with format=json, and srt, vtt or raw srv3 when a file is the goal. Set segment to size the pieces, 500 to 1500 works well for retrieval chunks. Add video_metadata=true for the title and channel in the same call.
- video *
- Video id (11 chars) or any YouTube URL.
- lang
- Track language, en by default. No track in that language answers 404.
- kind
- manual or auto. Omit to prefer the human track and fall back to auto.
- format
- json, text, srt, vtt or srv3. Changes only the transcript type.
- segment
- Max characters per segment, 20 to 5000. Not valid with srv3.
- video_metadata
- Also return the title, channel and duration.
The transcript in the chosen format, plus the list of language tracks the video has.
get_transcript(video="https://youtu.be/dQw4w9WgXcQ", format="json", segment=1000)