Gemini search
기준일: 2026-07-26
난이도: 중급
공식 기준: Gemini search
개요
이 페이지는 OpenClaw Gemini search 도구(파라미터, 권한, 설정, CLI)를 공식 문서 기준으로 정리합니다.
공식 요약: Gemini web search with Google Search grounding
도구 가시성은 profile / allow·deny policy / sandbox / channel 권한에 따라 달라집니다. 최신 스키마는 항상 공식 문서를 우선합니다.
공식 문서 기반 상세
아래는 공식 tools/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
Create a key
Go to [Google AI Studio](https://aistudio.google.com/apikey) and create an
API key.
Store the key
Set `GEMINI_API_KEY` in the Gateway environment, reuse
`models.providers.google.apiKey`, or configure a dedicated web-search key via:
```bash
openclaw configure --section web
```
Config
{
plugins: {
entries: {
google: {
config: {
webSearch: {
apiKey: "AIza...", // optional if GEMINI_API_KEY or models.providers.google.apiKey is set
baseUrl: "https://generativelanguage.googleapis.com/v1beta", // optional; falls back to models.providers.google.baseUrl
model: "gemini-2.5-flash", // default
},
},
},
},
},
tools: {
web: {
search: {
provider: "gemini",
},
},
},
}
Credential precedence: Gemini web search uses
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.
동작 방식
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 via a HEAD request through OpenClaw's SSRF-guarded fetch path (redirect following, http/https validation).
- Redirect resolution uses strict SSRF defaults, so redirects to private/internal targets are blocked.
Supported parameters
Gemini search supports query, 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. day/pd adds a recency instruction to the Gemini
query instead of a hard 24-hour range. week, month, year, and explicit
date_after/date_before ranges set Gemini Google Search grounding's
timeRangeFilter. country, language, and domain_filter are not supported.
모델 선택
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.
Base URL overrides
Set plugins.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.
관련 문서
- Web Search overview -- all providers and auto-detection
- Brave Search -- structured results with snippets
- Perplexity Search -- structured results + content extraction
검증 체크리스트
- 해당 tool이 활성 profile/policy에서 허용되는지 확인
- sandbox / elevated / host 실행 경로 정책을 이해했는지 확인
- 채널·에이전트 권한과 충돌하지 않는지 확인
- 공식 CLI/
--help와 문서 옵션이 버전과 맞는지 확인