> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# BaiduSearch

> Search the web with BaiduSearchTools using the Baidu search engine, with fixed language and result count overrides.

**BaiduSearch** enables an Agent to search the web for information using the Baidu search engine.

## Prerequisites

The following example requires the `baidusearch`, `pycountry`, and `openai` libraries. To install them, run the following command:

```shell theme={null}
uv pip install -U baidusearch pycountry openai
```

## Example

```python cookbook/91_tools/baidusearch_tools.py theme={null}
from agno.agent import Agent
from agno.tools.baidusearch import BaiduSearchTools

agent = Agent(
    tools=[BaiduSearchTools()],
    description="You are a search agent that helps users find the most relevant information using Baidu.",
    instructions=[
        "Given a topic by the user, respond with the 3 most relevant search results about that topic.",
        "Search for 5 results and select the top 3 unique items.",
        "Search in both English and Chinese.",
    ],
)

agent.print_response("What are the latest advancements in AI?", markdown=True)
```

## Toolkit Params

| Parameter | Type | Default | Description |
| - | - | - | - |
| `fixed_max_results` | `Optional[int]` | `None` | A fixed number of maximum results to return, overriding the `max_results` argument passed to `baidu_search`. |
| `fixed_language` | `Optional[str]` | `None` | A fixed language for the results, overriding the `language` argument passed to `baidu_search`. |
| `headers` | `Optional[Any]` | `None` | Headers to be used in the search request. |
| `proxy` | `Optional[str]` | `None` | Specifies a single proxy address as a string to be used for the HTTP requests. |
| `timeout` | `int` | `10` | Sets the timeout for HTTP requests, in seconds. |
| `debug` | `bool` | `False` | Enable debug output. |
| `enable_baidu_search` | `bool` | `True` | Enable the baidu\_search functionality. |
| `all` | `bool` | `False` | Enable all functionality. |

## Toolkit Functions

| Function | Description |
| - | - |
| `baidu_search` | Use this function to search Baidu for a query. |

## Developer Resources

* [Tools](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/baidusearch.py)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.