curl --request GET \
--url https://api.aisa.one/apis/v1/brave/videos/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/brave/videos/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/brave/videos/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/brave/videos/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/brave/videos/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/brave/videos/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/brave/videos/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"extra": {
"might_be_offensive": false
},
"query": {
"original": "<string>",
"altered": "<string>",
"cleaned": "<string>",
"search_operators": {
"applied": false,
"cleaned_query": "<string>",
"sites": [
"<string>"
]
},
"show_strict_warning": true,
"spellcheck_off": true
},
"results": [],
"type": "videos"
}Video Search
Video Search
curl --request GET \
--url https://api.aisa.one/apis/v1/brave/videos/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/brave/videos/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/brave/videos/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/brave/videos/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/brave/videos/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/brave/videos/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/brave/videos/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"extra": {
"might_be_offensive": false
},
"query": {
"original": "<string>",
"altered": "<string>",
"cleaned": "<string>",
"search_operators": {
"applied": false,
"cleaned_query": "<string>",
"sites": [
"<string>"
]
},
"show_strict_warning": true,
"spellcheck_off": true
},
"results": [],
"type": "videos"
}请求规范
- 方法与路径: GET /apis/v1/brave/videos/search
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/brave/videos/search - accept: header; 可选
- api-version: header; 可选
- cache-control: header; 可选
- user-agent: header; 可选
- count: query; 可选
- country: query; 可选
- freshness: query; 可选
- include_fetch_metadata: query; 可选
- offset: query; 可选
- operators: query; 可选
- q: query; 必填
- safesearch: query; 可选
- search_lang: query; 可选
- spellcheck: query; 可选
- ui_lang: query; 可选
{
"operationId": "get_any_brave_search_apis_v1_brave_videos_search",
"method": "GET",
"path": "/apis/v1/brave/videos/search",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"deprecated": false,
"description": "The default supported media type is application/json.",
"examples": {
"0": {
"value": "application/json"
}
},
"in": "header",
"name": "accept",
"required": false,
"schema": {
"allOf": [
{
"enum": [
"application/json",
"*/*"
],
"title": "Accept",
"type": "string"
},
{
"default": "application/json"
}
],
"description": "The default supported media type is application/json.",
"examples": [
"application/json"
],
"title": "Media type"
}
},
{
"deprecated": false,
"description": "The API version to use. This is denoted by the format <code>YYYY-MM-DD</code>. Default is the latest that is available. Read more about <a href=\"/documentation/guides/versioning\">API versioning</a>.",
"in": "header",
"name": "api-version",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The API version to use. This is denoted by the format <code>YYYY-MM-DD</code>. Default is the latest that is available. Read more about <a href=\"/documentation/guides/versioning\">API versioning</a>.",
"title": "API version"
}
},
{
"deprecated": false,
"description": "Brave Search will return cached content by default. To prevent caching set the Cache-Control header to <code>no-cache</code>. This is currently done as best effort.",
"in": "header",
"name": "cache-control",
"required": false,
"schema": {
"anyOf": [
{
"const": "no-cache",
"enum": [
"no-cache"
],
"title": "CacheControl",
"type": "string"
},
{
"type": "null"
}
],
"description": "Brave Search will return cached content by default. To prevent caching set the Cache-Control header to <code>no-cache</code>. This is currently done as best effort.",
"title": "Cache control"
}
},
{
"deprecated": false,
"description": "The user agent originating the request. Brave search can utilize the user agent to provide a different experience depending on the device as described by the string. The user agent should follow the commonly used browser agent strings on each platform. For more information on curating user agents, see <a href=\"https://www.rfc-editor.org/rfc/rfc9110.html#name-user-agent\">RFC 9110</a>.",
"examples": {
"Android": {
"description": "Android",
"value": "Mozilla/5.0 (Linux; Android 12) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.71 Mobile Safari/537.36"
},
"Windows": {
"description": "Windows",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"
},
"iOS": {
"description": "iOS",
"value": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/103.0.5060.63 Mobile/15E148 Safari/604.1"
},
"macOS": {
"description": "macOS",
"value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"
}
},
"in": "header",
"name": "user-agent",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The user agent originating the request. Brave search can utilize the user agent to provide a different experience depending on the device as described by the string. The user agent should follow the commonly used browser agent strings on each platform. For more information on curating user agents, see <a href=\"https://www.rfc-editor.org/rfc/rfc9110.html#name-user-agent\">RFC 9110</a>.",
"title": "User agent"
}
},
{
"deprecated": false,
"description": "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.",
"in": "query",
"name": "count",
"required": false,
"schema": {
"default": 20,
"description": "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.",
"maximum": 50,
"minimum": 1,
"title": "Count",
"type": "integer"
}
},
{
"deprecated": false,
"description": "The search query country, where the results come from. The country string is limited to 2 character country codes of supported countries or <code>ALL</code> for worldwide.",
"in": "query",
"name": "country",
"required": false,
"schema": {
"allOf": [
{
"enum": [
"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"
],
"title": "SearchCountry",
"type": "string"
},
{
"default": "US"
}
],
"description": "The search query country, where the results come from. The country string is limited to 2 character country codes of supported countries or <code>ALL</code> for worldwide."
}
},
{
"deprecated": false,
"description": "<p>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:</p>\n<ul>\n<li><strong>pd</strong> - Pages aged 24 hours or less.</li>\n<li><strong>pw</strong> - Pages aged 7 days or less.</li>\n<li><strong>pm</strong> - Pages aged 31 days or less.</li>\n<li><strong>py</strong> - Pages aged 365 days or less.</li>\n<li><strong>YYYY-MM-DDtoYYYY-MM-DD</strong> - A custom date range is also supported by specifying start and end dates e.g. <code>2022-04-01to2022-07-30</code>.</li>\n</ul>",
"examples": {
"0": {
"value": ""
},
"1": {
"value": "pm"
},
"2": {
"value": "2022-04-01to2022-07-30"
}
},
"in": "query",
"name": "freshness",
"required": false,
"schema": {
"default": "",
"description": "<p>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:</p>\n<ul>\n<li><strong>pd</strong> - Pages aged 24 hours or less.</li>\n<li><strong>pw</strong> - Pages aged 7 days or less.</li>\n<li><strong>pm</strong> - Pages aged 31 days or less.</li>\n<li><strong>py</strong> - Pages aged 365 days or less.</li>\n<li><strong>YYYY-MM-DDtoYYYY-MM-DD</strong> - A custom date range is also supported by specifying start and end dates e.g. <code>2022-04-01to2022-07-30</code>.</li>\n</ul>",
"examples": [
"",
"pm",
"2022-04-01to2022-07-30"
],
"title": "Freshness",
"type": "string"
}
},
{
"deprecated": false,
"description": "Include fetch metadata.",
"examples": {
"1": {
"value": true
},
"2": {
"value": false
}
},
"in": "query",
"name": "include_fetch_metadata",
"required": false,
"schema": {
"default": false,
"description": "Include fetch metadata.",
"examples": [
true,
false
],
"title": "Include Fetch Metadata",
"type": "boolean"
}
},
{
"deprecated": false,
"description": "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 paginate results use this parameter together with count. For example, if your user interface displays 20 search results per page, set count to 20 and offset to 0 to show the first page of results. To get subsequent pages, increment offset by 1 (e.g. 0, 1, 2). The results may overlap across multiple pages.",
"in": "query",
"name": "offset",
"required": false,
"schema": {
"default": 0,
"description": "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 paginate results use this parameter together with count. For example, if your user interface displays 20 search results per page, set count to 20 and offset to 0 to show the first page of results. To get subsequent pages, increment offset by 1 (e.g. 0, 1, 2). The results may overlap across multiple pages.",
"maximum": 9,
"minimum": 0,
"title": "Offset",
"type": "integer"
}
},
{
"deprecated": false,
"description": "Whether to apply search operators.",
"examples": {
"1": {
"value": true
},
"2": {
"value": false
}
},
"in": "query",
"name": "operators",
"required": false,
"schema": {
"default": true,
"description": "Whether to apply search operators.",
"examples": [
true,
false
],
"title": "Operators",
"type": "boolean"
}
},
{
"deprecated": false,
"description": "The user’s search query term. Query can not be empty. Maximum of 400 characters and 50 words in the query.",
"in": "query",
"name": "q",
"required": true,
"schema": {
"description": "The user’s search query term. Query can not be empty. Maximum of 400 characters and 50 words in the query.",
"maxLength": 400,
"minLength": 1,
"title": "Q",
"type": "string"
}
},
{
"deprecated": false,
"description": "<p>Filters search results for adult content. The following values are supported:</p>\n<ul>\n<li><strong>off</strong> - No filtering is done.</li>\n<li><strong>moderate</strong> - Filters explicit content, like images and videos, but allows adult domains in the search results.</li>\n<li><strong>strict</strong> - Drops all adult content from search results.</li>\n</ul>",
"examples": {
"1": {
"value": "off"
},
"2": {
"value": "moderate"
},
"3": {
"value": "strict"
}
},
"in": "query",
"name": "safesearch",
"required": false,
"schema": {
"allOf": [
{
"enum": [
"off",
"moderate",
"strict"
],
"title": "SafeSearch",
"type": "string"
},
{
"default": "moderate"
}
],
"description": "<p>Filters search results for adult content. The following values are supported:</p>\n<ul>\n<li><strong>off</strong> - No filtering is done.</li>\n<li><strong>moderate</strong> - Filters explicit content, like images and videos, but allows adult domains in the search results.</li>\n<li><strong>strict</strong> - Drops all adult content from search results.</li>\n</ul>",
"examples": [
"off",
"moderate",
"strict"
],
"title": "Safe search"
}
},
{
"deprecated": false,
"description": "The search language preference. The 2 or more character language code for which the search results are provided.",
"in": "query",
"name": "search_lang",
"required": false,
"schema": {
"allOf": [
{
"enum": [
"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"
],
"title": "Language",
"type": "string"
},
{
"default": "en"
}
],
"description": "The search language preference. The 2 or more character language code for which the search results are provided."
}
},
{
"deprecated": false,
"description": "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.",
"examples": {
"1": {
"value": true
},
"2": {
"value": false
}
},
"in": "query",
"name": "spellcheck",
"required": false,
"schema": {
"default": true,
"description": "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.",
"examples": [
true,
false
],
"title": "Spellcheck",
"type": "boolean"
}
},
{
"deprecated": false,
"description": "User interface language preferred in response. Usually of the format <code><language_code>-<country_code></code>. For more, see <a href=\"https://www.rfc-editor.org/rfc/rfc9110.html#name-accept-language\">RFC 9110</a>.",
"in": "query",
"name": "ui_lang",
"required": false,
"schema": {
"allOf": [
{
"enum": [
"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"
],
"title": "MarketCodes",
"type": "string"
},
{
"default": "en-US"
}
],
"description": "User interface language preferred in response. Usually of the format <code><language_code>-<country_code></code>. For more, see <a href=\"https://www.rfc-editor.org/rfc/rfc9110.html#name-accept-language\">RFC 9110</a>."
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
请求费用。 默认请求预估费用:$0.005 USD。 最终费用以实际用量为准。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
请求头
The API version to use. This is denoted by the format YYYY-MM-DD. Default is the latest that is available. Read more about API versioning.
The user agent originating the request. Brave search can utilize the user agent to provide a different experience depending on the device as described by the string. The user agent should follow the commonly used browser agent strings on each platform. For more information on curating user agents, see RFC 9110.
查询参数
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.
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 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 hours or less.
- pw - Pages aged 7 days or less.
- pm - Pages aged 31 days or less.
- py - Pages aged 365 days or less.
- YYYY-MM-DDtoYYYY-MM-DD - A custom date range is also supported by specifying start and end dates e.g.
2022-04-01to2022-07-30.
""
"pm"
"2022-04-01to2022-07-30"
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 paginate results use this parameter together with count. For example, if your user interface displays 20 search results per page, set count to 20 and offset to 0 to show the first page of results. To get subsequent pages, increment offset by 1 (e.g. 0, 1, 2). The results may overlap across multiple pages.
0 <= x <= 9Filters 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.
off, moderate, strict "off"
The search language preference. The 2 or more character language code for which the search results are provided.
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 User interface language preferred in response. Usually of the format <language_code>-<country_code>. For more, see RFC 9110.
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 响应
Successful Response