360 Secure SkillHub
360 安全技能中心

Baidu Search 1.1.3

该 Skill 通过 Python 脚本调用百度 AI 搜索 API,接收包含查询词、结果数量和时间范围的 JSON 参数并返回网页搜索结果;使用前需配置 BAIDU_API_KEY。它不包含网页正文抓取或结果摘要。

分类:搜索
andy27725
andy27725
热度 46.02
最近更新 2026-05-11 17:36:03

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add andy27725/baidu-search-1-1-3
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
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.

Prerequisites

API Key Configuration

This skill requires a BAIDU_API_KEY to be configured in OpenClaw.

If you don't have an API key yet, please visit: https://console.bce.baidu.com/ai-search/qianfan/ais/console/apiKey

For detailed setup instructions, see: references/apikey-fetch.md

Usage

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

Request Parameters

Param Type Required Default Description
query str yes - Search query
count int no 10 Number of results to return, range 1-50
freshness str no Null Time range, two formats: format one is ”YYYY-MM-DDtoYYYY-MM-DD“, and format two includes pd, pw, pm, and py, representing the past 24 hours, past 7 days, past 31 days, and past 365 days respectively

Examples

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

# Freshness first format "YYYY-MM-DDtoYYYY-MM-DD" example
python3 scripts/search.py '{
  "query":"最新新闻",
  "freshness":"2025-09-01to2025-09-08"
}'

# Freshness second format pd、pw、pm、py example
python3 scripts/search.py '{
  "query":"最新新闻",
  "freshness":"pd"
}'

# set count, the number of results to return
python3 scripts/search.py '{
  "query":"旅游景点",
  "count": 20,
}'

Current Status

Fully functional.