Sample Outputs¶
This page shows representative outputs for each yt-text tool and transcript
format.
The exact text, timestamps, and metadata depend on the video you query. These examples are intentionally small so you can understand the output shape without having to inspect a full transcript.
get_transcript¶
Example call:
get_transcript(url: "https://youtube.com/watch?v=dQw4w9WgXcQ", format: "json")
JSON¶
{
"video_id": "dQw4w9WgXcQ",
"title": "Example Video",
"channel": "Example Channel",
"duration_ms": 125000,
"language": "en",
"source": "caption_manual",
"segments": [
{
"text": "Hello and welcome.",
"start_ms": 0,
"end_ms": 1800
},
{
"text": "This is a short example.",
"start_ms": 1800,
"end_ms": 4200
}
]
}
Notes:
languageis the language actually returned, not only the language you requested.sourcetells you which path produced the transcript:caption_manualcaption_auto_generatedwhisper_local
Markdown¶
# Example Video
**Channel**: Example Channel | **Duration**: 2:05 | **Language**: en
## Transcript
**[0:00]** Hello and welcome.
**[0:01]** This is a short example.
SRT¶
1
00:00:00,000 --> 00:00:01,800
Hello and welcome.
2
00:00:01,800 --> 00:00:04,200
This is a short example.
VTT¶
WEBVTT
00:00:00.000 --> 00:00:01.800
Hello and welcome.
00:00:01.800 --> 00:00:04.200
This is a short example.
Plain Text¶
Hello and welcome. This is a short example.
list_languages¶
Example call:
list_languages(url: "https://youtube.com/watch?v=dQw4w9WgXcQ")
Example output:
{
"video_id": "dQw4w9WgXcQ",
"languages": [
{
"code": "en",
"name": "English",
"is_auto_generated": false,
"is_translatable": true
},
{
"code": "es",
"name": "Spanish",
"is_auto_generated": true,
"is_translatable": true
}
]
}
Use this tool when language choice matters more than grabbing any available caption track.
get_metadata¶
Example call:
get_metadata(url: "https://youtube.com/watch?v=dQw4w9WgXcQ")
Example output:
{
"video_id": "dQw4w9WgXcQ",
"title": "Example Video",
"channel": "Example Channel",
"duration_ms": 125000,
"has_captions": true,
"caption_languages": [
"en",
"es"
]
}
Error Output Shape¶
Tool failures are returned as plain strings prefixed with Error:.
Example:
Error: invalid YouTube URL or video ID: not-a-youtube-url
For common failures and what to do next, see Troubleshooting.