$npx -y skills add brave/brave-search-skills --skill videos-searchUSE FOR video search. Returns videos with title, URL, thumbnail, duration, view count, creator. Supports freshness filters, SafeSearch, pagination.
| 1 | # Videos Search |
| 2 | |
| 3 | > **Requires API Key**: Get one at https://api.search.brave.com |
| 4 | > |
| 5 | > **Plan**: Included in the **Search** plan. See https://api-dashboard.search.brave.com/app/subscriptions/subscribe |
| 6 | |
| 7 | ## Quick Start (cURL) |
| 8 | |
| 9 | ### Basic Search |
| 10 | ```bash |
| 11 | curl -s "https://api.search.brave.com/res/v1/videos/search?q=python+tutorial" \ |
| 12 | -H "Accept: application/json" \ |
| 13 | -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" |
| 14 | ``` |
| 15 | |
| 16 | ### With Parameters |
| 17 | ```bash |
| 18 | curl -s "https://api.search.brave.com/res/v1/videos/search" \ |
| 19 | -H "Accept: application/json" \ |
| 20 | -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \ |
| 21 | -G \ |
| 22 | --data-urlencode "q=machine learning explained" \ |
| 23 | --data-urlencode "country=US" \ |
| 24 | --data-urlencode "search_lang=en" \ |
| 25 | --data-urlencode "count=20" \ |
| 26 | --data-urlencode "freshness=pm" |
| 27 | ``` |
| 28 | |
| 29 | ## Endpoint |
| 30 | |
| 31 | ```http |
| 32 | GET https://api.search.brave.com/res/v1/videos/search |
| 33 | POST https://api.search.brave.com/res/v1/videos/search |
| 34 | ``` |
| 35 | |
| 36 | **Authentication**: `X-Subscription-Token: <API_KEY>` header |
| 37 | |
| 38 | **Note**: Both GET and POST methods are supported. POST is useful for long queries. |
| 39 | |
| 40 | ## Parameters |
| 41 | |
| 42 | | Parameter | Type | Required | Default | Description | |
| 43 | |--|--|--|--|--| |
| 44 | | `q` | string | **Yes** | - | Search query (1-400 chars, max 50 words) | |
| 45 | | `country` | string | No | `US` | Search country (2-letter country code or `ALL`) | |
| 46 | | `search_lang` | string | No | `en` | Language preference (2+ char language code) | |
| 47 | | `ui_lang` | string | No | `en-US` | UI language (e.g., "en-US") | |
| 48 | | `count` | int | No | `20` | Number of results (1-50) | |
| 49 | | `offset` | int | No | `0` | Page offset (0-9) | |
| 50 | | `safesearch` | string | No | `moderate` | Adult content filter (`off`/`moderate`/`strict`) | |
| 51 | | `freshness` | string | No | - | Time filter (`pd`/`pw`/`pm`/`py` or date range) | |
| 52 | | `spellcheck` | bool | No | `true` | Auto-correct query | |
| 53 | | `operators` | bool | No | `true` | Apply search operators | |
| 54 | | `include_fetch_metadata` | bool | No | `false` | Include `fetched_content_timestamp` in results | |
| 55 | |
| 56 | ### Freshness Values |
| 57 | |
| 58 | | Value | Description | |
| 59 | |--|--| |
| 60 | | `pd` | Past day (24 hours) | |
| 61 | | `pw` | Past week (7 days) | |
| 62 | | `pm` | Past month (31 days) | |
| 63 | | `py` | Past year (365 days) | |
| 64 | | `YYYY-MM-DDtoYYYY-MM-DD` | Custom date range | |
| 65 | |
| 66 | ## Response Format |
| 67 | |
| 68 | ```json |
| 69 | { |
| 70 | "type": "videos", |
| 71 | "query": { |
| 72 | "original": "python tutorial", |
| 73 | "spellcheck_off": false |
| 74 | }, |
| 75 | "extra": { |
| 76 | "might_be_offensive": false |
| 77 | }, |
| 78 | "results": [ |
| 79 | { |
| 80 | "type": "video_result", |
| 81 | "title": "Python Tutorial for Beginners", |
| 82 | "url": "https://www.youtube.com/watch?v=rfscVS0vtbw", |
| 83 | "description": "Learn Python programming from scratch...", |
| 84 | "age": "February 12, 2025", |
| 85 | "page_age": "2025-02-12T00:00:00", |
| 86 | "page_fetched": "2025-02-12T15:00:00Z", |
| 87 | "thumbnail": { |
| 88 | "src": "https://imgs.search.brave.com/...", |
| 89 | "original": "https://i.ytimg.com/vi/rfscVS0vtbw/hqdefault.jpg" |
| 90 | }, |
| 91 | "video": { |
| 92 | "duration": "03:45:00", |
| 93 | "views": 1523000, |
| 94 | "creator": "freeCodeCamp", |
| 95 | "publisher": "YouTube", |
| 96 | "requires_subscription": false, |
| 97 | "tags": ["python", "programming"], |
| 98 | "author": { |
| 99 | "name": "freeCodeCamp.org", |
| 100 | "url": "https://www.youtube.com/@freecodecamp" |
| 101 | } |
| 102 | }, |
| 103 | "meta_url": { |
| 104 | "scheme": "https", |
| 105 | "netloc": "youtube.com", |
| 106 | "hostname": "www.youtube.com", |
| 107 | "favicon": "https://imgs.search.brave.com/...", |
| 108 | "path": "\u203a watch" |
| 109 | } |
| 110 | } |
| 111 | ] |
| 112 | } |
| 113 | ``` |
| 114 | |
| 115 | ## Response Fields |
| 116 | |
| 117 | | Field | Type | Description | |
| 118 | |--|--|--| |
| 119 | | `type` | string | Always `"videos"` | |
| 120 | | `query.original` | string | The original search query | |
| 121 | | `query.altered` | string? | Spellcheck-corrected query (if changed) | |
| 122 | | `query.cleaned` | string? | Cleaned/normalized query | |
| 123 | | `query.spellcheck_off` | bool? | Whether spellcheck was disabled | |
| 124 | | `query.show_strict_warning` | bool? | True if strict safesearch blocked adult results | |
| 125 | | `query.search_operators` | object? | Applied search operators (`applied`, `cleaned_query`, `sites`) | |
| 126 | | `extra.might_be_offensive` | bool | Whether results may contain offensive content | |
| 127 | | `results[].type` | string | Always `"video_result"` | |
| 128 | | `results[].url` | string | Source URL of the video | |
| 129 | | `results[].title` | string | Video title | |
| 130 | | `results[].description` | string? | Video description | |
| 131 | | `results[].age` | string? | Human-readable age (e.g. "6 months ago") or absolute date (e.g. "February 12, 2025") | |
| 132 | | `results[].page_age` | string? | Page age from source (ISO datetime) | |
| 133 | | `results[].page_fetched` | string? | ISO datetime when page was last fetched (e.g. `2025-02-12T15:00:00Z`) | |
| 134 | | `results[].fetched_content_timestamp` | int? | Fetch timestamp (only with `include_fetch_metadata=true`) | |
| 135 | | `results[].video.duration` | string? | Time string (varia |