Sand AISand AI MAGI-2MAGI-2 artık SandBase'de: yerel sesli 1080p videoŞimdi deneyin

Brave Video Search

API dokümanları
https://api.sandbase.ai/v1/api/brave/videos

Video Search from Brave. Returns the official Brave API response unchanged.

Fiyat
$0.005USD / çağrı
Yöntem
POST
Yanıt
JSON
Parametreler
1 gerekli · 10 isteğe bağlı

Oynatma Alanı

Girdi
The user’s search query term. Query can not be empty. Maximum of 400 characters and 50 words in the query.
150
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. Aralık: 1 ile 50 arasında.
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.
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. p
Include fetch metadata.
09
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 u Aralık: 0 ile 9 arasında.
Whether to apply search operators.
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. strict - Drops all adult content from search results.
The search language preference. The 2 or more character language code for which the search results are provided.
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.
User interface language preferred in response. Usually of the format <language_code>-<country_code> . For more, see RFC 9110 .
ÇıktıHazır

Çıktınız burada görünecek

Girdileri tamamlayın, ardından Çalıştır'a tıklayın.

API README

Brave Video Search API

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.

Use cases

  • Find tutorial videos on a topic and list them with title, thumbnail and duration.
  • Build a video feed for a niche by running searches and keeping results from chosen channels.
  • Check which creators and sites appear for a keyword by reading video.author.name and meta_url.hostname.
  • Narrow results to recent videos with the freshness parameter and sort them by page_age.

Request

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.

Parameters

NameTypeRequiredDescription
qstringYesThe user’s search query term. Query can not be empty. Maximum of 400 characters and 50 words in the query.
countintegerNoThe 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.
countrystringNoThe 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.
freshnessstringNoFilters 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_metadatabooleanNoInclude fetch metadata.
offsetintegerNoThe 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
operatorsbooleanNoWhether to apply search operators.
safesearchstringNoFilters 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_langstringNoThe search language preference. The 2 or more character language code for which the search results are provided.
spellcheckbooleanNoWhether 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_langstringNoUser interface language preferred in response. Usually of the format <language_code>-<country_code> . For more, see RFC 9110 .

Example response

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"
}

Response fields

FieldMeaning
results[].titleTitle of the video page.
results[].urlLink to the page that hosts the video.
results[].descriptionShort text from the video page. It can be cut off.
results[].age / results[].page_agePublish 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.urlName and channel link of the video author.
results[].video.creator / results[].video.publisherCreator name and the platform that publishes the video, such as YouTube.
results[].video.durationLength of the video as a text value such as 06:07.
results[].video.viewsView count. This key is missing on some results.
results[].thumbnail.src / results[].thumbnail.originalThumbnail URLs. src is a resized copy and original points to the image on the source site.
results[].meta_url.hostnameHost name of the result page. It shows which site the video comes from.

Notes

  • Some keys, such as video.views, video.tags and video.requires_subscription, appear only on some results. Check that they exist before you read them.
  • To page through results, send count (up to 50) with offset (0 to 9). offset counts pages of count results.
  • The query.original field echoes your query. With spellcheck on, the search may use a changed query.
  • For other result types, see Brave Web Search, Brave News Search or Brave Image Search.

Pricing

$0.005 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Daha fazlasını keşfedin

İlgili APIs

Tüm APIs
APIFiyatYanıt
Brave$0.005 çağrı başınaJSON
Brave$0.01 çağrı başınaJSON
Brave$0.005 çağrı başınaJSON
Brave$0.005 çağrı başınaJSON
Brave$0.005 çağrı başınaJSON
Brave$0.005 çağrı başınaJSON

Sorular

SSS

Brave Video Search API'sini nasıl kullanırım?

SandBase API anahtarınızı Authorization başlığında (Bearer) ve parametreleri JSON gövdesi olarak ile https://api.sandbase.ai/v1/api/brave/videos adresine bir POST isteği gönderin. Ayrıca bu sayfadaki Playground’da kod yazmadan da deneyebilirsiniz.

Brave Video Search API'sinin fiyatı nedir?

çağrı başına $0.005, SandBase bakiyenizden tahsil edilir. Yalnızca yaptığınız çağrılar için ücretlendirilirsiniz; abonelik yoktur.

Brave Video Search API'si hangi parametreleri kabul eder?

Gerekli: q (string). İsteğe bağlı: 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 arasından biri), freshness (string), include_fetch_metadata (boolean), offset (integer) ve operators (boolean) ve 4 tane daha. Parametreler tablosu ve bu sayfadaki Playground, tüm alanları listeler.

Brave Video Search API'si ne döndürür?

Aynı HTTP isteğinde döndürülen bir JSON yanıtı (senkron). Bu sayfadaki README'de örnek bir yanıt yer alır.

Bir Brave geliştirici hesabına veya API anahtarına ihtiyacım var mı?

Hayır. Brave Video Search, SandBase üzerinden çalışır; bu nedenle tek bir SandBase API anahtarı bu uç noktayı ve katalogdaki diğer tüm API'leri ve modelleri kapsar. Brave API erişimi için ayrıca başvuru yapmanız gerekmez.