360 Secure SkillHub
360 安全技能中心

Baidu Search 1.1.0

通过 python3 脚本调用百度 AI 搜索 API(BDSE)执行网页搜索,支持 standard/lite 版本、web/video/image/aladdin 资源类型过滤、站点匹配与屏蔽、时间范围及安全搜索等参数,需配置 BAIDU_API_KEY 环境变量。

leileitian
leileitian
热度 70.95
最近更新 2026-05-11 17:28:54
分类:搜索依赖:代码执行 / 第三方 API应用场景:研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add baidu-search-1-1-0
Metadata
name
baidu-search
description
Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.
metadata
{"openclaw":{"emoji":"🔍︎","requires":{"bins":["python3"],"env":["BAIDU_API_KEY"]},"primaryEnv":"BAIDU_API_KEY"}}

Baidu Search

Search the web via Baidu AI Search API.

Usage

python3 skills/baidu-search/scripts/search.py '<JSON>'

Request Parameters

Param Type Required Default Description
query str yes - Search query
edition str no standard standard (full) or lite (light)
resource_type_filter list[obj] no web:20, others:0 Resource types: web (max 50), video (max 10), image (max 30), aladdin (max 5)
search_filter obj no - Advanced filters (see below)
block_websites list[str] no - Sites to block, e.g. ["tieba.baidu.com"]
search_recency_filter str no - Time filter: week, month, semiyear, year
safe_search bool no false Enable strict content filtering

SearchFilter

Param Type Description
match.site list[str] Limit search to specific sites, e.g. ["baike.baidu.com"]
range.pageTime obj Date range for page_time field (see below)

Date Range Format

Fixed date: YYYY-MM-DD Relative time (from current day): now-1w/d, now-1M/d, now-1y/d

Operator Meaning
gte Greater or equal (start)
lte Less or equal (end)

Examples

# Basic search
python3 skills/baidu-search/scripts/search.py '{"query":"人工智能"}'

# Filter by time and site
python3 skills/baidu-search/scripts/search.py '{
  "query":"最新新闻",
  "search_recency_filter":"week",
  "search_filter":{"match":{"site":["news.baidu.com"]}}
}'

# Resource type filter
python3 skills/baidu-search/scripts/search.py '{
  "query":"旅游景点",
  "resource_type_filter":[{"type":"web","top_k":20},{"type":"video","top_k":5}]
}'

Current Status

Fully functional.