> ## Documentation Index
> Fetch the complete documentation index at: https://llm-tools.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 🔍 Youtube Search

To automatically perform a youtube search and load the top youtube videos to your app, use the `YoutubeSearchLoader`.

## Install Youtube addon

```bash theme={null}
npm install @llm-tools/embedjs-loader-youtube
```

## Usage

```ts theme={null}
import { RAGApplicationBuilder } from '@llm-tools/embedjs';
import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai';
import { HNSWDb } from '@llm-tools/embedjs-hnswlib';
import { YoutubeSearchLoader } from '@llm-tools/embedjs-loader-youtube';

const app = await new RAGApplicationBuilder()
.setModel(SIMPLE_MODELS.OPENAI_GPT4_O)
.setEmbeddingModel(new OpenAiEmbeddings())
.setVectorDatabase(new HNSWDb())
.build();

app.addLoader(new YoutubeSearchLoader({ youtubeSearchString: '...' }))
```
