> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cowagent.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# web_search - Web Search

> Search the internet for real-time information, with support for multiple search providers

Search the internet for real-time information, news, research, and more. Supports four backends — Bocha, ERNIE, GLM, and LinkAI — and works once any one of them is configured.

<Tip>
  It is recommended to configure providers and routing strategy visually from the "Model Management → Search" panel in the [Web console](/channels/web), without manually editing the configuration file.
</Tip>

## Providers

| Provider | Credential                       | Apply                                                                     |
| -------- | -------------------------------- | ------------------------------------------------------------------------- |
| Bocha    | `tools.web_search.bocha_api_key` | [Bocha Open Platform](https://open.bochaai.com/)                          |
| ERNIE    | Reuses `qianfan_api_key`         | [Qianfan Console](https://cloud.baidu.com/doc/qianfan/s/2mh4su4uy)        |
| Zhipu    | Reuses `zhipu_ai_api_key`        | [Zhipu Open Platform](https://docs.bigmodel.cn/cn/guide/tools/web-search) |
| LinkAI   | Reuses `linkai_api_key`          | [LinkAI Console](https://link-ai.tech/console/interface)                  |

Except for Bocha which requires a dedicated `bocha_api_key`, the other three reuse the corresponding model's API key — configuring the model automatically grants search capability.

## Routing Strategy

```json theme={null}
{
  "tools": {
    "web_search": {
      "strategy": "auto",
      "provider": ""
    }
  }
}
```

* `auto` (default): the Agent intelligently picks among configured providers and may call multiple providers in a single task to gather more comprehensive results; when none is specified, falls back through `bocha → qianfan → zhipu → linkai`.
* `fixed`: always use the provider specified in `provider`; falls back to the auto order if that provider's credentials are missing.

## Tool Parameters

| Parameter   | Type    | Required | Description                                                                                                              |
| ----------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
| `query`     | string  | Yes      | Search keywords                                                                                                          |
| `count`     | integer | No       | Number of results (1–50, default 10)                                                                                     |
| `freshness` | string  | No       | Time range: `noLimit` (default), `oneDay`, `oneWeek`, `oneMonth`, `oneYear`, or date range like `2025-01-01..2025-02-01` |
| `summary`   | boolean | No       | Whether to return page summaries (default false)                                                                         |
| `provider`  | string  | No       | Available when multiple providers are configured under the `auto` strategy; used to switch provider for a single call    |

<Note>
  If none of the four credentials are configured, this tool is not registered with the Agent.
</Note>
