### Comprehensive Video Search Request Example Source: https://api-dashboard.search.brave.com/app/documentation/video-search/get-started This example demonstrates a complete video search request, combining query, country, language, result count, freshness, and safe search parameters. It targets US videos in English from the past month with strict safe search. ```curl curl "https://api.search.brave.com/res/v1/videos/search?q=photography+tips&country=US&search_lang=en&count=25&freshness=pm&safesearch=strict" \ -H "X-Subscription-Token: " ``` -------------------------------- ### Paginate Video Search Results (Page 2) Source: https://api-dashboard.search.brave.com/app/documentation/video-search/get-started Retrieve the second page of results (offset=1) with 20 items per page (count=20) for a video search query. Adjust 'count' and 'offset' as needed for your pagination strategy. ```curl curl "https://api.search.brave.com/res/v1/videos/search?q=travel+vlog&count=20&offset=1" \ -H "X-Subscription-Token: " ``` -------------------------------- ### Filter Videos by Freshness (Past Week) Source: https://api-dashboard.search.brave.com/app/documentation/video-search/get-started Use the 'freshness' parameter with 'pw' to filter video search results for content discovered in the past week. Ensure you replace with your actual subscription token. ```curl curl "https://api.search.brave.com/res/v1/videos/search?q=machine+learning+tutorial&freshness=pw" \ -H "X-Subscription-Token: " ``` -------------------------------- ### Target Spanish Videos from Spain Source: https://api-dashboard.search.brave.com/app/documentation/video-search/get-started Specify 'ES' for the 'country' parameter and 'es' for 'search_lang' to retrieve Spanish-language videos from Spain. Remember to include your API key. ```curl curl "https://api.search.brave.com/res/v1/videos/search?q=recetas+de+cocina&country=ES&search_lang=es" \ -H "X-Subscription-Token: " ``` -------------------------------- ### Video Search API Source: https://api-dashboard.search.brave.com/app/documentation/video-search/get-started Search across a curated index of video content from multiple platforms and sources with advanced filtering options. ```APIDOC ## GET /res/v1/videos/search ### Description Sends a query to retrieve relevant video results from a dedicated index. Supports various filtering and pagination options. ### Method GET ### Endpoint https://api.search.brave.com/res/v1/videos/search ### Parameters #### Query Parameters - **q** (string) - Required - The search query string. - **freshness** (string) - Optional - Filters results by discovery date. Options: `pd` (last 24 hours), `pw` (last 7 days), `pm` (last 31 days), `py` (last year), or a custom date range (e.g., `2022-04-01to2022-07-30`). - **country** (string) - Optional - Targets videos from specific countries using 2-character country codes (e.g., `US`, `ES`). - **search_lang** (string) - Optional - Filters results by content language. - **ui_lang** (string) - Optional - Sets the preferred language for response metadata. - **count** (integer) - Optional - Number of results per page. Max 50, default 20. - **offset** (integer) - Optional - Page number to retrieve. 0-based, max 9. - **safesearch** (string) - Optional - Controls adult content filtering. Options: `off`, `moderate` (default), `strict`. - **spellcheck** (boolean) - Optional - Enables or disables automatic spellcheck. Default is `true`. ### Request Example ```json { "example": "curl \"https://api.search.brave.com/res/v1/videos/search?q=machine+learning+tutorial&freshness=pw\" \ -H \"X-Subscription-Token: \"" } ``` ### Response #### Success Response (200) - **videos** (array) - List of video result objects. - **query_context** (object) - Information about the search query, including potential spell corrections. #### Response Example ```json { "example": "{\"videos\": [{\"title\": \"Machine Learning Tutorial for Beginners\", \"url\": \"https://www.youtube.com/watch?v=example1\", \"thumbnail\": \"https://img.youtube.com/vi/example1/default.jpg\", \"publisher\": \"YouTube\", \"published\": \"2023-10-26T10:00:00Z\"}, ...], \"query_context\": {\"original_query\": \"machine lerning tutorial\", \"corrected_query\": \"machine learning tutorial\"}}" } ``` ``` -------------------------------- ### Disable Spellcheck in Video Search Source: https://api-dashboard.search.brave.com/app/documentation/video-search/get-started To disable the automatic spellcheck functionality, set the 'spellcheck' parameter to 'false' in your API request. This is useful if you want to preserve the original query. ```curl curl "https://api.search.brave.com/res/v1/videos/search?q=tutorial&spellcheck=false" \ -H "X-Subscription-Token: " ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.