> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Youtube

> YouTubeTools let an agent fetch captions, metadata, and timestamps for a YouTube video from its URL.

**YouTubeTools** enable an Agent to access captions and metadata of YouTube videos, when provided with a video URL.

## Prerequisites

The following example requires the `youtube_transcript_api` and `openai` libraries.

```shell theme={null}
uv pip install -U youtube_transcript_api openai
```

## Example

The following agent will provide a summary of a YouTube video.

```python cookbook/91_tools/youtube_tools.py theme={null}
from agno.agent import Agent
from agno.tools.youtube import YouTubeTools

agent = Agent(
    tools=[YouTubeTools()],
    description="You are a YouTube agent. Obtain the captions of a YouTube video and answer questions.",
)

agent.print_response("Summarize this video https://www.youtube.com/watch?v=Iv9dewmcFbs&t", markdown=True)
```

## Toolkit Params

| Param                         | Type                       | Default | Description                                                                        |
| ----------------------------- | -------------------------- | ------- | ---------------------------------------------------------------------------------- |
| `languages`                   | `Optional[List[str]]`      | `None`  | Specifies the list of languages for which data should be retrieved, if applicable. |
| `proxies`                     | `Optional[Dict[str, Any]]` | `None`  | Proxies to use for the transcript API requests.                                    |
| `timeout`                     | `int`                      | `30`    | Timeout for HTTP requests, in seconds.                                             |
| `enable_get_video_captions`   | `bool`                     | `True`  | Enable the get\_youtube\_video\_captions functionality.                            |
| `enable_get_video_data`       | `bool`                     | `True`  | Enable the get\_youtube\_video\_data functionality.                                |
| `enable_get_video_timestamps` | `bool`                     | `True`  | Enable the get\_video\_timestamps functionality.                                   |
| `all`                         | `bool`                     | `False` | Enable all functionality.                                                          |

## Toolkit Functions

| Function                     | Description                                                |
| ---------------------------- | ---------------------------------------------------------- |
| `get_youtube_video_captions` | This function retrieves the captions of a YouTube video.   |
| `get_youtube_video_data`     | This function retrieves the metadata of a YouTube video.   |
| `get_video_timestamps`       | This function retrieves the timestamps of a YouTube video. |

## Developer Resources

* [Tools](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/youtube.py)
