360 Secure SkillHub
360 安全技能中心

dasfgg

核心功能为调用百度AI搜索API实现网页搜索,可设置结果数量(1-50条)、时间范围(日期区间或近1天/7天/31天/365天)。适用于实时资讯获取、资料查询、主题研究等场景,需通过Python脚本传入含query的JSON请求,返回对应搜索结果。

ide-rea
ide-rea
热度 54.13
最近更新 2026-05-11 17:32:57
分类:搜索依赖:代码执行 / 第三方 API应用场景:研究

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add test-01
Metadata
name
baidu-test
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
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.