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

# Video search

> Search from a specialized index of video content across platforms with filtering and freshness options

## Overview

Video Search provides access to a dedicated index of video content from various platforms and sources across the web. Our service indexes video content continuously, enabling you to retrieve relevant videos, tutorials, entertainment content, and more for your applications.

## Key Features

<CardGroup cols={2}>
  <Card title="Video-Specific Index" icon="video">
    Search across a curated index of video content from multiple platforms and
    sources
  </Card>

  <Card title="Freshness Filtering" icon="clock">
    Filter results by discovery date - from last 24 hours to custom date ranges
  </Card>

  <Card title="Country & Language Options" icon="language">
    Target videos from specific countries and in preferred languages
  </Card>

  <Card title="Safe Search Filtering" icon="shield-check">
    Control adult content filtering with flexible options
  </Card>
</CardGroup>

## API Reference

<Card title="Video Search API Documentation" icon="code" href="/api-reference/video/search">
  View the complete API reference, including endpoints, parameters, and example
  requests
</Card>

## Use Cases

Video Search is perfect for:

* **Video Platforms**: Build video discovery and recommendation features
* **Educational Applications**: Find tutorials, lectures, and instructional content
* **Content Aggregation**: Gather video content from across the web
* **Entertainment Apps**: Discover movies, shows, and entertainment content
* **Media Monitoring**: Track video mentions and brand coverage across platforms

## Freshness Filtering

Video Search offers powerful date-based filtering to help you find the most relevant content:

* **Last 24 Hours** (`pd`): Get the latest uploaded videos
* **Last 7 Days** (`pw`): Track weekly video content
* **Last 31 Days** (`pm`): Monitor monthly uploads
* **Last Year** (`py`): Search annual video coverage
* **Custom Date Range**: Specify exact timeframes (e.g., `2022-04-01to2022-07-30`)

Example request filtering for videos from the past week:

```bash theme={null}
curl -s --compressed "https://api.search.brave.com/res/v1/videos/search?q=machine+learning+tutorial&freshness=pw" \
  -H "Accept: application/json" \
  -H "Accept-Encoding: gzip" \
  -H "X-Subscription-Token: <YOUR_API_KEY>"
```

## Country and Language Targeting

Customize your video search results by specifying:

* **Country**: Target videos from specific countries using 2-character country codes
* **Search Language**: Filter results by content language
* **UI Language**: Set the preferred language for response metadata

Example request for Spanish videos from Spain:

```bash theme={null}
curl -s --compressed "https://api.search.brave.com/res/v1/videos/search?q=recetas+de+cocina&country=ES&search_lang=es" \
  -H "Accept: application/json" \
  -H "Accept-Encoding: gzip" \
  -H "X-Subscription-Token: <YOUR_API_KEY>"
```

## Search Operators

Video Search supports [search operators](https://search.brave.com/help/operators) to refine your queries:

* Use quotes for exact phrase matching: `"python programming"`
* Exclude terms with minus: `cooking -vegan`
* Site-specific searches: `site:youtube.com fitness workout`

## Pagination

Efficiently paginate through video results:

* **count**: Number of results per page (max 50, default 20)
* **offset**: Page number to retrieve (0-based, max 9)

Example request for page 2 with 20 results per page:

```bash theme={null}
curl -s --compressed "https://api.search.brave.com/res/v1/videos/search?q=travel+vlog&count=20&offset=1" \
  -H "Accept: application/json" \
  -H "Accept-Encoding: gzip" \
  -H "X-Subscription-Token: <YOUR_API_KEY>"
```

## Safe Search

Control adult content filtering with the `safesearch` parameter:

* **off**: No filtering
* **moderate**: Filter explicit content (default)
* **strict**: Filter explicit and suggestive content

This is particularly important for applications targeting family-friendly or educational audiences.

## Spellcheck

Video Search includes automatic spellcheck functionality to improve search accuracy:

* Enabled by default
* Automatically corrects common misspellings
* The modified query is used for search and available in the response

To disable spellcheck:

```bash theme={null}
curl -s --compressed "https://api.search.brave.com/res/v1/videos/search?q=tutorial&spellcheck=false" \
  -H "Accept: application/json" \
  -H "Accept-Encoding: gzip" \
  -H "X-Subscription-Token: <YOUR_API_KEY>"
```

## Example: Complete Search Request

Here's a comprehensive example combining multiple parameters:

```bash theme={null}
curl -s --compressed "https://api.search.brave.com/res/v1/videos/search?q=photography+tips&country=US&search_lang=en&count=25&freshness=pm&safesearch=strict" \
  -H "Accept: application/json" \
  -H "Accept-Encoding: gzip" \
  -H "X-Subscription-Token: <YOUR_API_KEY>"
```

This request:

* Searches for "photography tips"
* Targets US content
* Returns English language results
* Retrieves 25 results
* Filters to videos from the past month
* Applies strict safe search filtering

## Changelog

This changelog outlines all significant changes to the Brave Video Search API in chronological order.

* **2023-06-20** Add Brave Video Search API resource.
* **2024-02-15** Add freshness filtering with custom date ranges.
* **2024-11-05** Improve search operators support.
