# 联网搜索

联网搜索接口。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

> 联网搜索

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

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

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

### Authentication

`Authorization: Bearer tr-xxx`

### Request Body

Content-Type: `application/json`

- **Type** ``web` | `global`` **(required)**  
  搜索类型：
- **Query** `string` **(required)**  
  搜索查询（必填，最长 100 字符）
- **model** ``doubao-web-search` | `doubao-global-search``  
  可选。若提供须与 `Type` 映射一致：
- **Count** `integer`  
  （`Type=web`）返回条数，最大 50
- **SearchType** ``web``  
  （`Type=web`）子类型。缺省为 `web`。
- **Filter** `object`  
  （`Type=web`）过滤条件
- **TimeRange** `object`  
  （`Type=web`）时间范围
- **QueryControl** `object`  
  （`Type=web`）查询控制
- **ContentFormats** `object`  
  （`Type=web`）内容格式
- **Industry** `object`  
  （`Type=web`）行业
- **DocCount** `integer`  
  （`Type=global`）返回文档数，最大 20
- **MaxSnippetLength** `integer`  
  （`Type=global`）摘要最大长度
- **MaxImageCountPerDoc** `integer`  
  （`Type=global`）每文档图片数上限

### Response

### Error Codes

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