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

# Connect a YouTube channel

> Make the videos on a public YouTube channel searchable by your AI agents

Connect a public YouTube channel and Raily turns each video into searchable text: what's said, what's shown on screen, plus the title and description. Agents that search your endpoint can then answer from your videos and link straight back to them on YouTube.

Raily handles the processing for you. There's no API key to paste and no model to pick.

## Before you start

* The channel must be public. Raily imports completed public videos only, so private videos and live streams that haven't ended are skipped.
* Have the channel's address ready. Any of these work:
  * A handle, such as `@yourchannel` or `https://youtube.com/@yourchannel`
  * A channel URL, such as `https://www.youtube.com/channel/UC...`
  * A legacy user URL, such as `https://www.youtube.com/user/yourname`

## Connect the channel

**1. Open the source catalog**

In the Rail, click **Connect source**. On **Connect a data source**, choose **YouTube**.

**2. Enter the channel**

In **Channel URL or handle**, paste the channel's handle or URL.

**3. Check the channel**

Click **Check channel**. Raily looks the channel up and shows its name and picture with a **Connected to** message. If **Source name** is empty, Raily fills it in with the channel name. You can change it.

**4. Choose which videos to import**

Under **Videos to import**, pick one:

* **All videos**: the channel's full history.
* **Published after a date**: only videos published after the date you set in **Published after**.
* **Latest videos**: the most recent videos. Set **Number of recent videos** between 1 and 1,000.

Raily shows how many videos and roughly how many hours of video your choice covers. When you pick a narrower option, it also shows how many hours the full history would be.

**5. Confirm a large import, if asked**

If the import is over 25 hours of video, check **I understand this is a large one-time import that can take several hours to complete.** You can't connect a large import without it.

**6. Choose how often to sync**

Under **Keep this Source updated**, pick **Daily**, **Weekly**, or **Manual content sync**. Daily and weekly syncs pick up new videos on their own. With **Manual content sync**, new videos come in only when you click **Resync**.

**7. Connect**

Click **Connect YouTube**. Raily starts importing your videos and opens the Source's page.

## What happens next

The Source's page shows the import as it runs. First you'll see **Downloading your content list…**, then a running count such as **Syncing 120/340 searchable**. Videos become searchable as each one finishes, so you don't have to wait for the whole channel before you can search.

Small channels finish in minutes. A large history can take several hours.

When the import is done, the sync card reads **Last sync** with the time, the number of videos added, updated, and removed, and when the next sync runs. Raily then sets up search for the channel automatically. When the Source shows **Ready**, add the channel to an endpoint so your agents can search it. See [AI endpoints](https://docs.raily.ai/concepts/ai-endpoints.md).

To check for new, changed, or removed videos at any time, click **Resync** on the sync card.

## What gets indexed

Each video becomes one searchable item, made of:

* The title and description
* A transcript of what's said in the video, split into time ranges
* Text that appears on screen, and a short description of what's shown

Search results show the video's title (linked to the video on YouTube), its thumbnail, the channel name, and the publish date.

Agents can also narrow a search by these details:

| Detail | Example question |
| - | - |
| Publish date | "videos from the last month" |
| Duration | "short clips under five minutes" |
| Language | "videos in Spanish" |
| Type (video or completed livestream) | "past livestreams about pricing" |
| YouTube tags and topic categories | "videos tagged onboarding" |

You can review and adjust how each field is used in the [Data Catalog](https://docs.raily.ai/integrations/data-catalog.md).

### Videos indexed by title and description only

Sometimes the full video can't be transcribed. Raily still makes these videos findable by their title, description, channel, and date, and the sync card tells you how many:

* **Metadata only · provider refused, searchable by title and description**: the transcription service declined the video.
* **Metadata only · could not process, searchable by title and description**: the video itself couldn't be processed.
* If only part of a video could be transcribed, the parts that came back are searchable.

To try these videos again, open the menu next to **Resync** and choose **Retry failed videos**, or **Also retry refused videos** to include the refused ones. A successful retry replaces the title-only version with the full transcript.

## Changing the Source later

* The channel can't be changed. It identifies the Source, so connect a new Source for a different channel.
* **Videos to import** can only be widened: an earlier date, a larger number of recent videos, or **All videos**. Once a Source imports **All videos**, the choice is locked.
* You can change **Keep this Source updated** at any time.

## Next steps

> [card] [Create an AI endpoint](https://docs.raily.ai/concepts/ai-endpoints.md)
>
> Let agents search this source

> [card] [Data Catalog](https://docs.raily.ai/integrations/data-catalog.md)
>
> Review the fields agents filter on


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