# Build a search engine for your own video library

> How to build a video search engine for your own library: put your videos in one place, index what is said and shown, and search every video at once for the exact moment. With prompts for Claude and ChatGPT, and Python for developers.

- Category: Agents
- Published: 2026-11-24
- Authors: Aditi Priya
- Canonical: https://videodb.io/blog/video-library-search-engine
- HTML: https://videodb.io/blog/video-library-search-engine · Markdown: https://videodb.io/blog/video-library-search-engine.md
- Tags: video search engine, video library, video search, claude, chatgpt, python

---
<b>Who this is for:</b> teams and creators with a growing video library: webinars, courses, podcasts, demos, client footage. The first half needs no code and works in Claude or ChatGPT. The second half shows developers how to build the same search into an app.

Quick answer

A video search engine searches inside your videos, not just their names. With VideoDB, you put your videos in one collection, index what is said and shown in each one, then search every video at once and get back the exact moments, each with timestamps and a clip.

- **No code:** connect VideoDB to Claude or ChatGPT and ask in plain words.
- **In your app:** the same search is a few calls in the Python SDK.
- **Scoped search:** tag videos as you index them, then search one tag at a time.

## Why do you need a video search engine?

Because your library only searches file names. You know the answer is in a webinar from last spring, but the title says "Q3 webinar", so you open five files and scrub through each one.

A video search engine fixes that by searching what is inside the videos. VideoDB indexes the words and the pictures in every video you add, so one question searches the whole library at once. You can build it and use it from a chat, through VideoDB's connector in Claude or its plugin in ChatGPT.

## How does a video search engine work?

It has three parts: a library, indexes, and a search that returns moments.

- **Library.** In VideoDB, a collection holds your videos. Think of it as a folder you can search across. Every video in it can be searched with one query.
- **Indexes.** Indexing turns each video into something searchable. A spoken-word index covers what is said. A scene index describes what is shown, shot by shot. You index each video once.
- **Search.** A query runs across every indexed video in the collection and returns moments grouped by video, each with a start time, an end time and a playable clip.

How to read Figure 1
Switch the search. Titles find one file. The index finds every moment.

_<b>A search engine returns moments, not files.</b> Illustrative six-video library, searching for "pricing"._

## How do you build a video search engine without code?

Connect once, build the library, index it, then search it. Each step is one prompt.

1. **Connect VideoDB.** Add it to Claude from its [connector directory](https://claude.ai/directory/videodb) or to ChatGPT from its [plugin directory](https://chatgpt.com/plugins/videodb). The connector is what lets the AI use VideoDB. [Can Claude and ChatGPT watch videos?](/blog/can-claude-chatgpt-watch-videos) shows every screen.
2. **Create the library.** One collection per library keeps search focused.
3. **Add your videos.** Paste public links or YouTube links. For files on your computer, upload them in the [VideoDB console](https://console.videodb.io) into the same collection.
4. **Index, then search.** Use the prompts below.

Here are prompts to copy for each step.

**Create the library:**

```text
Create a VideoDB collection called "Marketing library"
for our webinars, demos and podcast episodes.
```

**What you get:** a new, empty collection, ready for videos.

**Add videos:**

```text
Add these videos to my "Marketing library" collection:
[paste one link per line]
```

**What you get:** each video uploaded to the collection, with its name and length.

**Index everything once:**

```text
Index what is said and what is shown in every video
in my "Marketing library" collection.
```

**What you get:** a spoken-word index and a scene index for each video. This is the step that makes the library searchable, and it only needs to run once per video.

**Search the whole library:**

```text
Search my "Marketing library" for every moment where
we explain how pricing works. Group the results by video,
with timestamps and a clip for each moment.
```

**What you get:** matching moments from every indexed video, grouped by video, each with a start and end time and a clip.

**Search what is shown:**

```text
Search the scenes in my "Marketing library" for a product
demo on a laptop screen, and list the moments by video.
```

**What you get:** the moments where that scene appears, found through the scene index rather than the transcript.

**Got something custom in mind? Just describe it.** For example:

```text
Find every moment in my library where a customer logo
appears on a slide, and list them by video.
```

**What you get:** the matching moments, found through the scene index, so you can reuse or check each one.

## Which index does each search need?

Each kind of question reads a different index. The AI picks the right one, and naming what you want in the prompt helps.

| You want to find | Index it needs | Example query |
|---|---|---|
| Something someone said | Spoken words | "where we explain how pricing works" |
| Something on screen | Scenes | "a dashboard with a bar chart" |
| Text on slides or signs | On-screen text (OCR) | "the slide titled Roadmap" |
| A video by its name | None, just the title | "the onboarding call from March" |

Write the scene prompt for the questions your team asks. A prompt that names "people, products, slides and on-screen text" makes those things searchable later. VideoDB's [accuracy tips](https://docs.videodb.io/pages/understand/quality-and-evaluation/accuracy-tips) cover this in more depth.

## How do you build a video search engine in Python?

Once the search needs to live in your own app or site, move it into code. Install the SDK with `pip install videodb` and get an API key from the [VideoDB console](https://console.videodb.io).

This example follows the calls in the [VideoDB docs](https://docs.videodb.io/pages/understand/legacy-indexing-search/collection-search) and the [Python SDK README](https://github.com/video-db/videodb-python). Method names can change between SDK versions, so check them there before you build on it.

```python
import time
import videodb
from collections import defaultdict
from videodb import IndexType, SceneExtractionType
from videodb.exceptions import InvalidRequestError

conn = videodb.connect(api_key="YOUR_API_KEY")

# 1. One collection is one searchable library
coll = conn.create_collection(
    name="Marketing library",
    description="Webinars, demos and podcast episodes we own",
)

# 2. Add each video with a tag, then index what is said and shown
library = [
    ("https://example.com/webinars/q3-webinar.mp4", "webinar"),
    ("https://www.youtube.com/watch?v=VIDEO_ID", "podcast"),
]
for url, kind in library:
    video = coll.upload(url=url)  # local files: coll.upload(file_path="demo.mp4")
    video.index_spoken_words()    # waits until the transcript index is ready
    scene_index_id = video.index_scenes(
        extraction_type=SceneExtractionType.shot_based,
        prompt="Describe the people, products, slides and any on-screen text.",
        metadata={"type": kind},  # lets you filter scene search by tag
    )
    while True:  # index_scenes returns while the index is still processing
        status = next(i["status"] for i in video.list_scene_index()
                      if i["scene_index_id"] == scene_index_id)
        if status == "done":
            break
        if status == "failed":
            raise RuntimeError(f"Scene indexing failed for {video.id}")
        time.sleep(10)

# 3. One search function for the whole library
def search_library(query, shown=False, kind=None):
    try:
        if shown:  # what is shown, optionally only videos with one tag
            extra = {"filter": [{"type": kind}]} if kind else {}
            results = coll.search(query=query, index_type=IndexType.scene, **extra)
        else:      # what is said
            results = coll.legacy_search(query)
    except InvalidRequestError as e:  # raised when nothing matches
        if "No results found" in str(e) or "Query scene index failed" in str(e):
            return {}, None
        raise
    by_video = defaultdict(list)
    for shot in results.get_shots():
        by_video[shot.video_id].append((shot.start, shot.end, shot.text))
    return dict(by_video), results.compile()

moments, reel = search_library("how pricing works")
moments, reel = search_library("a product demo on a laptop", shown=True, kind="webinar")
```

**What you get:** for each query, the matching moments grouped by video, with start, end and text, plus one stream that plays every match back to back. Put a search box in front of `search_library` and you have a video search engine.

A few choices to make as you build it out:

- **One collection per library or per client.** Search runs across a whole collection, so the collection is your first filter.
- **Tags for narrower search.** Scene indexes take up to five metadata tags, such as type, team or year. See [metadata filtering](https://docs.videodb.io/pages/understand/legacy-indexing-search/collection-search).
- **Play results anywhere.** Each match and each compiled stream is a playable link. See [timestamps, clips and streams](https://docs.videodb.io/pages/understand/legacy-indexing-search/timestamps-clips-streams).

## What does a search result look like?

Here is an illustrative answer to "where do we explain how pricing works?" across a six-video library:

| Video | Moment | What happens |
|---|---|---|
| Q3 webinar | 12:04 to 13:20 | The host walks through the three plans |
| Q3 webinar | 41:10 to 42:02 | A viewer asks about annual billing |
| Pricing FAQ | 0:35 to 1:50 | The team explains how usage is billed |
| Podcast ep. 12 | 27:45 to 29:10 | The founder explains why the free tier exists |

Every row has a clip link, so you can check a moment in seconds before you share it, quote it or cut it.

## Good to know before you start

- **Index once, search anytime.** Each video is indexed once, and then stays searchable in its collection. Indexing uses credits, so index the videos you will search.
- **Exact words for one video, meaning for many.** Search a whole library by meaning, and use exact-word search inside a single video when you need one specific line.
- **Your scene prompt sets what is findable.** Name the people, products and text your team searches for, and the scene index will describe them.
- **Local files start in the console.** Upload them in the VideoDB console, then index and search from chat or code.

## What else can you build with VideoDB?

A searchable library is the base for more. The [VideoDB examples and tutorials](https://docs.videodb.io/examples-and-tutorials) include keyword search compilations, multimodal search that combines what is said and shown, conference slide extraction, and highlight clips from a prompt.

## FAQ

### What is a video search engine?

A video search engine searches inside videos, not just their titles. It indexes what is said and shown in each video, and returns the exact moments that match your query, with timestamps and a clip you can play.

### Can I build a video search engine without code?

Yes. Connect VideoDB to Claude or ChatGPT, add your videos to a collection, and ask the AI to index and search them. Developers can build the same search into an app with the VideoDB Python SDK.

### Can it search my own video files?

Yes. Upload local files in the VideoDB console, or add videos from a public link or a YouTube link. Use videos you own or have permission to use.

### Can I search only part of my library?

Yes. Keep separate libraries as separate collections, or tag videos with metadata when you index them and filter your search by those tags in code.

### Is it free to try?

New VideoDB accounts get \$10 of free credits, and no credit card is needed. Uploading, indexing and search use those credits.

## Search your library today

Add VideoDB to [Claude](https://claude.ai/directory/videodb) or [ChatGPT](https://chatgpt.com/plugins/videodb), put ten of your videos in one collection, and search them for the question your team asks most.

**Next, try:** [search inside a long video](/blog/find-exact-moment-video) for single-video search tips, or [build your own video social-listening tool](/blog/build-video-social-listening-tool) for a library search that runs on a schedule.

## FAQ

**What is a video search engine?**

A video search engine searches inside videos, not just their titles. It indexes what is said and shown in each video, and returns the exact moments that match your query, with timestamps and a clip you can play.

**Can I build a video search engine without code?**

Yes. Connect VideoDB to Claude or ChatGPT, add your videos to a collection, and ask the AI to index and search them. Developers can build the same search into an app with the VideoDB Python SDK.

**Can it search my own video files?**

Yes. Upload local files in the VideoDB console, or add videos from a public link or a YouTube link. Use videos you own or have permission to use.

**Can I search only part of my library?**

Yes. Keep separate libraries as separate collections, or tag videos with metadata when you index them and filter your search by those tags in code.

**Is it free to try?**

New VideoDB accounts get $10 of free credits, and no credit card is needed. Uploading, indexing and search use those credits.

Next step: [Get started free](https://console.videodb.io/auth?utm_source=blog&utm_medium=organic&utm_campaign=video-library-search-engine)

## Use VideoDB in your agent

VideoDB lets an AI agent watch, search and clip video.

- **Claude**: [Add VideoDB from the plugin directory](https://videodb.io/claude)
- **ChatGPT**: [Add VideoDB from the plugin directory](https://chatgpt.com/plugins/videodb)
- **Claude Code**: `claude mcp add --transport http videodb https://mcp.videodb.io/mcp`
- **Cursor or any MCP client**: Add the remote MCP server and log in once: `https://mcp.videodb.io/mcp`

Free to start: $10 of credits, no credit card. [Steps for every client](https://docs.videodb.io/pages/mcp/connect).
