youtube_transcript
Retrieve the spoken content of a YouTube video as plain text. Narrow the output to a specific time range with optional start and end seconds.
Instructions
Read what is said in a YouTube video, as plain text.
You get the whole thing by default. On a long video, narrow it with start_seconds and end_seconds so the response stays small. A caption line that straddles either edge of that window comes back whole rather than cut in half.
English is preferred, then a handful of widely spoken languages, and failing all of those whatever the video actually has. Check the language field on the way out and translate if you need to. The auto_generated field tells you whether a human wrote the captions or speech recognition did, which is worth knowing before you quote them.
The text has no timestamps in it. Shorts are not supported. If you only need the title, length or view count, youtube_video_facts is much cheaper.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | A youtube.com or youtu.be link | |
| end_seconds | No | Optional. Ignore everything after this point in the video | |
| start_seconds | No | Optional. Ignore everything before this point in the video |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Caption lines joined with newlines, no timestamps | |
| language | Yes | Language code of the captions that were read, such as en or ko | |
| video_id | Yes | The video the text came from | |
| line_count | Yes | How many caption lines are in the text | |
| auto_generated | Yes | True when YouTube produced the captions by speech recognition, which means more mistakes and no punctuation to speak of |