Web search
Web search endpoint. Use body Type to select the product line:
web: web search, modeldoubao-web-searchglobal: global search, modeldoubao-global-search
Billing: per successful call; failures are not charged. See GET /v1/models or the model marketplace for price.
Gateway fields Type and model are for routing only.
SearchType=image is not supported in this release.
Models appear in GET /v1/models (model_type: search).
Always call this single endpoint and select via Type.
Authorization
BearerAuth API key authentication (OpenAI format). Pass in the Authorization header:
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.ai/v1/search" \ -H "Content-Type: application/json" \ -d '{ "Type": "web", "Query": "recommended attractions near Beijing", "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"
}