Skip to main content

baidu-search

Search the web using Baidu AI Search Engine (BDSE). Use this when you need live information, documentation, or to research topics and the built-in web_search is unavailable.

설치로 이동

소스 정보

저장소
Kernel8901/ai-agent-skills-classification
최근 소스 활동
2026년 4월 4일 15:26
감지된 SKILL.md 언어
영어
스타
4
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
3 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
baidu-search
description
Search the web using Baidu AI Search Engine (BDSE). Use this when you need live information, documentation, or to research topics and the built-in web_search is unavailable.
metadata
{"openclaw":{"emoji":"🔍︎","requires":{"bins":"[Truncated]","env":"[Truncated]"},"primaryEnv":"BAIDU_API_KEY"}}
# Baidu Search Skill This skill allows OpenClaw agents to perform web searches via Baidu AI Search Engine (BDSE). ## Setup 1. **API Key:** Ensure the BAIDU_API_KEY environment variable is set with your valid API key. 2. **Environment:** The API key should be available in the runtime environment. 3. **BAIDU_API_KEY:** BAIDU_API_KEY available, need to go to the baidu cloud platform(https://login.bce.baidu.com) registered account, if you already have account will go to get the API KEY (https://console.bce.baidu.com/qianfan/ais/console/apiKey) ## Workflow 1. The skill executes the Python script located at `scripts/search.py` 2. The script makes a POST request to the Baidu AI Search API 3. The API returns structured search results with titles, URLs, and content snippets ## Parameters #### request body structure | param | type | required| default| description| |----------|----------|----------|----------|-----------| | query | str | yes | | user query content| | edition | str | no | standard |Optional value: standard: Full version. lite: Standard version. | | resource_type_filter | list[obj] | no | [{"type": "web","top_k": 20},{"type": "video","top_k": 0},{"type": "image","top_k": 0},{"type": "aladdin","top_k": 0}] | Support setting web pages, videos, images, and Aladdin search modes. The maximum value of top_k for web pages is 50, for videos it is 10, for images it is 30, and for Aladdin it is 5| | search_filter | list[obj] | no | |Search and filter based on the sub-conditions under SearchFilter. For the usage method, please refer to the details of the SearchFilter table.| | block_websites | list[str] | no | |List of sites that need to be blocked. Filter the search results belonging to this site and its sub-sites in the site list. Example: ["tieba.baidu.com"]| | search_recency_filter | str | no | |Filter based on the publication time of the web page. Enumeration values: week: The last 7 days month: The last 30 days semiyear: The last 180 days, year: The last 365 days| | safe_search | bool | no | false |Whether to enable secure search or not, if it is enabled, a stricter risk control strategy will be adopted, and some queries that may involve pornography or terrorism will not return search results.| ### SearchFilter table | param | type | required| default| description| |----------|----------|----------|----------|-----------| | match | obj | no | |filter site condition| | match.site | str | no | |Support setting search conditions for specified sites, that is, only conduct content search within the set sites. Currently, it supports setting up 100 sites. Example: ["tieba.baidu.com", "baike.baidu.com"] Note: This is a paid feature and is currently free for a limited time.| | range | obj | no | |Range query. It can be used for numeric and date-type fields. The grammar format is as follows: "range" : { "{field}" : { "gte" : " {lowerBound}" , "gt" : "{lowerBound}" , "lte" : "{upperBound}" , "lt" : "{upperBound}" }} Entity (field) pageTime: The name of the entity representing the publication time, indicating a range query for pageTime. Here, pageTime corresponds to the page_time field in the response data. The filtering function for web page publication time is only applicable to available and displayable libraries. Other results such as videos will not be recalled.| #### SearchFilter example ```json { "match": { "site": ["tieba.baidu.com", "baike.baidu.com"] }, "range": { "pageTime": { "gte": "now-1w/d", "lt": "now/d" } } } ``` #### range usage description Query range (lowerBound\upperBound) 1. Specify date Specify search date range, format: YYYY-MM-DD, for example: quot; range" : { " page_time" : { " gte" : " 2025-11-01" , " lte" : " 2025-11-04" 2. Time units supported by fixed packages: y (year), M (month), w (week), d (day). Currently, the following fixed packages are provided. Any other packages are illegal. Among them, "now" To represent the current time, a mathematical expression can be added after "now" : "-1w" indicates minus one week. "-1M" indicates minus one month; "-1y" indicates minus one year; "/d" indicates the start/end time normalized to the current day. the fixed time unit enums: now/d now-1w/d: One week now-2w/d: Two weeks now-1M/d: One month now-3M/d: Three months now-6M/d: Six months now-1y/d: One year Parameter limitation description: 1.lte usage note: The range range will participate in the calculation of the cache key in the retrieval system. After the lte performs upward rounding and rounding, due to cache, the result timeliness may lag behind the lte value specified by match. 2. The lowerBound and upperBound times must exist simultaneously; otherwise, this function will not take effect. 3. Only one of gte and gt needs to be passed. If both are passed, only gt will take effect ## Example Usage ```bash BAIDU_API_KEY=xxx python3 skills/baidu-search/scripts/search.py '{"query":"北京有哪些旅游景区","resource_type_filter":[{"type":"web","top_k":20}],"search_filter":{"match":{"site":["www.weather.com.cn"]}},"search_recency_filter":"year"}' ``` ## Current Status The Baidu search skill is fully functional and can be used to retrieve current information from the web. As demonstrated, it successfully retrieved weather information for Beijing, showing current conditions and forecasts.
GitHub에서 보기