Search the web
Searches the web for `query` and returns up to `limit` results in the provider's order, each with its URL, title and description. The node sends the query to its search provider (the Brave Search API) with the node's key and nothing that identifies your organization; the result sites are not contacted unless you ask for their pages. With `scrape`, every result is also scraped with those options, through the same egress guard and politeness as a scrape, and its document is in the result's `scrape`; a result whose scrape fails has `error` instead, and the search still answers 200 with a `scrape_failed` warning. One answer holds at most 64 MiB of pages; a result past that has `error` `search_answer_too_large` and is not billed. A search's results get no custom `headers`, `profile`, `actions` or `json` format: scrape the URLs you trust with those. Bills one `vision.page` per search that returns at least one result, plus one `vision.page` per scraped result (as a scrape bills). A search with no results bills nothing. Each search counts against `vision.search.monthly` (searches per UTC calendar month) and `vision.search.rpm`; it answers 429 `quota_exceeded` or `rate_limited` when they are used up. A node without a search key answers 503 `search_unavailable`.
/v1/vision/search
Authentication
Request Body required
application/jsonquery
string
REQUIRED
limit
integer
country
string
lang
string
freshness
string
day, week, month, yearsafe_search
string
off, moderate, stricttimeout_ms
integer
scrape
object
formats
string[]
only_main_content
boolean
include_tags
string[]
exclude_tags
string[]
engine
string
auto, fetch, browserbrowser
string
wait_for_ms
integer
timeout_ms
integer
max_age_ms
integer
cache_only
boolean
store_in_cache
boolean
respect_robots
boolean
headers
object
profile
string
actions
(object | object | object | object | object | object | object | object | object | object | object | object)[]
kind
string
REQUIRED
navigateurl
string (uri)
REQUIRED
wait_until
string
load, domcontentloaded, networkidletimeout_ms
integer
settle
boolean | object
quiet_ms
integer
timeout_ms
integer
kind
string
REQUIRED
clicktarget
unknown | unknown | unknown | object
REQUIRED
selector
string
text
string
exact
boolean
role
string
name
string
within
string
nth
integer
ref
string
REQUIRED
button
string
left, right, middlecount
integer
modifiers
string[]
timeout_ms
integer
settle
boolean | object
quiet_ms
integer
timeout_ms
integer
kind
string
REQUIRED
hovertarget
unknown | unknown | unknown | object
REQUIRED
selector
string
text
string
exact
boolean
role
string
name
string
within
string
nth
integer
ref
string
REQUIRED
timeout_ms
integer
kind
string
REQUIRED
typetarget
unknown | unknown | unknown | object
selector
string
text
string
exact
boolean
role
string
name
string
within
string
nth
integer
ref
string
REQUIRED
text
string
REQUIRED
clear
boolean
interval_ms
integer
timeout_ms
integer
settle
boolean | object
quiet_ms
integer
timeout_ms
integer
kind
string
REQUIRED
keykey
string
REQUIRED
modifiers
string[]
settle
boolean | object
quiet_ms
integer
timeout_ms
integer
kind
string
REQUIRED
scrolltarget
unknown | unknown | unknown | object
selector
string
text
string
exact
boolean
role
string
name
string
within
string
nth
integer
ref
string
REQUIRED
to
object
x
number
REQUIRED
y
number
REQUIRED
by
object
x
number
REQUIRED
y
number
REQUIRED
kind
string
REQUIRED
selecttarget
unknown | unknown | unknown | object
REQUIRED
selector
string
text
string
exact
boolean
role
string
name
string
within
string
nth
integer
ref
string
REQUIRED
value
string
REQUIRED
settle
boolean | object
quiet_ms
integer
timeout_ms
integer
kind
string
REQUIRED
waitms
integer
for
object
selector
string
text
string
url
string
network_idle
boolean
truetimeout_ms
integer
kind
string
REQUIRED
evaluateexpression
string
REQUIRED
kind
string
REQUIRED
screenshottarget
unknown | unknown | unknown | object
selector
string
text
string
exact
boolean
role
string
name
string
within
string
nth
integer
ref
string
REQUIRED
full_page
boolean
format
string
jpeg, png, webpquality
integer
kind
string
REQUIRED
markdownonly_main_content
boolean
kind
string
REQUIRED
snapshotmode
string
skeleton, fullroot
string
max_tokens
integer
locale
string
timezone
string
mobile
boolean
viewport
object
width
integer
REQUIRED
height
integer
REQUIRED
block_ads
boolean
block_resources
string[]
screenshot
object
full_page
boolean
format
string
jpeg, png, webpquality
integer
json
object
schema
object
prompt
string
walls
string
free, billResponses
application/jsonobject
string
REQUIRED
searchquery
string
REQUIRED
results
object[]
REQUIRED
position
integer
REQUIRED
url
string (uri)
REQUIRED
title
string
REQUIRED
description
string
scrape
object
object
string
REQUIRED
scrapeurl
string (uri)
REQUIRED
final_url
string (uri)
REQUIRED
status_code
integer
REQUIRED
content_type
string
tier
string
REQUIRED
cache, fetch, browsercache
object
REQUIRED
state
string
REQUIRED
hit, miss, bypassage_s
integer
REQUIRED
markdown
string
html
string
raw_html
string
text
string
links
string[]
screenshot
object
format
string
REQUIRED
jpeg, png, webpwidth
integer
REQUIRED
height
integer
REQUIRED
data_base64
string (byte)
REQUIRED
json
unknown
metadata
object
title
string
description
string
language
string
canonical_url
string (uri)
favicon
string (uri)
og
object
published_time
string
modified_time
string
robots
string
actions
object[]
kind
string
REQUIRED
navigate, click, hover, type, key, scroll, select, wait, evaluate, screenshot, markdown, snapshotstatus
string
REQUIRED
ok, failed, skippedduration_ms
number
REQUIRED
url
string
status_code
integer
value
unknown
screenshot
object
format
string
REQUIRED
jpeg, png, webpwidth
integer
REQUIRED
height
integer
REQUIRED
data_base64
string (byte)
REQUIRED
markdown
string
snapshot
object
id
string
REQUIRED
mode
string
REQUIRED
skeleton, fulltext
string
REQUIRED
refs
integer
REQUIRED
nodes
integer
REQUIRED
tokens
integer
REQUIRED
complete
boolean
REQUIRED
truncated
boolean
REQUIRED
error
object
type
string (uri)
REQUIRED
title
string
REQUIRED
status
integer
REQUIRED
code
string
REQUIRED
detail
string
REQUIRED
instance
string
errors
object[]
reason
string
required_scope
string
retry_after_s
integer
limit
object
current_status
string
upstream_status
integer
step
string
pack_error
object
dialogs
object[]
delivery
string
REQUIRED
delivered_verified, delivered_unverified, delivery_uncertain, not_delivered, unknownretry
string
REQUIRED
safe, unsafe, unknownsettled_ms
number
settled_by
string
quiet, navigation, deadlinewarnings
string[]
page_state
object
state
string
REQUIRED
ok, blocked, captcha, cookie_wall, login, error, loadingsignal
string
content_withheld
boolean
warnings
string[]
REQUIRED
timing
object
REQUIRED
total_ms
number
REQUIRED
error
object
type
string (uri)
REQUIRED
title
string
REQUIRED
status
integer
REQUIRED
code
string
REQUIRED
detail
string
REQUIRED
instance
string
errors
object[]
pointer
string
REQUIRED
detail
string
REQUIRED
reason
string
required_scope
string
retry_after_s
integer
limit
object
id
string
REQUIRED
limit
number
REQUIRED
unit
string
REQUIRED
window_s
integer
current
number
current_status
string
upstream_status
integer
step
string
pack_error
object
code
string
REQUIRED
message
string
REQUIRED
retryable
boolean
REQUIRED
warnings
string[]
timing
object
REQUIRED
total_ms
number
REQUIRED
curl -X POST 'https://beta-api.b3os.org/v1/vision/search' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "query": "rust async runtime", "limit": 2, "scrape": { "formats": [ "markdown" ] }}'
const response = await fetch('https://beta-api.b3os.org/v1/vision/search', { method: 'POST', headers: { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json" }, body: JSON.stringify({ "query": "rust async runtime", "limit": 2, "scrape": { "formats": [ "markdown" ] } })});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://beta-api.b3os.org/v1/vision/search', headers=headers, json={ "query": "rust async runtime", "limit": 2, "scrape": { "formats": [ "markdown" ] }})print(response.json())
{ "object": "search", "query": "rust async runtime", "results": [ { "position": 1, "url": "https://tokio.rs/", "title": "Tokio - An asynchronous Rust runtime", "description": "Tokio is an asynchronous runtime for the Rust programming language.", "scrape": { "object": "scrape", "url": "https://tokio.rs/", "final_url": "https://tokio.rs/", "status_code": 200, "tier": "fetch", "cache": { "state": "miss", "age_s": 0 }, "markdown": "# Tokio\n\nBuild reliable network applications without compromising speed.\n", "warnings": [], "timing": { "fetch_ms": 88.4, "extract_ms": 2.1, "total_ms": 91 } } }, { "position": 2, "url": "https://docs.rs/tokio/latest/tokio/", "title": "tokio - Rust", "description": "A runtime for writing reliable network applications without compromising speed.", "scrape": { "object": "scrape", "url": "https://docs.rs/tokio/latest/tokio/", "final_url": "https://docs.rs/tokio/latest/tokio/", "status_code": 200, "tier": "fetch", "cache": { "state": "miss", "age_s": 0 }, "markdown": "# Crate tokio\n\nA runtime for writing reliable network applications without compromising speed.\n", "warnings": [], "timing": { "fetch_ms": 96.2, "extract_ms": 3, "total_ms": 99.7 } } } ], "timing": { "search_ms": 412.6, "scrape_ms": 101.3, "total_ms": 515.2 }}
Try this endpoint
/v1/vision/search