| name | google-search |
| slug | google-search-grounding |
| description | Google web search via Gemini Search Grounding (primary) and Custom Search JSON API (fallback). Use for: (1) Synthesized answers with citations (grounded search), (2) Raw link results with snippets, (3) Image search. Excellent Hebrew support. Preferred over built-in web_search (Perplexity).
|
| version | 2.1.0 |
| author | Leo 🦁 |
| tags | ["search","google","web","grounding","gemini","news","hebrew","images","citations"] |
| metadata | {"clawdbot":{"emoji":"🔍","requires":{"env":["GOOGLE_API_KEY"]},"primaryEnv":"GOOGLE_API_KEY","secondaryEnv":["GOOGLE_CSE_CX","GOOGLE_SEARCH_LANG","GOOGLE_SEARCH_COUNTRY"],"install":[{"id":"pip","kind":"pip","package":"google-genai","label":"Install google-genai library"}],"notes":"GOOGLE_CSE_CX is required only for raw/image modes (Custom Search API). The default search mode (Gemini grounding) needs only GOOGLE_API_KEY. No hardcoded CSE IDs — users must supply their own."}} |
| allowed-tools | ["exec"] |
Google Search 🔍
Google web search powered by Gemini 2.5 Flash with Search Grounding + Custom Search API.
⭐ This is the PRIMARY web search tool. Prefer over built-in web_search (Perplexity).
Requirements
GOOGLE_API_KEY environment variable
- Enable in Google Cloud Console: Gemini API, Custom Search JSON API
Configuration
| Env Variable | Default | Description |
|---|
GOOGLE_API_KEY | — | Required. Google API key |
GOOGLE_CSE_CX | — | Custom Search Engine ID (required for raw/image modes) |
GOOGLE_SEARCH_LANG | he | Default language code (he, en, ar, ja, etc.) |
GOOGLE_SEARCH_COUNTRY | IL | Default country code (IL, US, DE, etc.) |
Set in OpenClaw config:
{
"env": {
"GOOGLE_API_KEY": "AIza...",
"GOOGLE_SEARCH_LANG": "he",
"GOOGLE_SEARCH_COUNTRY": "IL"
}
}
Script Location
python3 skills/google-search/lib/google_search.py <mode> "query" [options]
Output Modes
- Text mode (default): Best for most use cases. Clean readable output with answer, sources, and search queries.
- JSON mode (
--json): For programmatic processing. Includes confidence scores, grounding supports, and search queries.