Gemini Search
Gemini Search
Section titled “Gemini Search”OpenClaw supports Gemini models with built-in Google Search grounding, which returns AI-synthesized answers backed by live Google Search results with citations.
Get an API key
Section titled “Get an API key”Create a key
Go to Google AI Studio and create an API key.
Store the key
Set
GEMINI_API_KEYin the Gateway environment, or configure via:Terminal window openclaw configure --section web
Config
Section titled “Config”{ plugins: { entries: { google: { config: { webSearch: { apiKey: "AIza...", // optional if GEMINI_API_KEY is set model: "gemini-2.5-flash", // default }, }, }, }, }, tools: { web: { search: { provider: "gemini", }, }, },}Environment alternative: set GEMINI_API_KEY in the Gateway environment.
For a gateway install, put it in ~/.openclaw/.env.
How it works
Section titled “How it works”Unlike traditional search providers that return a list of links and snippets, Gemini uses Google Search grounding to produce AI-synthesized answers with inline citations. The results include both the synthesized answer and the source URLs.
- Citation URLs from Gemini grounding are automatically resolved from Google redirect URLs to direct URLs.
- Redirect resolution uses the SSRF guard path (HEAD + redirect checks + http/https validation) before returning the final citation URL.
- Redirect resolution uses strict SSRF defaults, so redirects to private/internal targets are blocked.
Supported parameters
Section titled “Supported parameters”Gemini search supports the standard query and count parameters.
Provider-specific filters like country, language, freshness, and
domain_filter are not supported.
Model selection
Section titled “Model selection”The default model is gemini-2.5-flash (fast and cost-effective). Any Gemini
model that supports grounding can be used via
plugins.entries.google.config.webSearch.model.
Related
Section titled “Related”- Web Search overview — all providers and auto-detection
- Brave Search — structured results with snippets
- Perplexity Search — structured results + content extraction