OpenClaw supports Gemini models with built-in Google Search grounding, which returns AI-synthesized answers backed by live Google Search results with citations.Documentation Index
Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
Get an API key
Create a key
Go to Google AI Studio and create an
API key.
Config
plugins.entries.google.config.webSearch.apiKey first, then GEMINI_API_KEY,
then models.providers.google.apiKey. For base URLs, the dedicated
plugins.entries.google.config.webSearch.baseUrl wins before
models.providers.google.baseUrl.
For a gateway install, put env keys in ~/.openclaw/.env.
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
Gemini search supportsquery, freshness, date_after, and date_before.
count is accepted for shared web_search compatibility, but Gemini grounding
still returns one synthesized answer with citations rather than an N-result
list.
freshness accepts day, week, month, year, and the shared shortcuts
pd, pw, pm, and py. OpenClaw converts these values, or an explicit
date_after/date_before range, into Gemini Google Search grounding’s
timeRangeFilter. country, language, and domain_filter are not supported.
Model selection
The default model isgemini-2.5-flash (fast and cost-effective). Any Gemini
model that supports grounding can be used via
plugins.entries.google.config.webSearch.model.
Base URL overrides
Setplugins.entries.google.config.webSearch.baseUrl when Gemini web search
must route through an operator proxy or custom Gemini-compatible endpoint. If
that is unset, Gemini web search reuses models.providers.google.baseUrl. A plain
https://generativelanguage.googleapis.com value is normalized to
https://generativelanguage.googleapis.com/v1beta; custom proxy paths are kept
as provided after trimming trailing slashes.
Related
- Web Search overview — all providers and auto-detection
- Brave Search — structured results with snippets
- Perplexity Search — structured results + content extraction