Data 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.