# 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`.

## 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`:
