Loading...
Loading...
USE FOR web search, research, RAG, grounding, browse, find, lookups, fact-checking, documentation, agentic AI. All-in-one, optimized for AI agents. Pre-extracted, token-budgeted web content, deep research, news, images, videos, places, custom ranking
npx skill4agent add brave/brave-search-skills bxbxbx "query"bx answersbx webbxcurl -fsSL https://raw.githubusercontent.com/brave/brave-search-cli/main/scripts/install.sh | shRequires: Brave Search API Key +binarybxPlans: Different subcommands may require different plans. See https://api-dashboard.search.brave.com/app/subscriptions/subscribe
# Install (macOS/Linux)
curl -fsSL https://raw.githubusercontent.com/brave/brave-search-cli/main/scripts/install.sh | sh
# Configure API key (get one at https://api-dashboard.search.brave.com)
bx config set-key # interactive (avoids shell history)
# or: export BRAVE_SEARCH_API_KEY=YOUR_KEY
# Search (default = bx context "query")
bx "your search query"| Your need | Command | Why |
|---|---|---|
| Look up docs, errors, code patterns | | Pre-extracted text, token-budgeted (default) |
| Get a synthesized explanation | | AI-generated, cites sources, streams |
| Deep research on complex topics | | Multi-search iterative research |
| Traditional search results | | All result types (web, news, discussions, etc.) |
| Find discussions/forums | | Forums often have solutions |
| Latest news / recent events | | Fresh info beyond training data |
| Find images | | Up to 200 results |
| Find videos | | Duration, views, creator |
| Local businesses / places | | 200M+ POIs |
| Boost/filter specific domains | | Or use |
| Command | Description | Output path |
|---|---|---|
| Default. RAG/LLM grounding — pre-extracted web content | |
| AI answers — OpenAI-compatible, streaming by default | |
| Web search — all result types | |
| News articles with freshness filters | |
| Image search (up to 200 results) | |
| Video search with duration/views | |
| Local place/POI search (200M+ POIs) | |
| Autocomplete/query suggestions | |
| Spell-check a query | |
| Manage API key and settings | |
bx "query"{
"grounding": {
"generic": [
{ "url": "...", "title": "...", "snippets": ["extracted content...", "..."] }
]
},
"sources": {
"https://example.com": { "title": "...", "hostname": "...", "age": ["...", "2025-01-15", "392 days ago"] }
}
}bx answers "query" --no-stream{"choices": [{"message": {"content": "Full answer text..."}}]}bx answers "query"{"choices": [{"delta": {"content": "chunk"}}]}bx web "query"{
"web": { "results": [{"title": "...", "url": "...", "description": "..."}] },
"news": { "results": [...] },
"videos": { "results": [...] },
"discussions": { "results": [...] }
}| Flag | Short alias | Default | Description |
|---|---|---|---|
| | 8192 | Approximate total tokens (1024-32768) |
| | 4096 | Max tokens per URL (512-8192) |
| | 20 | Max URLs in response (1-50) |
| | 50 | Max snippets across all URLs |
| | — | Max snippets per URL |
| | balanced | Relevance: |
bx "topic" --max-tokens 4096 --max-tokens-per-url 1024 --max-urls 5 --threshold strictcontextwebnews# Allowlist — only results from these domains
bx "rust axum" --include-site docs.rs --include-site github.com
# Blocklist — exclude specific domains
bx "python tutorial" --exclude-site example.com--include-site--exclude-site--goggles# Boost official docs, demote blog posts
bx "axum middleware tower" \
--goggles '$boost=5,site=docs.rs
$boost=3,site=github.com
/docs/$boost=5
/blog/$downrank=3' --max-tokens 4096
# Allowlist mode — only include matched sites
bx "Python asyncio patterns" \
--goggles '$discard
$boost,site=docs.python.org
$boost,site=peps.python.org'| Rule | Effect | Example |
|---|---|---|
| Promote domain (N=1-10) | |
| Demote domain (N=1-10) | |
| Remove domain entirely | |
| Boost matching URL paths | |
Generic | Allowlist mode — discard unmatched | |
echo '$boost=5,site=docs.rs
$boost=5,site=crates.io
$boost=3,site=github.com' | bx "axum middleware" --goggles @- --max-tokens 4096@/path/to/filebx "Python TypeError cannot unpack non-iterable NoneType" --max-tokens 4096# 1. Broad search
bx "axum middleware authentication" --max-tokens 4096
# 2. Too general? Narrow with strict threshold
bx "axum middleware tower layer authentication example" --threshold strict --max-tokens 4096
# 3. Still need synthesis? Ask for an answer
bx answers "how to implement JWT auth middleware in axum" --enable-researchbx "Next.js 15 breaking changes migration guide" --max-tokens 8192
bx news "Next.js 15 release" --freshness pmbx answers "compare SQLx and Diesel for Rust" --no-streamecho '{"messages":[{"role":"user","content":"what are the OWASP top 10 vulnerabilities for web APIs"}]}' | bx answers -| Code | Meaning | Agent action |
|---|---|---|
| 0 | Success | Process results |
| 1 | Client error (bad request) | Fix query/parameters |
| 2 | Usage error (bad flags) | Fix CLI arguments |
| 3 | Auth/permission error (401/403) | Check API key: |
| 4 | Rate limited (429) | Retry after delay |
| 5 | Server/network error | Retry with backoff |
bx "query" --threshold strict--include-sitebx answers "topic" --enable-researchbx news "query" --freshness pdbx places "query" --location "city"--api-key KEY--timeout SECS--extra KEY=VALUEcontextweb--lat--long--city--state--state-name--loc-country--postal-code--timezonebx answers --enable-researchbx --helpbx <command> --help