Skip to content

Get Video Metadata

POST
/api/agents/youtube/metadata

Fetch YouTube video metadata without downloading — preview before transcribing.

Args: request: The YouTube URL to inspect.

Returns: Video id, title, channel, duration, description, thumbnail, and caption availability (manual/auto + available languages).

Raises: HTTPException(400): The URL is not a recognizable YouTube video URL, or the video duration exceeds youtube.max_video_duration_minutes. HTTPException(502): yt-dlp failed to fetch metadata (video private, removed, age-gated, or network error).

YouTubeMetadataRequest

POST /youtube/metadata request body.

object
url
required
Url

YouTube video URL

string format: uri
>= 1 characters <= 2083 characters

Successful Response

YouTubeMetadataResponse

Video metadata preview (no download).

object
videoId
required
Videoid

YouTube video ID

string
title
required
Title

Video title

string
channel
required
Channel

Channel name

string
durationSeconds
required
Durationseconds

Video duration in seconds

integer
description
required
Description

Video description

string
thumbnailUrl
required
Thumbnailurl

Thumbnail image URL

string
hasManualCaptions
required
Hasmanualcaptions

Manual captions available

boolean
hasAutoCaptions
required
Hasautocaptions

Auto-generated captions available

boolean
availableLanguages
Availablelanguages

Available caption languages

Array<string>

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object