Baidu Search
Search the web via Baidu AI Search API.
Prerequisites
API Key Configuration
This skill requires a
BAIDUAPIKEY to be configured in OpenClaw.
If you don't have an API key yet, please visit:
https://console.bce.baidu.com/ai-search/qianfan/ais/console/apiKey
For detailed setup instructions, see:
references/apikey-fetch.md
Usage
CODEBLOCK0
Request Parameters
| Param | Type | Required | Default | Description |
|---|
| query | str | yes | - | Search query |
| count |
int | no | 10 | Number of results to return, range 1-50 |
| freshness | str | no | Null | Time range, two formats: format one is ”YYYY-MM-DDtoYYYY-MM-DD“, and format two includes pd, pw, pm, and py, representing the past 24 hours, past 7 days, past 31 days, and past 365 days respectively |
Examples
CODEBLOCK1
Current Status
Fully functional.
技能名称: baidu-search
详细描述:
百度搜索
通过百度AI搜索API进行网络搜索。
前置条件
API密钥配置
此技能需要在OpenClaw中配置
BAIDUAPIKEY。
如果您还没有API密钥,请访问:
https://console.bce.baidu.com/ai-search/qianfan/ais/console/apiKey
详细设置说明请参见:
references/apikey-fetch.md
使用方法
bash
python3 skills/baidu-search/scripts/search.py
请求参数
| 参数 | 类型 | 必填 | 默认值 | 描述 |
|---|
| query | str | 是 | - | 搜索查询 |
| count |
int | 否 | 10 | 返回结果数量,范围1-50 |
| freshness | str | 否 | Null | 时间范围,两种格式:格式一为YYYY-MM-DDtoYYYY-MM-DD,格式二包括pd、pw、pm、py,分别代表过去24小时、过去7天、过去31天和过去365天 |
示例
bash
基础搜索
python3 scripts/search.py {query:人工智能}
新鲜度格式一 YYYY-MM-DDtoYYYY-MM-DD 示例
python3 scripts/search.py {
query:最新新闻,
freshness:2025-09-01to2025-09-08
}
新鲜度格式二 pd、pw、pm、py 示例
python3 scripts/search.py {
query:最新新闻,
freshness:pd
}
设置返回结果数量
python3 scripts/search.py {
query:旅游景点,
count: 20,
}
当前状态
功能完整可用。