← 返回 Skills 市场
jeck164

百度搜索中文版

作者 Jeck164 · GitHub ↗ · v1.0.2
cross-platform ✓ 安全检测通过
380
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install baidu-search-cn
功能描述
通过百度 AI 搜索 API 进行网页搜索,获取实时信息和搜索结果。
使用说明 (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

  1. 访问 百度智能云控制台
  2. 创建应用获取 API Key

Quick Start

  1. 检查服务: curl http://127.0.0.1:8001/ping

  2. 搜索网页:

curl -X POST http://127.0.0.1:8001/search \
  -H "Content-Type: application/json" \
  -d '{
    "query": "北京有哪些旅游景区",
    "top_k": 10
  }'
  1. 带时间过滤的搜索:
curl -X POST http://127.0.0.1:8001/search \
  -H "Content-Type: application/json" \
  -d '{
    "query": "最新科技新闻",
    "top_k": 5,
    "recency_filter": "week"
  }'
  1. 限定网站搜索:
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

  1. 用户提问需要搜索的内容
  2. 判断是否需要时间过滤(如"最新"、"今天"等)
  3. 调用搜索 API 获取结果
  4. 整理并展示相关信息
  5. 可根据需要深入查看某个结果

使用场景

  • 查询实时信息(新闻、天气、股票等)
  • 搜索中文互联网内容
  • 获取特定网站的信息
  • 时效性要求高的查询
安全使用建议
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.
功能分析
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).
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install baidu-search-cn
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /baidu-search-cn 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
修复API响应解析问题,支持正确的references字段
元数据
Slug baidu-search-cn
版本 1.0.2
许可证
累计安装 3
当前安装数 2
历史版本数 1
常见问题

百度搜索中文版 是什么?

通过百度 AI 搜索 API 进行网页搜索,获取实时信息和搜索结果。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 380 次。

如何安装 百度搜索中文版?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install baidu-search-cn」即可一键安装,无需额外配置。

百度搜索中文版 是免费的吗?

是的,百度搜索中文版 完全免费(开源免费),可自由下载、安装和使用。

百度搜索中文版 支持哪些平台?

百度搜索中文版 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 百度搜索中文版?

由 Jeck164(@jeck164)开发并维护,当前版本 v1.0.2。

💬 留言讨论