联网搜索
API 配置
保存后下方「Try It」面板会自动携带此 API Key 发送真实请求。
Base: api.xrtoken.net
联网搜索接口。body Type 选择产品线:
web:网页搜索,模型doubao-web-searchglobal:全球搜索,模型doubao-global-search
计费:按次计费,成功扣费、失败不扣费;价格见 GET /v1/models 或模型市场。
网关字段 Type 与 model 仅用于路由,不会写入业务结果。
SearchType=image 本期不支持。
模型亦可在 GET /v1/models 中查看(model_type: search);
调用统一走本端点,用 Type 选择。
Authorization
BearerAuth AuthorizationBearer <token>
API 密钥认证(OpenAI 格式)。在 Authorization 请求头中传入:
Authorization: Bearer tr-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X post "https://api.xrtoken.net/v1/search" \ -H "Content-Type: application/json" \ -d '{ "Type": "web", "Query": "北京周边游玩景点推荐", "Count": 10, "SearchType": "web" }'{}{
"error": "model field is required",
"type": "invalid_request_error"
}{
"error": "invalid or missing API key",
"type": "auth_error"
}{
"error": "insufficient balance -- please top up or upgrade your plan",
"type": "billing_error"
}{
"error": "rate limit exceeded",
"type": "rate_limit_error"
}{
"error": "upstream provider error",
"type": "server_error"
}