Files
ide-rea_baidu-search/SKILL.md

64 lines
1.7 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: baidu-search
description: "使用百度AI搜索引擎BDSE进行网络搜索。"
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](references/apikey-fetch.md)
## Usage
```bash
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
```bash
# 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.