Back to skills
extension
Category: Productivity & OfficeNo API key required

豆包搜索

豆包搜索(Doubao Search)技能 把火山引擎「豆包搜索 Custom版」(原名联网搜索 / 融合信息搜索)接入你的 AI 助手,用一句话触发联网搜索,返回带正文摘要、权威度、发布时间的高质量中文结果。 免费额度与限流 | 项目 | 数值 | |---|---| | **免费额度** | **每个火山账号每月 500 次**(与 Global 版共用,优先消耗,不区分搜索类型/付费类型) | | 免费额度重置 | 每月 1 日 | | 默认限流 | 账号维度 **5 QPS**(不够可提工单扩容) | | Custom 版 / Global 版 | 限流相互独立 |

personAuthor: subixphubModelScope

Execution

This skill ships with a batch JSON file scripts/search.json.

Call run_tool_batch strictly in the format below, using file_path to load the file. Do not construct your own actions list inline.

run_tool_batch requires an absolute path for file_path. Use the absolute directory path you see when reading this SKILL.md (the {dir} shown in your system prompt) to construct the full path.

run_tool_batch(
  file_path="<this skill dir>/scripts/search.json",
  args={
    "skill_dir": "<this skill dir>",
    "query": "搜索词",
    "search_type": "web",
    "count": 10
  }
)

The batch runs scripts/doubao_search.py once and prints structured markdown to stdout (step 0 .text). Present that markdown to the user directly, or distill it into a natural-language answer. Each web result includes Title / URL / Site / Authority / Snippet (short) / Summary (long, good for follow-up reasoning) / optional Content.

Batch Parameters

  • skill_dir: this skill's absolute directory (from your system prompt {dir}). Always pass it; the batch uses it to locate the script. Example: /mnt/workspace/.qwenpaw/workspaces/default/skills/doubao-search.
  • query: the search query, 1–100 chars. Single phrase only (the API does not support multi-term search). Example: "火山引擎 豆包搜索".
  • search_type: web (default) or image. web returns page results; image returns image results (max 5).
  • count: number of results. web ≤ 50 (default 10), image ≤ 5. Example: 10.

When calling run_tool_batch, pass all parameters listed above. Do not pass args={} or omit args — the batch JSON contains ${args.*} references and an empty args will leak a literal placeholder into the command, causing a parse failure.

Advanced parameters (not in the batch)

For sites / time-range / industry / format / authority-level etc., do NOT use the batch — call the script directly with execute_shell_command so you control quoting and can add any flag:

python3 <skill_dir>/scripts/doubao_search.py \
  --query "搜索词" \
  --type web --count 10 \
  --sites "a.com|b.com" \
  --block "c.com" \
  --time OneWeek \
  --content-format markdown \
  --industry finance \
  --auth-level 1 \
  --query-rewrite \
  --need-content \
  --show-content

Key flags: --time (OneDay/OneWeek/OneMonth/OneYear or YYYY-MM-DD..YYYY-MM-DD), --industry (finance/game/gov), --auth-level (0 unlimited / 1 very-authoritative-only), --content-format (text/markdown), --show-content (also dump a Content snippet, length controlled by --content-chars, default 500), --need-content (only results with body text), --need-url (only results with a URL, filters out 火山如意 cards), --raw (print full JSON for debugging).

Batch failure handling

  1. Verify you passed real values for skill_dir, query, search_type, count — especially that you did not pass args={}.
  2. If it still fails, run the script directly with execute_shell_command (see "Advanced parameters") — this also lets you pass sites/time/etc.
  3. If the script reports 找不到 API Key, the key file is missing at ~/.config/doubao_search/api_key. Tell the user to provide a new key (see Notes), do NOT hardcode a key into the script.
  4. After completing the task, tell the user: "The batch execution hit an issue so I completed the task manually. Would you like me to use edit_file to adjust this skill's batch script?"

Step-by-step reference

  1. Read API key: the script reads DOUBAO_SEARCH_API_KEY env var first, then --key-file, then ~/.config/doubao_search/api_key. The key is NOT in the source — skill files stay shareable.
  2. Build payload: {"Query", "SearchType", "Count", "Filter"?, "QueryControl"?, "ContentFormats"?, "Industry"?} per the Doubao Custom API (SearchType = web/image).
  3. Call API: POST https://open.feedcoopapi.com/search_api/web_search with Authorization: Bearer <key> + Content-Type: application/json. On HTTPError it prints status + body and exits non-zero.
  4. Format: web → markdown list (Title/URL/Site/Authority/PublishTime/ Summary-or-Snippet/optional Content); image → per-field dump. --raw prints the untouched JSON. ResponseMetadata.Error is surfaced as an error and exits non-zero.

Notes

  • Auth & key rotation: the key lives at ~/.config/doubao_search/api_key (recommend mode 600). It is deliberately OUTSIDE the skill directory so the skill can be shared/committed without leaking credentials. To rotate the key, just overwrite that file — no skill change needed. The env var DOUBAO_SEARCH_API_KEY overrides the file if set.
  • Quota & rate limit: 500 free calls/account/month (shared with Global版, consumed first regardless of plan); default 5 QPS per account. Custom版 and Global版 rate limits are independent.
  • When to prefer this over web_search: when the user wants Chinese content, full-text/Summary (not just snippets), site authority grading, site/time filtering, or 火山如意 structured cards. For a quick English-web fact check, web_search may be lighter.
  • Query quoting: the batch wraps ${args.query} in double quotes. If the query itself contains double quotes, skip the batch and call the script directly (Advanced parameters) so you can quote safely.
  • image results: the API returns ImageResults; its item schema is not fully documented, so the script dumps all fields per item. Use --raw to inspect the exact shape.