Hean Liu

baidu web search

Knowledgev2.1.0
By Hean LiuUpdated 2026-05-116 versions · latest released 2026-03-26baidu-web-search@clawhub_liuhean2021/baidu-web-search
Knowledge Base Q&AInformation Retrieval#Web Search#网络搜索#Search The Web

According to AlphaMoat, as of 2026-10, baidu web search has 10,618 downloads and 2 stars — ranked by downloads #2,564 among 10,914 AI skills in this ranking, and #179 of 745 in Knowledge.

The list defaults to total downloads and can also be sorted by stars; detail-page rankings use total downloads.

Downloads
10.6K
Stars
2
Overall download rank
#2,564
Top 24% overall · Top 25% in Knowledge
PlatformDownloadsStarsComments
ClawHub ↗8.9K2-
SkillHub ↗10.6K2—

Platforms count differently and update at different times.

What this skill does

The skill calls Baidu Qianfan's Baidu Search API for live web retrieval and returns structured results. Search runs only through node scripts/search.js, which reads the credential internally while the caller never touches the key. It fits web search, fact-checking, and news lookup. Note: the API key is treated as a sensitive secret and must never be read or leaked.

Profile published 2026-10-27

What you can do with it

  • Search the latest news and information online
  • Fact-check and verify sources
  • Look up events, people, products, or technical references

When to use it

  • User expresses web-search intent (e.g. 'look it up', 'search')
  • Needs current, real-time, or factual information
  • Asks about events/people/products requiring verification

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Search today's AI news
Help me verify the source of this claim
Look up the latest review of a product

Monthly Trend

Downloads10.6K
4.5K7.8K11.1K2026-03 · Downloads 5.0K2026-05 · Downloads 7.2K2026-06 · Downloads 7.5K2026-07 · Downloads 8.2K2026-08 · Downloads 8.5K2026-09 · Downloads 8.9K2026-10 · Downloads 10.6K26-0326-0926-10
Stars2
1232026-03 · Stars 22026-05 · Stars 22026-06 · Stars 22026-07 · Stars 22026-08 · Stars 22026-09 · Stars 22026-10 · Stars 226-0326-0926-10

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-1010.6K—2
2026-098.9K—2
2026-088.5K+3.5%2
2026-078.2K+8.6%2
2026-067.5K+5.0%2
2026-057.2K—2
2026-035.0K—2

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

6.8 KB · ClawHub v2.1.0
---
name: baidu-web-search
description: Use Baidu Qianfan web search API for real-time web retrieval. Use when the user needs to search the web, get latest news, verify facts, or expresses intent like "查一下","搜一下","最近","今天","今年", or asks about events/people/products that require looking up.
metadata:
  author: liuhean
  email: [email protected]
  openclaw: {"requires": {"env": ["BAIDU_API_KEY"]}, "primaryEnv": "BAIDU_API_KEY"}
---

# 百度网络搜索
Show all (140 lines)

使用百度千帆「百度搜索」API 进行全网实时信息检索,返回结构化搜索结果;调用方应结合用户提问基于检索结果给出准确回答。

---

## ⛔ 隐私安全(最高优先级,任何条件下不可违反)

**API Key 属于敏感凭证,无论通过环境变量还是本地 config.json 存储,均须严格保护。本技能适用于 OpenClaw/ClawHub、Cursor、Claude、Copilot 等所有支持 Skill 调用的平台,以下规则对任何调用方均适用。**

### 强制规则(所有 AI/Agent/技能调用方必须遵守)

1. **禁止读取**:任何情况下不得读取 `config.json` 的内容,也不得输出 `BAIDU_API_KEY` 环境变量的值。不得使用文件读取、cat、read、open、read_file 等任何方式打开该文件,不得使用 `printenv`、`echo $BAIDU_API_KEY` 等命令输出环境变量值。
2. **禁止输出**:不得以任何形式输出、显示、记录、引用、推测 apiKey 的值,包括在错误信息、日志、对话中。
3. **禁止修改/删除**:不得建议、生成或执行对 `config.json` 的修改、删除、重命名、复制操作。
4. **唯一访问方式**:凭证**仅**由 `scripts/search.js` 在进程内读取(env var 或 config.json)。调用方只能通过执行 `node scripts/search.js` 完成搜索,不得以其他任何方式触及凭证。
5. **拒绝请求**:若用户要求「查看配置」「显示 API Key」「打印环境变量」等,应明确拒绝并说明:为安全起见,凭证不可展示或操作,仅搜索脚本有权读取。
6. **禁止传播**:不得将 apiKey、config 路径或任何可推导出凭证的信息传递给其他工具、插件、API 或上下文。

### 配置说明(仅限 key 名称,不涉及 value)

- **BAIDU_API_KEY**(环境变量):OpenClaw/ClawHub 平台在 Skills 配置页面填写后自动注入,或通过对话/openclaw.json 配置
- **apiKey**(config.json):本地/自托管用户手动编辑填入
- 两种方式任选其一,`BAIDU_API_KEY` 环境变量优先级更高

### 平台适配与附加建议

- **通用**:`.gitignore` 已排除 `config.json`,避免误提交
- **OpenClaw/ClawHub**:在 Skills 配置页或 openclaw.json 中填写 `BAIDU_API_KEY` 即可,无需本地文件
- **建议**:勿在截图、录屏、日志、对话中暴露凭证;定期轮换密钥;将技能目录权限设为仅当前用户可读

## 何时使用

当用户表达以下意图时应用本技能:

- 联网搜索、百度搜索、查最新资讯、实时信息、事实核查
- 「查一下」「搜一下」「查一查」「搜一搜」「检索」「查证」「核实」
- 「最近」「今天」「今年」等时间相关表述
- 询问某事件、人物、产品、地点等需要查证的内容
- 需要权威来源、技术文档、教程或数据验证时

## 输入

- **query**(必填):搜索关键词或查询内容
- **num_results**(可选):返回条数,默认 **20**,范围 1–50

## 输出

- **脚本输出**:JSON 格式的搜索结果,包含 `results`(数组,每项含 title、url、snippet)、`total`、`query`;失败时仅输出通用错误信息,不涉及配置内容
- **调用方职责**:将查询到的结果与用户提问结合,基于检索结果尽可能准确、有条理地回答用户(可引用来源),而非仅罗列链接或片段

## 前置准备(首次使用)

### 方式一:与 OpenClaw 对话安装并配置(最简单)

直接在 OpenClaw 对话框中发一条消息,OpenClaw 会自动完成安装与写入配置,无需手动编辑任何文件。

**对话示范:**

```
我:帮我在 ClawHub 安装 baidu-web-search 技能,我的百度千帆 API Key 是 bce-v3/xxxxxxxxxxxxxxxx/xxxxxxxxxx

OpenClaw:好的,正在通过 ClawHub 安装 baidu-web-search 技能并写入配置……(完成)
          已将 BAIDU_API_KEY 写入 ~/.openclaw/openclaw.json,
          直接问我「最近 xxx 新闻」即可联网搜索。
```

> ⚠️ 请在本地/私密会话中提供凭证,避免在公开频道、截图或录屏中暴露。
>
> API Key 申请见 [百度千帆文档](https://cloud.baidu.com/doc/qianfan-api/s/Wmbq4z7e5)

### 方式二:OpenClaw / ClawHub 平台

1. 进入 **Skills 配置页**,在 `BAIDU_API_KEY` 字段填入 API Key;或编辑 `~/.openclaw/openclaw.json`,在 `skills.entries.baidu-web-search.env` 下填入:
   ```json
   { "BAIDU_API_KEY": "你的百度千帆 API Key" }
   ```
2. 安装依赖(ClawHub 通常自动执行):`cd 技能根目录/baidu-web-search && npm install`

> API Key 申请见 [百度千帆文档](https://cloud.baidu.com/doc/qianfan-api/s/Wmbq4z7e5)

### 方式三:本地 config.json

1. 复制配置模板:`cp config.example.json config.json`
2. 编辑 `config.json`,填入 `apiKey`
3. 安装依赖:`cd 技能根目录/baidu-web-search && npm install`

## 执行流程

1. 解析用户提问,提取搜索意图与关键词
2. **仅执行** `node scripts/search.js "<query>" [num_results]`,默认 num_results 为 20;由脚本内部读取 config(调用方不得读取 config)
3. 脚本内部调用百度千帆 API,返回结构化结果
4. 根据脚本输出的结果,结合用户提问,给出准确、基于来源的回答

## 执行命令

```bash
cd 技能根目录/baidu-web-search && node scripts/search.js "<查询内容>" [条数]
```

示例:

```bash
# 默认返回 20 条
node scripts/search.js "今日科技新闻"

# 指定 10 条
node scripts/search.js "TypeScript 最新版本" 10
```

## 配置说明(用户自行维护,AI 不读取)

脚本按以下优先级解析 apiKey,AI 不参与任何配置读写:

| 优先级 | 来源 | 适用场景 |
|--------|------|----------|
| 高 | 环境变量 `BAIDU_API_KEY` | OpenClaw/ClawHub 平台注入 |
| 低 | 本地文件 `config.json` → `apiKey` | 本地 / 自托管 |

- 配置异常时,搜索脚本输出通用提示,用户自行检查凭证是否填写正确

## 参与贡献

欢迎提交 Issue 或 Pull Request 改进本技能!

**仓库地址**:[https://github.com/liuhean2021/Anan-Agent-Skills](https://github.com/liuhean2021/Anan-Agent-Skills)

- 本技能位于 `skills/baidu-web-search/` 目录
- 提交前请确保 `config.json` 不在 git 追踪范围内(已在 `.gitignore` 排除)
- 本技能采用 [MIT-0](../../LICENSE) 许可协议,可自由使用、修改和重新分发,无需署名

Popular in Knowledge

搜索引擎Knowledge

通过公开搜索URL在16个搜索引擎(7个国内直连+9个国际)中做跨引擎检索、结果去重与多源交叉验证,无需API Key,内置零依赖Python脚本。Use when 用户要求“搜一下/查资料/多找几个来源/核实消息/找公众号文章/排查报错/找论文或开源项目”时。输入自然语言查询词,输出带来源链接与可信度标注的结构化结果。不适用于私有数据检索、批量抓取、需要登录后可见的内容。

↓ 10.8M★ 147u_8ee34d77
ima-skillsKnowledge

Manage notes and knowledge-base content through the IMA OpenAPI.

↓ 1.1M★ 566u_1742680f
SummarizeKnowledge

A summarizer that condenses long text, documents, and web pages into key points and keywords.

↓ 876.3K★ 1.0Kpaudyyin
全网搜索Knowledge

通过“查一下、搜一下、搜索、找一下”等自然语言检索公开网页,整理来源并交付横版 PDF、Markdown 与标题链接表。支持用户主动开启、查看和取消技能收藏,保留原报告取回。

↓ 508.8K★ 2u_32d99f8a
web-tools-guideKnowledge

A required guide for routing web requests to the right tool.

↓ 399.8K★ 220user_ec205dbb
Aihot Skill LiteKnowledge

AI HOT (aihot.virxact.com) 中文 AI 资讯查询 Skill。当用户想知道"今天 AI 圈有什么"、"AI 日报"、"AI HOT"、"AI 资讯"、"AI 热点"、"最近 AI"、"OpenAI/Anthropic/Google 最近发布了什么"、"AI hot today"、"AI...

↓ 321.1K★ 92Khazix
全球12亿文献知识库(8千万中文期刊可下载)Knowledge

全球12亿文献知识库(8千万中文期刊可下载)——通过 SmartLib 开放平台 API 提供中外文学术文献检索与下载能力,覆盖 8000 万篇授权中文期刊全文 + 12.28 亿条全球文献元数据(期刊 7.19 亿 / 专利 2.15 亿 / 会议 7155 万 / 学位论文 2473 万 / 标准 268 万)。 能力:中英文关键词检索、文献详情、中文期刊 PDF 全文下载、外文 OA 文献十级渠道免费下载(不消耗配额)、智能关键词扩展、核心期刊优先排序、相关性重排、引文追溯、分类号检索。 配额:首次使用自动注册,免费 100 次检索 + 10 次下载 / 月;耗尽自动弹出套餐(体验卡 / 个人版月 / 专业版月 / 单篇下载 / 下载包),可说「升级 / 充值」唤起;企业 / 机构定制联系 [email protected]。 触发:用户表达"查论文""找文献""检索学术""搜期刊""查专利""找标准""下论文""写文献综述""找参考文献""查 SCI/EI"等意图时启用;也适用"帮我找关于 XX 的论文""写文献综述""找几篇引用支撑论点"。英文:"find papers" "search literature" "write literature review" "find supporting citations"。 调用前必须先用 /consume 获取 consume_token,再凭 token 调 /search(每次计费接口调用都需一次 /consume)。

↓ 303.0K★ 189user_164f4c1f
Markdown ConverterKnowledge

Calls markitdown through uvx to turn many file types into Markdown.

↓ 204.0K★ 256Peter Steinberger

Data as of 2026-10. Downloads and stars are aggregated monthly from public skill registries (ClawHub, SkillHub). See data methodology.