SuperAPI AI Directory

multi-search

General & other

View repository

Updated 10-16 01:35

About this skill

Multi-Search Skill - Intelligent multi-engine search

This skill integrates multiple search engines, automatically detects the network environment, and intelligently selects the best available engine.

Engine priority

Quality-first mode (prefer_quality=True)

  1. Tavily API (1000 times/month) - Highest quality, requires API Key
  2. DuckDuckGo (unlimited free) - No API Key required
  3. Bing Web Search API (1000 times/month) - Requires API Key
  4. Bing scraper (unlimited free) - Final fallback

Balanced mode (prefer_quality=False, default)

  1. DuckDuckGo (unlimited free) - Prioritize free engines
  2. Tavily API (1000 times/month) - If an API Key is configured
  3. Bing Web Search API (1000 times/month)
  4. Bing scraper (unlimited free)

Core capabilities

  • Intelligent network detection and engine switching
  • Automatic quota management (Tavily/Bing API)
  • Supports web page content scraping
  • 5-minute network detection cache

Usage

Basic search

from multi_search import search

# 平衡模式 - 优先免费引擎
results = search("Python tutorial", max_results=5)

# 质量优先模式 - 优先使用 Tavily
results = search("AI research", max_results=5, prefer_quality=True)

# 强制重新检测网络(切换 VPN 后使用)
results = search("OpenClaw skills", max_results=5, force_network_check=True)

Search skill (automatic quality-first)

from multi_search import search_skills

results = search_skills("OpenClaw AI agent automation", max_results=10)

View system status

from multi_search import get_status

status = get_status()  # 使用缓存
status = get_status(force_network_check=True)  # 强制重新检测

Scrape detailed web page content

from multi_search import search, fetch_web_content, fetch_search_results_content

# 搜索并抓取第一个结果的详细内容
results = search("OpenClaw new features", max_results=3)
if results:
    content = fetch_web_content(results[0]['href'], max_length=3000)
    # content['title'], content['content'], content['success']

# 批量抓取所有搜索结果的详细内容
enriched_results = fetch_search_results_content(results, max_length=2000)
for r in enriched_results:
    if r.get('full_content'):
        # 使用 summarize 技能总结内容
        pass

Use in combination with the Summarize skill

OpenClaw 工作流:
1. 使用 multi-search 搜索关键词
2. 选择感兴趣的搜索结果
3. 使用 fetch_web_content() 抓取网页内容
4. 使用 summarize 技能总结网页内容
5. 将摘要呈现给用户

Return result format

[
    {
        'title': '结果标题',
        'href': 'https://example.com',
        'body': '结果摘要...',
        'source': 'duckduckgo'  # 或 'tavily', 'bing_api', 'bing_scraper'
    }
]

Parameter description

  • query: Search keywords
  • max_results: Maximum number of results (default 5)
  • prefer_quality: Whether to prioritize quality (default False)
  • force_network_check: Whether to force re-detection of the network (default False)

Notes

  • DuckDuckGo: Free and unlimited, but inaccessible in some network environments
  • Tavily: High quality, requires an API key, 1000 times/month
  • Bing API: Officially stable, requires an Azure account, 1000 times/month
  • Bing scraper: Free and unlimited, but may be affected by anti-scraping measures