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

# SerperApi

**SerperApiTools** 使 Agent 能够搜索 Google 的查询。

## 前提条件

下面的示例需要来自 [SerperApi](https://serper.dev/) 的 API 密钥。

```shell theme={null}
export SERPER_API_KEY=***
```

## 示例

下面的 agent 将搜索 Google 的查询：“美国正在发生什么事”，并分享结果。

```python cookbook/tools/serper_tools.py theme={null}
from agno.agent import Agent
from agno.tools.serper import SerperTools

agent = Agent(tools=[SerperTools(location="us")], show_tool_calls=True)
agent.print_response("Whats happening in the USA?", markdown=True)
```

## Toolkit 参数

| 参数名        | 类型    | 默认值    | 描述                |
| ---------- | ----- | ------ | ----------------- |
| `api_key`  | `str` | -      | 用于身份验证目的的 API 密钥。 |
| `location` | `str` | `"us"` | 要搜索的地点。           |

## Toolkit 函数

| 函数名             | 描述                |
| --------------- | ----------------- |
| `search_google` | 此函数搜索 Google 的查询。 |

## 开发者资源

* 查看 [Tools](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/serper.py)
* 查看 [Cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/tools/serper_tools.py)
