# 联网搜索

联网搜索接口。body `Type` 选择产品线：
- `web`：网页搜索，模型 `doubao-web-search`
- `global`：全球搜索，模型 `doubao-global-search`

**计费**：按次计费，成功扣费、失败不扣费；价格见 `GET /v1/models` 或模型市场。
网关字段 `Type` 与 `model` 仅用于路由，不会写入业务结果。
`SearchType=image` 本期不支持。

模型亦可在 `GET /v1/models` 中查看（`model_type: search`）；
调用统一走本端点，用 `Type` 选择。

## POST /v1/search

> Web search

Web search endpoint. Use body `Type` to select the product line:
- `web`: web search, model `doubao-web-search`
- `global`: global search, model `doubao-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`.

### Authentication

`Authorization: Bearer tr-xxx`

### Request Body

Content-Type: `application/json`

- **Type** ``web` | `global`` **(required)**  
  Search type:
- **Query** `string` **(required)**  
  Search query (required, max 100 characters)
- **model** ``doubao-web-search` | `doubao-global-search``  
  Optional. If set, must match the `Type` mapping:
- **Count** `integer`  
  (`Type=web`) Number of results, max 50
- **SearchType** ``web``  
  (`Type=web`) Sub-type. Defaults to `web`.
- **Filter** `object`  
  (`Type=web`) Filter object
- **TimeRange** `object`  
  (`Type=web`) Time range
- **QueryControl** `object`  
  (`Type=web`) Query control
- **ContentFormats** `object`  
  (`Type=web`) Content formats
- **Industry** `object`  
  (`Type=web`) Industry
- **DocCount** `integer`  
  (`Type=global`) Document count, max 20
- **MaxSnippetLength** `integer`  
  (`Type=global`) Max snippet length
- **MaxImageCountPerDoc** `integer`  
  (`Type=global`) Max images per document

### Response

### Error Codes

- `400`: 
- `401`: 
- `402`: 
- `429`: 
- `502`:
