Sample Outputs¶
This page shows representative outputs for each tubebrain 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.
get_transcript_section¶
Use this when the user gives a timestamp or asks about one section of a long video.
Example call:
get_transcript_section(url: "https://www.youtube.com/watch?v=Rzi7oFTzjac&t=2449s", format: "json")
Example output excerpt, with segment text shortened for shape:
{
"video_id": "Rzi7oFTzjac",
"title": "We need to talk about gstack",
"channel": "Nerd Snipe",
"duration_ms": 4786000,
"language": "en",
"source": "caption_auto_generated",
"anchor_ms": 2449000,
"window_start_ms": 2329000,
"window_end_ms": 3049000,
"segments": [
{
"text": "[caption text from the requested section]",
"start_ms": 2448200,
"end_ms": 2454300
},
{
"text": "[next caption segment in the requested section]",
"start_ms": 2454300,
"end_ms": 2460500
}
]
}
Notes:
anchor_msis the timestamp requested byat_sor parsed from URL parameters such ast=2449s.window_start_msandwindow_end_msdescribe the filtered transcript window.- The segment list keeps original video timestamps so downstream agents can cite or reopen the section precisely.
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.