ByteChef LogoByteChef

Brave

Brave gives you access to the same powerful, independent search index that powers the privacy-first search engine trusted by millions

Categories: Helpers

Type: brave/v1


Connections

Version: 1

API Key

Properties

NameLabelTypeDescriptionRequired
api_tokenAPI tokenSTRINGtrue

Connection Setup

  1. Go to https://api-dashboard.search.brave.com/app/keys
  2. Log in to your account.
  3. Subscribe into a plan.
  4. Click on Generate a new API key and name it.
  5. Copy the API key. Use these credentials to create a connection in ByteChef.

Actions

Name: webSearch

Search the web for relevant content.

Properties

NameLabelTypeDescriptionRequired
qSearch QuerySTRINGThe user’s search query term. Query can not be empty. Maximum of 400 characters and 50 words in the query.true
countCountINTEGERThe number of search results returned in response. The maximum is 20. The actual number delivered may be less than requested. Combine this parameter with offset to paginate search results.false
offsetOffsetINTEGERThe zero based offset that indicates number of search result pages (count) to skip before returning the result. The actual number delivered may be less than requested.false
safesearchSafe SearchSTRING
Options off, moderate, strict
The level of safe search filtering applied to the query.false
freshnessFreshnessSTRING
Options pd, pw, pm, py
Filters search results by when they were discovered.false
result_filterResult FilterSTRINGA comma delimited string of result types to include in the search response.false
summarySummaryBOOLEAN
Options true, false
This parameter enables summary key generation in web search results.false
operatorsOperatorsBOOLEAN
Options true, false
Whether to apply search operators.false
countryCountrySTRING
Options ALL, US, GB, AR, 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
The 2 character country code where the search results come from.false
search_langSearch LanguageSTRING
Options en, en-gb, eu, ar, bn, bg, ca, zh-hans, zh-hant, hr, cs, da, nl, et, fi, fr, gl, de, el, gu, ge, he, hi, hu, is, it, jp, kn, ko, lv, lt, ms, ml, mr, nb, pl, pt-br, pt-pt, pa, ro, ur, sr, sk, sl, es, sv, ta, te, th, tr, uk, vi
The 2 or more character language code for which the search results are provided.false

Example JSON Structure

{
  "label" : "Web Search",
  "name" : "webSearch",
  "parameters" : {
    "q" : "",
    "count" : 1,
    "offset" : 1,
    "safesearch" : "",
    "freshness" : "",
    "result_filter" : "",
    "summary" : false,
    "operators" : false,
    "country" : "",
    "search_lang" : ""
  },
  "type" : "brave/v1/webSearch"
}

Output

Type: OBJECT

Properties

NameTypeDescription
queryOBJECT
Properties {STRING(original)}
discussionsOBJECT
Properties {[{STRING(title), STRING(url), STRING(description)}](results)}
faqOBJECT
Properties {[{STRING(question), STRING(answer), STRING(url), STRING(title)}](results)}
infoboxOBJECT
Properties {[{STRING(title), STRING(url), STRING(description)}](results)}
locationsOBJECT
Properties {[{STRING(title), STRING(url), STRING(description)}](results)}
newsOBJECT
Properties {[{STRING(title), STRING(url), STRING(description)}](results)}
videosOBJECT
Properties {[{STRING(title), STRING(url), STRING(description)}](results)}
webOBJECT
Properties {[{STRING(title), STRING(url), STRING(description)}](results)}
summarizerOBJECT
Properties {STRING(key)}

Output Example

{
  "query" : {
    "original" : ""
  },
  "discussions" : {
    "results" : [ {
      "title" : "",
      "url" : "",
      "description" : ""
    } ]
  },
  "faq" : {
    "results" : [ {
      "question" : "",
      "answer" : "",
      "url" : "",
      "title" : ""
    } ]
  },
  "infobox" : {
    "results" : [ {
      "title" : "",
      "url" : "",
      "description" : ""
    } ]
  },
  "locations" : {
    "results" : [ {
      "title" : "",
      "url" : "",
      "description" : ""
    } ]
  },
  "news" : {
    "results" : [ {
      "title" : "",
      "url" : "",
      "description" : ""
    } ]
  },
  "videos" : {
    "results" : [ {
      "title" : "",
      "url" : "",
      "description" : ""
    } ]
  },
  "web" : {
    "results" : [ {
      "title" : "",
      "url" : "",
      "description" : ""
    } ]
  },
  "summarizer" : {
    "key" : ""
  }
}

What to do if your action is not listed here?

If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.

To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.

How is this guide?

Last updated on

On this page