Broedkrummen

brave-api-search

知識管理v4.2.1
作者:Broedkrummen更新於 2026-10-03共 13 個版本 · 最新版本釋出於 2026-10-03@clawhub_broedkrummen/brave-api-search
資訊檢索#Documentation#Web Search

據 AlphaMoat 統計,截至 2026-10,brave-api-search 累計下載 12,814 次、獲 2 個星標,按累計下載量在本次參與排名的 10,914 個 AI 技能中排名第 2,177 位,在「知識管理」分類(745 個)中排名第 143 位。

列表預設按累計下載量排序,也可按星標排序;詳情頁排名按累計下載量計算。

累計下載
1.3萬
星標
2
全站下載量排名
#2,177
全站前 20% · 「知識管理」前 20%
平台累計下載星標評論
ClawHub ↗1.2萬2-
SkillHub ↗1.3萬2—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

透過 Brave API 使用搜尋與回答金鑰,建議和拼寫可另配專用金鑰。搜尋回傳標題、連結、說明;回答模式可綜合來源並提取實體。文件對非流式引文描述衝突,因此需要引文或實體時使用流式並核驗回傳來源。查詢傳送給 Brave,需保護金鑰並關注額度。

資料釋出於 2026-10-27

可以用來做什麼

  • 結合網頁連結研究主題

什麼時候用

  • 需要當前外部資訊或查詢輔助時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

搜尋這個主題,核對引文後總結來源。

月度資料趨勢

累計下載1.3萬
88721.1萬1.3萬2026-05 · 累計下載 91642026-06 · 累計下載 95062026-07 · 累計下載 1.1萬2026-08 · 累計下載 1.2萬2026-09 · 累計下載 1.2萬2026-10 · 累計下載 1.3萬26-0526-0926-10
星標2
1232026-05 · 星標 22026-06 · 星標 22026-07 · 星標 22026-08 · 星標 22026-09 · 星標 22026-10 · 星標 226-0526-0926-10

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-101.3萬—2
2026-091.2萬—2
2026-081.2萬+9.1%2
2026-071.1萬+11.4%2
2026-069506+3.7%2
2026-059164—2

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

10 KB · ClawHub v4.2.1
---
name: brave-api-search
description: Real-time web search, autosuggest, and AI-powered answers using the official Brave Search API. Use for searching documentation, facts, current events, or any web content. Supports AI grounded answers with citations and query autosuggest. Requires BRAVE_SEARCH_API_KEY and BRAVE_ANSWERS_API_KEY.
license: MIT
metadata:
  author: Broedkrummen
  version: 4.2.1
---

# Brave API Search v4.2.0 — Significant Update
展開全部(共 227 行)

## Native OpenClaw plugin

The same four tools are now available as a native plugin: [Brave API Search plugin](https://clawhub.ai/plugins/brave-api-search-plugin). Install it with `openclaw plugins install clawhub:brave-api-search-plugin`. This skill remains available for existing users.


Real-time web search, autosuggest, spellcheck, and AI-powered answers using the official Brave Search API. Four tools:
- `brave_search` — web results with titles, URLs, descriptions, optional AI summary
- `brave_suggest` — query autosuggestions as users type with optional rich metadata
- `brave_spellcheck` — spell correction and "Did you mean?" suggestions
- `brave_answers` — AI-grounded answers with inline citations powered by live web search
  | **NEW — v4.2.0:** Full entity extraction via `enable-entities` flag

## Setup

Set your Brave API keys in a local `.env` file (recommended):

```bash
# .env (do not commit)
BRAVE_SEARCH_API_KEY=your_key_here
BRAVE_ANSWERS_API_KEY=your_key_here
AUTOSUGGEST_API_KEY=your_key_here   # optional, for autosuggest only
BRAVE_SPELLCHECK_API_KEY=your_key_here   # optional, for spellcheck only
```

Get your keys at: https://api-dashboard.search.brave.com

**Key routing:**
- `brave_search` → `BRAVE_SEARCH_API_KEY`
- `brave_answers` → `BRAVE_ANSWERS_API_KEY`
- `brave_suggest` → `AUTOSUGGEST_API_KEY` → `BRAVE_AUTOSUGGEST_API_KEY` → `BRAVE_SEARCH_API_KEY` (tries in order)
- `brave_spellcheck` → `BRAVE_SPELLCHECK_API_KEY` → `BRAVE_SEARCH_API_KEY` (tries in order)

> Note: `brave_answers` uses streaming by default. Streaming is required for citations, entities, and research mode.

## When to Use This Skill

**Use `brave_search` when:**
- Searching for current information, news, or recent events
- Looking up documentation or technical references
- Need ranked results with URLs to follow up on
- Want an AI summary of search results

**Use `brave_suggest` when:**
- Power autocomplete in search interfaces
- Help users formulate better queries faster
- Need query completions as users type
- Want rich metadata (titles, descriptions, images) for suggestions

**Use `brave_answers` when:**
- Need a synthesized answer with cited sources
- Researching topics that benefit from multiple sources
- Want AI-grounded responses with inline citations
- Deep research mode needed (multi-search)

**Don't use this skill for:**
- Questions already answered from context or memory
- Tasks that don't require external information

## Tools

### brave_search

Web search returning ranked results with titles, URLs, and descriptions.

```bash
brave_search --query "latest Node.js release" --count 5
brave_search --query "TypeScript generics" --extra-snippets true
brave_search --query "current weather Copenhagen" --freshness pd
brave_search --query "React Server Components" --summary true
```

**Parameters:**
- `query` (required) — Search query, supports operators: `site:`, `"exact phrase"`, `-exclude`
- `count` — Results to return (1-20, default: 10)
- `country` — 2-letter country code (default: `us`)
- `freshness` — Date filter: `pd` (24h), `pw` (7 days), `pm` (31 days), `py` (1 year)
- `extra-snippets` — Include up to 5 extra text excerpts per result (default: false)
- `summary` — Fetch Brave AI summarizer result (default: false)
- `offset` — Pagination offset for next page results

**Returns:** Formatted list of results with title, URL, description, optional AI summary, and a hint for next page if `more_results_available`.

### brave_suggest

Query autosuggest API providing intelligent query autocompletion as users type.

```bash
brave_suggest --query "hello"
brave_suggest --query "pyt" --count 5 --country US
brave_suggest --query "einstein" --rich true
```

**Parameters:**
- `query` (required) — Partial query to get suggestions for
- `count` — Number of suggestions (1-10, default: 5)
- `country` — 2-letter country code (default: `US`)
- `rich` — Include enhanced metadata: titles, descriptions, images, entity detection (default: false, requires paid Autosuggest plan)

**Returns:** List of query suggestions, optionally with rich metadata. Results are cached for 60 seconds.

**Best Practices:**
- Implement debouncing (150-300ms) to avoid excessive API calls as users type
- Load suggestions asynchronously without blocking the UI

### brave_spellcheck

Spell checking and query correction for search queries.

```bash
brave_spellcheck --query "articifial inteligence"
brave_spellcheck --query "hello" --country US
```

**Parameters:**
- `query` (required) — Query to check for spelling errors
- `country` — 2-letter country code (default: `US`)

**Returns:** "Did you mean:" suggestion, or confirms no correction needed. Uses dedicated `BRAVE_SPELLCHECK_API_KEY` if available, falls back to `BRAVE_SEARCH_API_KEY`.


### brave_answers

AI-powered answers grounded in live web search with inline citations.

```bash
brave_answers --query "How does React Server Components work?"
brave_answers --query "Compare Postgres vs MySQL for OLAP" --enable-research true
brave_answers --query "Latest Python release notes" --enable-citations true
brave_answers --query "Who is Albert Einstein" --enable-entities true
```

**Parameters:**
- `query` (required) — Question or topic to research
- `country` — Target country for search context (default: `us`)
- `enable-citations` — Include inline source citations (default: true)
- `enable-research` — Multi-search deep research mode (default: false)
- `enable-entities` — Include entity information in responses (default: false, streaming required)
- `stream` — Enable streaming output (default: true — required for citations/entities/research)

**Returns:** AI answer with cited sources extracted from the response, plus token usage and cost breakdown.

> ⚠️ **Citations, entities, and research mode require streaming (`--stream true`, which is the default).** If you disable streaming with `--stream false`, citations and entity data will not be available.

**Streaming mode output:**
- Text streams progressively to stdout
- Entities streamed inline as `<enum_item>` tags are parsed
- **Entities mentioned** section printed at the end (v4.2.0)
- Sources printed at the end (sorted by citation number)
- Token usage and cost breakdown included

**Non-streaming fallback:** Use `--stream false` for simpler output at the cost of losing citations and entity data.

## Pricing & Limits

Brave pricing is credit-based and can change. Do **not** assume a fixed free request count.

Current public guidance (verify in Brave dashboard/docs before production use):
- Monthly trial credits may be offered (e.g. `$5 in monthly credits`)
- Search and Answers consume credits differently
- Rich suggestions require a paid Autosuggest plan
- Answers may also include token-based costs
- QPS limits depend on your plan tier

Always check your live limits and usage in:
- https://api-dashboard.search.brave.com
- https://brave.com/search/api/

## Technical Details

### Architecture

The skill uses a shared `utils.js` module containing:
- `parseArgs()` — CLI argument parser
- `fetchWithRetry()` — fetch with exponential backoff retry on 429 and 5xx
- `createCache()` — in-memory TTL cache (used by `brave_suggest`)

### brave_search.js

The core search script with the following optimizations:
- **Parallel summary fetch:** When `--summary` is enabled, the summary key is extracted from the search response and fetched in parallel with the search results
- **Pagination hint:** Response includes a hint for the next page offset when `more_results_available` is true
- **Rate limit handling:** Retries on 429 (honors `Retry-After` header) and 5xx (exponential backoff)

### brave_answers.js v4.2.0

The AI answers script supports two modes:
- **Streaming (default):** Progressive output with real-time entity extraction, deduplicated citations, token usage, and cost breakdown
- **Non-streaming:** Full citation and entity extraction from batch response via `parseCitations()` and `parseEntities()`

Key changes in v4.2.0:
- **Entity extraction:** Streaming mode parses `<enum_item>` tags incrementally — entity names are streamed inline as they are parsed, and a consolidated **Entities mentioned** section is printed at the end with URL and citation count per entity
- **Citation deduplication:** Duplicate source URLs are deduplicated so each source is cited only once (sorted by citation number)
- **Non-streaming mode (v4.2.0):** Full `parseCitations()` and `parseEntities()` applied to the batch response content, so citations and entities are extracted even without streaming

### brave_suggest.js

The autosuggest script with the following optimizations:
- **In-memory cache:** 60-second TTL cache keyed by `query|count|country|rich` — deduplicates rapid successive calls
- **Key fallback chain:** `AUTOSUGGEST_API_KEY` → `BRAVE_AUTOSUGGEST_API_KEY` → `BRAVE_SEARCH_API_KEY`

### brave_answers streaming

When streaming is enabled (`stream: true`):
- SSE chunks are parsed in real-time
- Citations are collected and printed at end (sorted by citation number)
- Entity items (`<enum_item>`) are parsed incrementally — streamed inline and collected for the **Entities mentioned** section
- Usage block (`<usage>`) parsed and displayed with token counts and total cost

## Security & Packaging Notes

- This skill only calls Brave official endpoints under `https://api.search.brave.com/res/v1`.
- It requires `BRAVE_SEARCH_API_KEY` and `BRAVE_ANSWERS_API_KEY` (keep them in `.env`, not inline in commands/chats).
- Optionally accepts `AUTOSUGGEST_API_KEY` or `BRAVE_AUTOSUGGEST_API_KEY` for autosuggest.
- It does not request persistent/system privileges and does not modify system config.
- All scripts are Node.js 18+ native (no external dependencies).

「知識管理」分類下的熱門技能

搜尋引擎知識管理

透過公開搜尋URL在16個搜尋引擎(7個國內直連+9個國際)中做跨引擎檢索、結果去重與多源交叉驗證,無需API Key,內建零依賴Python指令碼。Use when 使用者要求“搜一下/查資料/多找幾個來源/核實訊息/找公眾號文章/排查報錯/找論文或開源專案”時。輸入自然語言查詢詞,輸出帶來源連結與可信度標註的結構化結果。不適用於私有資料檢索、批次抓取、需要登入後可見的內容。

↓ 1075.9萬★ 147u_8ee34d77
ima-skills知識管理

透過 IMA OpenAPI 管理筆記與知識庫內容。

↓ 108.4萬★ 566u_1742680f
Summarize知識管理

把長文字、文件與網頁內容壓縮成要點和關鍵詞的摘要工具。

↓ 87.6萬★ 1048paudyyin
全網搜尋知識管理

透過“查一下、搜一下、搜尋、找一下”等自然語言檢索公開網頁,整理來源並交付橫版 PDF、Markdown 與標題連結表。支援使用者主動開啟、檢視和取消技能收藏,保留原報告取回。

↓ 50.9萬★ 2u_32d99f8a
web-tools-guide知識管理

規定如何為網頁請求選擇合適工具的必讀指引。

↓ 40萬★ 220user_ec205dbb
Aihot Skill Lite知識管理

AI HOT(aihot.virxact.com)中文 AI 資訊查詢 Skill,幫助使用者獲取今日 AI 圈動態、AI 日報、AI 熱點、最新 AI 資訊以及 OpenAI、Anthropic、Google 等公司的最新發布資訊。

↓ 32.1萬★ 92Khazix
全球12億文獻知識庫(8千萬中文期刊可下載)知識管理

全球12億文獻知識庫(8千萬中文期刊可下載)——透過 SmartLib 開放平台 API 提供中外文學術文獻檢索與下載能力,覆蓋 8000 萬篇授權中文期刊全文 + 12.28 億條全球文獻後設資料(期刊 7.19 億 / 專利 2.15 億 / 會議 7155 萬 / 學位論文 2473 萬 / 標準 268 萬)。 能力:中英文關鍵詞檢索、文獻詳情、中文期刊 PDF 全文下載、外文 OA 文獻十級渠道免費下載(不消耗配額)、智慧關鍵詞擴充套件、核心期刊優先排序、相關性重排、引文追溯、分類號檢索。 配額:首次使用自動註冊,免費 100 次檢索 + 10 次下載 / 月;耗盡自動彈出方案(體驗卡 / 個人版月 / 專業版月 / 單篇下載 / 下載包),可說「升級 / 充值」喚起;企業 / 機構定製聯絡 [email protected]。 觸發:使用者表達"查論文""找文獻""檢索學術""搜期刊""查專利""找標準""下論文""寫文獻綜述""找參考文獻""查 SCI/EI"等意圖時啟用;也適用"幫我找關於 XX 的論文""寫文獻綜述""找幾篇引用支撐論點"。英文:"find papers" "search literature" "write literature review" "find supporting citations"。 呼叫前必須先用 /consume 獲取 consume_token,再憑 token 調 /search(每次計費介面呼叫都需一次 /consume)。

↓ 30.3萬★ 189user_164f4c1f
Markdown Converter知識管理

用 uvx 直接呼叫 markitdown,把各類檔案轉成 Markdown。

↓ 20.4萬★ 256Peter Steinberger

資料月份:2026-10 · 下載/星標數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。