数据 API / BytePlus / Web Search
AI-oriented real-time web search.
Run a real-time web search built for AI agents and return a ranked list of titled results with links and snippets. Query is required; narrow the result set with Count (≤ 20), Filter (restrict to Sites or exclude BlockHosts), Language, and TimeRange. The response wraps ResponseMetadata.RequestId and a Result list of web results. Use it for RAG retrieval augmentation, competitive/PR monitoring, fact-checking, and content sourcing; pair each result URL with post_byteplus_fetch to pull full page content.
参数
没有路径、查询或请求头参数。
请求体
Querystring必填The search query. Required. Max 400 characters; the upstream engine also effectively caps around 50 words.
Countinteger可选Number of results to return. Optional; default 10, maximum 20.
Filterobject可选Optional result filter. Both fields are pipe-separated strings of full domains (max 5 each).
Sitesstring可选Restrict results to these full domains. Pipe-separated, max 5, e.g. "bytedance.com|byteplus.com". (Sending an array returns 10400 Invalid Parameter.)
BlockHostsstring可选Exclude results from these full domains. Pipe-separated, max 5, e.g. "reddit.com|quora.com".
Languagestring可选Optional language hint in the upstream format, e.g. EN, ZH-HANS, ZH-HANT.
TimeRange可选允许值: OneDay · OneWeek · OneMonth · OneYear
Optional recency window. One of the named windows OneDay / OneWeek / OneMonth / OneYear, or a custom range "YYYY-MM-DD..YYYY-MM-DD". Omit for no time filter. NOTE: values like "week"/"month" are silently ignored upstream.
请求示例
curl -X POST "https://openapi.felo.ai/v1/beta/byteplus/web-search" \
-H "Authorization: Bearer $FELO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"Query": "<string>",
"Count": 0,
"Filter": {},
"Language": "<string>",
"TimeRange": {}
}'响应
响应字段
ResponseMetadataobject可选Upstream request metadata.
RequestIdstring可选Unique identifier for this request.
Actionstring可选Versionstring可选Servicestring可选Regionstring可选Resultobject可选Search result payload.
ResultCountinteger可选Number of web results returned.
WebResultsobject[]可选Ranked list of web results.
Idstring可选Opaque result id.
SortIdinteger可选1-based rank of the result.
Titlestring可选Result title.
SiteNamestring可选Source site name (may be empty).
Urlstring可选Result URL.
Snippetstring可选Short text snippet from the page.
Summarystring可选Longer summary of the page content.
PublishTimestring可选Publish time in ISO 8601 (may be empty).
PublishTimeUnixinteger可选Publish time as Unix seconds (0 if unknown).
LogoUrlstring可选Signed site logo URL (time-limited).
SearchContextobject可选Echo of the resolved query context.
OriginQuerystring可选SearchTypestring可选TimeCostinteger可选Upstream processing time in milliseconds.
LogIdstring可选Upstream log id (equals ResponseMetadata.RequestId).
Choices可选Reserved; null unless applicable.
Usage可选Reserved; null unless applicable.