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

# YouTube

> YouTube can search public videos, retrieve a video by ID/URL, read channels, and list up to five recent uploads. No personal YouTube account is required.

## Search

`.yt <text>` and `.yt search <text>` normalize whitespace and accept 2–160 characters. Search returns up to five results per page; only the person who started the search can use previous/next controls. The bot adds duration and statistics when the API returns them.

### `.youtube`

```headless-command Syntax theme={null}
.youtube [query]
```

```headless-command Example theme={null}
.yt Headless Discord bot
```

### `.youtube search`

```headless-command Syntax theme={null}
.youtube search <query>
```

```headless-command Example theme={null}
.yt s Kendrick Lamar
```

### `/youtube search`

```headless-command Syntax theme={null}
/youtube search query:<query>
```

```headless-command Example theme={null}
/youtube search query:Headless
```

## Videos and channels

A video accepts an ID or a link on an official YouTube host, including `youtu.be`, `/watch`, `/shorts`, `/embed`, or `/live`. A channel accepts an ID, `@handle`, or official URL; `.yt latest <channel>` lists up to five recent videos and may include views, duration, and date.

### `.youtube video`

```headless-command Syntax theme={null}
.youtube video <value>
```

```headless-command Example theme={null}
.yt v https://youtu.be/dQw4w9WgXcQ
```

### `.youtube channel`

```headless-command Syntax theme={null}
.youtube channel <value>
```

```headless-command Example theme={null}
.yt ch @YouTube
```

### `.youtube latest`

```headless-command Syntax theme={null}
.youtube latest <value>
```

```headless-command Example theme={null}
.yt l UC_x5XG1OV2P6uZZ5FSM9Ttw
```

## Quota and cache

Shared protection defaults to 80 searches per day and a total budget of 9,000 units per day; current quotas can be adjusted and are bounded in the service. A search uses 100 units, while metadata endpoints use one unit per request. Results are cached temporarily, and per-user cooldowns reduce repeated lookups.

## Steps

**1. Search a topic**

Try `.yt <query>` or `/youtube search` with at least two characters.

**2. Open a result**

Use the message controls to move between pages; only the person who opened the search can use them.

**3. Look up a channel**

Pass an ID, `@handle`, or official URL to `channel` or `latest`.

## Registered commands

* **`.youtube [query]` (`.yt`)** — **Slash command:** — · **Result:** Searches public videos when text is supplied; without text it shows usage help. · **Prefix cooldown:** 5 s
* **`.youtube search <text>` (`s`, `buscar`)** — **Slash command:** `/youtube search query` · **Result:** Searches up to five videos; interactive paging is limited to the requester. · **Prefix cooldown:** 5 s
* **`.youtube video <ID|URL>` (`v`, `watch`)** — **Slash command:** `/youtube video video_id_or_url` · **Result:** Shows public video metadata. · **Prefix cooldown:** 4 s
* **`.youtube channel <ID|@handle|URL>` (`c`, `ch`, `canal`)** — **Slash command:** `/youtube channel channel_id_handle_or_url` · **Result:** Shows public channel information. · **Prefix cooldown:** 5 s
* **`.youtube latest <channel>` (`recent`, `ultimos`, `l`)** — **Slash command:** `/youtube latest channel` · **Result:** Lists up to five recent channel uploads. · **Prefix cooldown:** 5 s

> [!NOTE]
>
> An exhausted quota, unconfigured API, or empty provider response can prevent a lookup; an empty result does not confirm that the channel or video does not exist. Use official YouTube IDs and URLs.

**Note:**

The callbacks do not declare an elevated Discord permission for public lookups. A slash root `/youtube` is not registered; Discord exposes the subcommands shown in the table.

## Related pages

* [Integrations](/docs/en/integrations.md)
* [TikTok](/docs/en/integrations/tiktok.md)
* [Pinterest](/docs/en/integrations/pinterest.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.