← Back to Skills Marketplace
380
Downloads
0
Stars
2
Active Installs
1
Versions
Install in OpenClaw
/install baidu-search-cn
Description
通过百度 AI 搜索 API 进行网页搜索,获取实时信息和搜索结果。
README (SKILL.md)
🔍 百度搜索
Search the web with Baidu AI
通过百度 AI 搜索 API 进行网页搜索,获取中文互联网的实时信息。
Setup
cd {baseDir}
echo "BAIDU_API_KEY=your-api-key" > .env
uv venv && uv pip install -e ".[dev]"
uv run --env-file .env uvicorn baidu_search.main:app --host 127.0.0.1 --port 8001
需要在 .env 或环境变量中设置 BAIDU_API_KEY。
获取 API Key
- 访问 百度智能云控制台
- 创建应用获取 API Key
Quick Start
-
检查服务:
curl http://127.0.0.1:8001/ping -
搜索网页:
curl -X POST http://127.0.0.1:8001/search \
-H "Content-Type: application/json" \
-d '{
"query": "北京有哪些旅游景区",
"top_k": 10
}'
- 带时间过滤的搜索:
curl -X POST http://127.0.0.1:8001/search \
-H "Content-Type: application/json" \
-d '{
"query": "最新科技新闻",
"top_k": 5,
"recency_filter": "week"
}'
- 限定网站搜索:
curl -X POST http://127.0.0.1:8001/search \
-H "Content-Type: application/json" \
-d '{
"query": "天气预报",
"top_k": 5,
"site_filter": ["www.weather.com.cn"]
}'
API 参数
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
query |
string | 必填 | 搜索关键词 |
top_k |
int | 10 | 返回结果数量 (1-20) |
recency_filter |
string | null | 时间过滤: day, week, month, year |
site_filter |
list | null | 限定搜索的网站列表 |
Response Format
{
"results": [
{
"title": "北京十大必去景点",
"url": "https://example.com/beijing-attractions",
"snippet": "北京作为中国的首都,拥有众多著名景点...",
"site_name": "旅游网"
}
],
"total": 10
}
Conversation Flow
- 用户提问需要搜索的内容
- 判断是否需要时间过滤(如"最新"、"今天"等)
- 调用搜索 API 获取结果
- 整理并展示相关信息
- 可根据需要深入查看某个结果
使用场景
- 查询实时信息(新闻、天气、股票等)
- 搜索中文互联网内容
- 获取特定网站的信息
- 时效性要求高的查询
Usage Guidance
This package appears to be what it says: a small FastAPI proxy that sends queries to Baidu's AI search API and returns results. Before installing, verify the Homebrew 'uv' formula (so you know what binary will be installed), protect the BAIDU_API_KEY (the key will be sent to Baidu's API), and run the service locally (the default binds to 127.0.0.1). Avoid sending sensitive secrets as search queries because request bodies may be logged by the service's validation handler. If you prefer not to install a new Homebrew formula, you can run the Python app directly with a normal venv + pip instead of the 'uv' helper.
Capability Analysis
Type: OpenClaw Skill
Name: baidu-search-cn
Version: 1.0.2
The skill bundle is a standard FastAPI-based proxy for the Baidu AI Search API. It correctly handles environment variables for authentication, uses legitimate dependencies (httpx, fastapi), and communicates only with the official Baidu endpoint (qianfan.baidubce.com). No evidence of malicious intent, data exfiltration, or prompt injection was found in the code or documentation (SKILL.md, baidu_api.py).
Capability Assessment
Purpose & Capability
Name and description (Baidu AI web search) match the code and runtime behavior: a small FastAPI service that calls Baidu's web_search endpoint. The single required environment variable (BAIDU_API_KEY) is appropriate. The only slightly unexpected item is the explicit requirement for a 'uv' CLI binary (and a Homebrew formula named 'uv') — this appears to be an environment helper used in the SKILL.md (uv venv / uv pip / uv run) rather than something intrinsic to a search proxy; it is unusual but not evidently malicious.
Instruction Scope
SKILL.md instructs creating a .env with BAIDU_API_KEY and running a local FastAPI server; the code only reads BAIDU_API_KEY and an optional OPENAPI_SERVER_URL. The service accepts search requests and forwards them to Baidu's API. There are no instructions to read unrelated files, other credentials, or to send data to third-party endpoints beyond Baidu's documented API.
Install Mechanism
Install uses a Homebrew formula 'uv' to provide the 'uv' binary. Homebrew is a common installer, but the 'uv' formula is not a universally-known system binary; review the Homebrew package 'uv' before installing to ensure it matches expectations. The Python dependencies are declared in pyproject.toml and installed via pip (invoked through the 'uv' helper), which is proportional for a small FastAPI service.
Credentials
Only BAIDU_API_KEY is required and declared as the primary credential, which is appropriate for a proxy that authenticates to Baidu's API. No other SECRET/TOKEN/PASSWORD env vars or config paths are requested. The code uses BAIDU_API_KEY and an optional OPENAPI_SERVER_URL environment variable (the latter is harmless and documented).
Persistence & Privilege
The skill does not request 'always: true', does not modify other skills or system configs, and runs as a standalone local HTTP service. It does not ask for elevated or persistent system privileges.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install baidu-search-cn - After installation, invoke the skill by name or use
/baidu-search-cn - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
修复API响应解析问题,支持正确的references字段
Metadata
Frequently Asked Questions
What is 百度搜索中文版?
通过百度 AI 搜索 API 进行网页搜索,获取实时信息和搜索结果。 It is an AI Agent Skill for Claude Code / OpenClaw, with 380 downloads so far.
How do I install 百度搜索中文版?
Run "/install baidu-search-cn" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is 百度搜索中文版 free?
Yes, 百度搜索中文版 is completely free (open-source). You can download, install and use it at no cost.
Which platforms does 百度搜索中文版 support?
百度搜索中文版 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created 百度搜索中文版?
It is built and maintained by Jeck164 (@jeck164); the current version is v1.0.2.
More Skills