跳到导航

Search the web

Synchronous web search. Choose a result type; each result carries its position, title, URL and snippet plus the fields of its type. Billed once per successful call; failed calls are not charged. Prices are in the billing section.

Results are leads, not evidence: read a page with POST /v1/web/read before citing a claim from it. Unknown request fields are rejected with 400. The same operation is the data:web.search capability of POST /v1/capabilities/run and the web_search tool of the BeatAPI MCP endpoint.

身份验证

AuthorizationBearer

Send your API key as Authorization: Bearer <BEATAPI_API_KEY>.

请求头

Idempotency-Keystring可选<=255 characters

请求

This endpoint expects an object.
querystring必需格式: "\S"1-400 characters
Search query. Surrounding whitespace is trimmed before the length check.
typeenum可选默认为 web
Result type. Each type adds its own fields to every result.
max_resultsinteger可选1-10默认为 5
Number of results to return.
time_rangeenum可选

Only results from this period. Only for web, news, images and videos.

允许的值:
include_domainslist of strings可选

Only return results from these domains. Only for web, news, images and videos.

exclude_domainslist of strings可选

Leave out results from these domains. Only for web, news, images and videos.

countrystring可选格式: "^[a-z]{2}$"

ISO 3166-1 alpha-2 country code in lowercase, such as us or cn. With country and language both left out, a query written in Chinese, Japanese or Korean searches in that language and region.

languagestring可选格式: "^[a-z]{2}$"

Two-letter language code, such as en or zh.

响应

Search results.
objectenum
允许的值:
request_idstring
Quote it in support requests.
querystring
typeenum
resultslist of objects
answer_boxobject可选
A direct answer, present only when the search produced one.
related_searcheslist of strings可选
Related queries, present only when available.
usageobject可选

What this call was charged, in US dollars. The same object a social-data call answers with.

错误

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error