get_video_details
Retrieve comprehensive YouTube video metadata including title, description, statistics, duration, tags, and channel details by providing the video ID.
Instructions
Get detailed information about a YouTube video.
Retrieves comprehensive video metadata including title, description,
statistics (views, likes, comments), duration, tags, and channel info.
Cached for 24 hours to minimize API quota usage.
Args:
video_id: YouTube video ID (from URL or search results, e.g., "dQw4w9WgXcQ")
Returns:
Video details dictionary with:
- title, description, video_id, url, thumbnail
- view_count, like_count, comment_count
- duration (ISO 8601 format like "PT15M30S")
- tags, channel_title, published_at
Example:
>>> details = _get_video_details("nLwbNhSxLd4")
>>> print(details["title"])
"Full NixOS Guide"
Note:
- Costs 1 quota unit per request (100x cheaper than search)
- Cached for 24h in youtube.api namespace
- Use after search to get full detailsCaching Behavior:
Parameters that accept reference strings can accept a
ref_idfrom a previous tool callLarge results return ref_id + preview; use get_cached_result to paginate
All responses include ref_id for future reference
Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution.
Full retrieval: Use get_cached_result(ref_id, full=True) to get the complete value.
Preview Size: server default. Override per-call with get_cached_result(ref_id, max_size=...).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"video_id": "<video_id>"
},
"name": "get_video_details"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| video_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||