Files
openclaw/docs/tools/grok-search.md
Vincent Koc 78399c67e9 docs(tools): restructure web search into nested group with provider sub-pages
Restructure "Web and search" into a "Web Search" nested group
(matching Browser pattern) with provider sub-pages:

New pages:
- tools/gemini-search: Gemini with Google Search grounding setup
- tools/grok-search: Grok/xAI web-grounded search setup
- tools/kimi-search: Kimi/Moonshot web search setup

Existing pages (Brave, Firecrawl, Perplexity, Tavily) already exist.

Changes to tools/web.md (overview page):
- Simplify provider table with links to sub-pages
- Replace inline Gemini section with link to dedicated page
- Replace inline Brave/Perplexity setup with CardGroup linking all 7 providers
- Keep auto-detection, web_search, web_fetch reference sections

Navigation: "Web and search" -> "Web Search" with all 8 pages
(overview + 7 providers alphabetical)
2026-03-22 14:25:16 -07:00

73 lines
1.5 KiB
Markdown

---
summary: "Grok web search via xAI web-grounded responses"
read_when:
- You want to use Grok for web_search
- You need an XAI_API_KEY for web search
title: "Grok Search"
---
# Grok Search
OpenClaw supports Grok as a `web_search` provider, using xAI web-grounded
responses to produce AI-synthesized answers backed by live search results
with citations.
## Get an API key
<Steps>
<Step title="Create a key">
Get an API key from [xAI](https://console.x.ai/).
</Step>
<Step title="Store the key">
Set `XAI_API_KEY` in the Gateway environment, or configure via:
```bash
openclaw configure --section web
```
</Step>
</Steps>
## Config
```json5
{
plugins: {
entries: {
xai: {
config: {
webSearch: {
apiKey: "xai-...", // optional if XAI_API_KEY is set
},
},
},
},
},
tools: {
web: {
search: {
provider: "grok",
},
},
},
}
```
**Environment alternative:** set `XAI_API_KEY` in the Gateway environment.
For a gateway install, put it in `~/.openclaw/.env`.
## How it works
Grok uses xAI web-grounded responses to synthesize answers with inline
citations, similar to Gemini's Google Search grounding approach.
## Supported parameters
Grok search supports the standard `query` and `count` parameters.
Provider-specific filters are not currently supported.
## Related
- [Web Search overview](/tools/web) -- all providers and auto-detection
- [Gemini Search](/tools/gemini-search) -- AI-synthesized answers via Google grounding