qstringआवश्यक
The user’s search query term. Query can not be empty. Maximum of 400 characters and 50 words in the query.
https://api.sandbase.ai/v1/api/brave/videosVideo Search from Brave. Returns the official Brave API response unchanged.
आपका आउटपुट यहाँ दिखाई देगा
इनपुट पूरा करें, फिर Run पर क्लिक करें।
Returns video search results for a text query, in the same shape as the Brave video search response. Each result has a title, page URL, description, thumbnail and video details such as creator and duration. The only required input is q.
video.author.name and meta_url.hostname.freshness parameter and sort them by page_age.curl -X POST "https://api.sandbase.ai/v1/api/brave/videos" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"q": "how to brew pour over coffee"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
q | string | Yes | The user’s search query term. Query can not be empty. Maximum of 400 characters and 50 words in the query. |
count | integer | No | The number of search results returned in response. The maximum is 50. The actual number delivered may be less than requested. Combine this parameter with offset to paginate search results. |
country | string | No | The search query country, where the results come from. The country string is limited to 2 character country codes of supported countries or ALL for worldwide. |
freshness | string | No | Filters search results by page age. The age of a page is determined by the most relevant date reported by the content, such as its published or last modified date. The following values are supported: pd - Pages aged 24 h |
include_fetch_metadata | boolean | No | Include fetch metadata. |
offset | integer | No | The zero based offset that indicates number of search results per page (count) to skip before returning the result. The maximum is 9. The actual number delivered may be less than requested based on the query. In order to |
operators | boolean | No | Whether to apply search operators. |
safesearch | string | No | Filters search results for adult content. The following values are supported: off - No filtering is done. moderate - Filters explicit content, like images and videos, but allows adult domains in the search results. stric |
search_lang | string | No | The search language preference. The 2 or more character language code for which the search results are provided. |
spellcheck | boolean | No | Whether to spell check the provided query. If the spellchecker is enabled, the modified query is always used for search. The modified query can be found in altered key from the query response model. |
ui_lang | string | No | User interface language preferred in response. Usually of the format <language_code>-<country_code> . For more, see RFC 9110 . |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"extra": {
"might_be_offensive": false
},
"query": {
"original": "how to brew pour over coffee",
"show_strict_warning": false,
"spellcheck_off": false
},
"results": [
{
"age": "December 9, 2023",
"description": "Our friend Alex Kaplan (once the youngest certified Q Coffee Grader...ever, and …",
"meta_url": {
"favicon": "https://imgs.search.brave.com/Wg4wjE5SHAargkzePU3eSLmWgVz84BEZk1SjSglJK_U/rs:fit…",
"hostname": "www.youtube.com",
"netloc": "youtube.com",
"path": "› watch",
"scheme": "https"
},
"page_age": "2023-12-09T03:17:01",
"thumbnail": {
"original": "https://i.ytimg.com/vi/FQWhY5mPGRg/maxresdefault.jpg",
"src": "https://imgs.search.brave.com/Fv39Vqg-ITsz3QmtENVl0tXCnnXCezNKJCE-GPB_fLc/rs:fit…"
},
"title": "A beginner's guide to POUR-OVER COFFEE - YouTube",
"type": "video_result",
"url": "https://www.youtube.com/watch?v=FQWhY5mPGRg",
"video": {
"author": {
"name": "Majordomo",
"url": "http://www.youtube.com/@majordomomedia"
},
"creator": "Majordomo",
"duration": "06:07",
"publisher": "YouTube",
"requires_subscription": false,
"tags": [
"los angeles food"
],
"views": 8906
}
}
],
"type": "videos"
}
| Field | Meaning |
|---|---|
results[].title | Title of the video page. |
results[].url | Link to the page that hosts the video. |
results[].description | Short text from the video page. It can be cut off. |
results[].age / results[].page_age | Publish date of the page. age is a readable date such as December 9, 2023. page_age is an ISO style timestamp such as 2023-12-09T03:17:01. |
results[].video.author.name / results[].video.author.url | Name and channel link of the video author. |
results[].video.creator / results[].video.publisher | Creator name and the platform that publishes the video, such as YouTube. |
results[].video.duration | Length of the video as a text value such as 06:07. |
results[].video.views | View count. This key is missing on some results. |
results[].thumbnail.src / results[].thumbnail.original | Thumbnail URLs. src is a resized copy and original points to the image on the source site. |
results[].meta_url.hostname | Host name of the result page. It shows which site the video comes from. |
video.views, video.tags and video.requires_subscription, appear only on some results. Check that they exist before you read them.count (up to 50) with offset (0 to 9). offset counts pages of count results.query.original field echoes your query. With spellcheck on, the search may use a changed query.$0.005 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
बिल्डिंग शुरू करें
एकीकृत authentication और usage tracking के साथ Platform API endpoint.
curl -X POST "https://api.sandbase.ai/v1/api/brave/videos" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": "how to brew pour over coffee",
"count": 20,
"offset": 0,
"country": "US",
"ui_lang": "en-US",
"freshness": "",
"operators": true,
"safesearch": "moderate",
"spellcheck": true,
"search_lang": "en",
"include_fetch_metadata": false
}'अपने SandBase API key को अपने सर्वर environment में सेट करें। Requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"अपना key सर्वर पर रखें। इसे browser code में expose न करें।
qstringआवश्यकThe user’s search query term. Query can not be empty. Maximum of 400 characters and 50 words in the query.
countintegerThe number of search results returned in response. The maximum is 50. The actual number delivered may be less than requested. Combine this parameter with offset to paginate search results.
डिफ़ॉल्ट: 20
countrystringThe search query country, where the results come from. The country string is limited to 2 character country codes of supported countries or ALL for worldwide.
डिफ़ॉल्ट: "US"
संभावित मान: AR, AU, AT, BE, BR, CA, CL, DK, FI, FR, DE, GR, HK, IN, ID, IT, JP, KR, MY, MX, NL, NZ, NO, CN, PL, PT, PH, RU, SA, ZA, ES, SE, CH, TW, TR, GB, US, ALL
freshnessstringFilters search results by page age. The age of a page is determined by the most relevant date reported by the content, such as its published or last modified date. The following values are supported: pd - Pages aged 24 hours or less. pw - Pages aged 7 days or less. pm - Pages aged 31 days or less. p
डिफ़ॉल्ट: ""
include_fetch_metadatabooleanInclude fetch metadata.
डिफ़ॉल्ट: false
offsetintegerThe zero based offset that indicates number of search results per page (count) to skip before returning the result. The maximum is 9. The actual number delivered may be less than requested based on the query. In order to paginate results use this parameter together with count. For example, if your u
डिफ़ॉल्ट: 0
operatorsbooleanWhether to apply search operators.
डिफ़ॉल्ट: true
safesearchstringFilters search results for adult content. The following values are supported: off - No filtering is done. moderate - Filters explicit content, like images and videos, but allows adult domains in the search results. strict - Drops all adult content from search results.
डिफ़ॉल्ट: "moderate"
संभावित मान: off, moderate, strict
search_langstringThe search language preference. The 2 or more character language code for which the search results are provided.
डिफ़ॉल्ट: "en"
संभावित मान: ar, eu, bn, bg, ca, zh-hans, zh-hant, hr, cs, da, nl, en, en-gb, et, fi, fr, gl, de, el, gu, he, hi, hu, is, it, ja, jp, kn, ko, lv, lt, ms, ml, mr, nb, pl, pt-br, pt-pt, pa, ro, ru, sr, sk, sl, es, sv, ta, te, th, tr, uk, vi
spellcheckbooleanWhether to spell check the provided query. If the spellchecker is enabled, the modified query is always used for search. The modified query can be found in altered key from the query response model.
डिफ़ॉल्ट: true
ui_langstringUser interface language preferred in response. Usually of the format <language_code>-<country_code> . For more, see RFC 9110 .
डिफ़ॉल्ट: "en-US"
संभावित मान: es-AR, en-AU, de-AT, nl-BE, fr-BE, pt-BR, en-CA, fr-CA, es-CL, da-DK, fi-FI, fr-FR, de-DE, el-GR, zh-HK, en-IN, en-ID, it-IT, ja-JP, ko-KR, en-MY, es-MX, nl-NL, en-NZ, no-NO, zh-CN, pl-PL, en-PH, ru-RU, en-ZA, es-ES, sv-SE, fr-CH, de-CH, zh-TW, tr-TR, en-GB, en-US, es-US
इस API के लिए सेव किया गया example response; इसे देखते समय कोई live request नहीं की जाती।
कोई सेव response प्रकाशित नहीं किया गया है। इसका response देखने के लिए Playground में API चलाएँ।
और जानें
| API | कीमत | प्रतिक्रिया |
|---|---|---|
Brave Video Searchयह API Brave | $0.005 प्रति कॉल | JSON |
Brave | $0.01 प्रति कॉल | JSON |
Brave | $0.005 प्रति कॉल | JSON |
Brave | $0.005 प्रति कॉल | JSON |
Brave | $0.005 प्रति कॉल | JSON |
Brave | $0.005 प्रति कॉल | JSON |
प्रश्न
https://api.sandbase.ai/v1/api/brave/videos पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।
$0.005 प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।
आवश्यक: q (string)। वैकल्पिक: count (integer), country (AR, AU, AT, BE, BR, CA, CL, DK, FI, FR, DE, GR, HK, IN, ID, IT, JP, KR, MY, MX, NL, NZ, NO, CN, PL, PT, PH, RU, SA, ZA, ES, SE, CH, TW, TR, GB, US, ALL में से एक), freshness (string), include_fetch_metadata (boolean), offset (integer) और operators (boolean) और 4 और। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।
एक JSON response जो उसी HTTP request में लौटाया जाता है (synchronous)। इस पेज का README एक sample response शामिल करता है।
नहीं। Brave Video Search SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से Brave API access के लिए आवेदन करने की आवश्यकता नहीं है।