Web Search
Web Search
The web_search tool searches the web using your configured provider and
returns results. Results are cached by query for 15 minutes (configurable).
Quick start
```javascriptawait web_search({ query: "RemoteClaw plugin SDK" });```Choosing a provider
Provider comparison
| Provider | Result style | Filters | API key |
|---|---|---|---|
| Brave | Structured snippets | Country, language, time, llm-context mode | BRAVE_API_KEY |
| DuckDuckGo | Structured snippets | — | None (key-free) |
| Exa | Structured + extracted | Neural/keyword mode, date, content extraction | EXA_API_KEY |
| Firecrawl | Structured snippets | Via firecrawl_search tool | FIRECRAWL_API_KEY |
| Gemini | AI-synthesized + citations | — | GEMINI_API_KEY |
| Grok | AI-synthesized + citations | — | XAI_API_KEY |
| Kimi | AI-synthesized + citations | — | KIMI_API_KEY / MOONSHOT_API_KEY |
| Perplexity | Structured snippets | Country, language, time, domains, content limits | PERPLEXITY_API_KEY / OPENROUTER_API_KEY |
| Tavily | Structured snippets | Via tavily_search tool | TAVILY_API_KEY |
Auto-detection
Provider lists in docs and setup flows are alphabetical. Auto-detection keeps a separate precedence order:
If no provider is set, RemoteClaw checks for API keys in this order and uses
the first one found:
- Brave —
BRAVE_API_KEYorplugins.entries.brave.config.webSearch.apiKey - Gemini —
GEMINI_API_KEYorplugins.entries.google.config.webSearch.apiKey - Grok —
XAI_API_KEYorplugins.entries.xai.config.webSearch.apiKey - Kimi —
KIMI_API_KEY/MOONSHOT_API_KEYorplugins.entries.moonshot.config.webSearch.apiKey - Perplexity —
PERPLEXITY_API_KEY/OPENROUTER_API_KEYorplugins.entries.perplexity.config.webSearch.apiKey - Firecrawl —
FIRECRAWL_API_KEYorplugins.entries.firecrawl.config.webSearch.apiKey - Tavily —
TAVILY_API_KEYorplugins.entries.tavily.config.webSearch.apiKey
If no keys are found, it falls back to Brave (you will get a missing-key error prompting you to configure one).
Config
{ tools: { web: { search: { enabled: true, // default: true provider: "brave", // or omit for auto-detection maxResults: 5, timeoutSeconds: 30, cacheTtlMinutes: 15, }, }, },}Provider-specific config (API keys, base URLs, modes) lives under
plugins.entries.<plugin>.config.webSearch.*. See the provider pages for
examples.
Storing API keys
```json5{ plugins: { entries: { brave: { config: { webSearch: { apiKey: "YOUR_KEY", // pragma: allowlist secret }, }, }, }, },}``````bashexport BRAVE_API_KEY="YOUR_KEY"```
For a gateway install, put it in `~/.remoteclaw/.env`.See [Env vars](/help/faq#env-vars-and-env-loading).Tool parameters
| Parameter | Description |
|---|---|
query | Search query (required) |
count | Results to return (1-10, default: 5) |
country | 2-letter ISO country code (e.g. “US”, “DE”) |
language | ISO 639-1 language code (e.g. “en”, “de”) |
freshness | Time filter: day, week, month, or year |
date_after | Results after this date (YYYY-MM-DD) |
date_before | Results before this date (YYYY-MM-DD) |
ui_lang | UI language code (Brave only) |
domain_filter | Domain allowlist/denylist array (Perplexity only) |
max_tokens | Total content budget, default 25000 (Perplexity only) |
max_tokens_per_page | Per-page token limit, default 2048 (Perplexity only) |
Examples
// Basic searchawait web_search({ query: "RemoteClaw plugin SDK" });
// German-specific searchawait web_search({ query: "TV online schauen", country: "DE", language: "de" });
// Recent results (past week)await web_search({ query: "AI developments", freshness: "week" });
// Date rangeawait web_search({ query: "climate research", date_after: "2024-01-01", date_before: "2024-06-30",});
// Domain filtering (Perplexity only)await web_search({ query: "product reviews", domain_filter: ["-reddit.com", "-pinterest.com"],});Tool profiles
If you use tool profiles or allowlists, add web_search or group:web:
{ tools: { allow: ["web_search"], // or: allow: ["group:web"] (includes both web_search and web_fetch) },}Related
- Web Fetch — fetch a URL and extract readable content
- Web Browser — full browser automation for JS-heavy sites