闲社服务运行正常AI智能体自动化平台
百

百度搜索

通过百度 AI 搜索 API 进行网页搜索,获取实时信息和搜索结果。

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

百度搜索

🔍 百度搜索

Search the web with Baidu AI

通过百度 AI 搜索 API 进行网页搜索,获取中文互联网的实时信息。

设置

bash
cd {baseDir}
echo BAIDUAPIKEY=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 或环境变量中设置 BAIDUAPIKEY。

获取 API Key

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

快速开始

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

参数类型默认值说明
querystring必填搜索关键词
top_k
int | 10 | 返回结果数量 (1-20) | | recency_filter | string | null | 时间过滤: day, week, month, year | | site_filter | list | null | 限定搜索的网站列表 |

响应格式

json
{
results: [
{
title: 北京十大必去景点,
url: https://example.com/beijing-attractions,
snippet: 北京作为中国的首都,拥有众多著名景点...,
site_name: 旅游网
}
],
total: 10
}

对话流程

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

使用场景

  • - 查询实时信息(新闻、天气、股票等)
  • 搜索中文互联网内容
  • 获取特定网站的信息
  • 时效性要求高的查询

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 investment-advisor-zhang-openclaw-cn-1776023853 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 investment-advisor-zhang-openclaw-cn-1776023853 技能

通过命令行安装

skillhub install investment-advisor-zhang-openclaw-cn-1776023853

下载

⬇ 下载 百度搜索 v1.0.0(免费)

文件大小: 6.22 KB | 发布时间: 2026-4-13 10:40

v1.0.0 最新 2026-4-13 10:40
Initial release: Enables real-time Chinese web search via Baidu AI.

- Supports keyword, site-specific, and recent-time filtered search.
- Requires BAIDU_API_KEY environment variable for setup.
- Provides structured JSON results including title, URL, summary, and site name.
- Useful for retrieving news, weather, financial info, and other timely content from the Chinese web.
返回顶部