google-search-groundingGoogle web search via Gemini Search Grounding (primary) and Custom Search JSON API (fallback). Use for: (1) Synthesized answers with citations (grounded sear...
Install via ClawdBot CLI:
clawdbot install Shaharsha/google-search-groundingInstall google-genai library:
Install google-genai libraryGoogle 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).
GOOGLE_API_KEY environment variable| 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"
}
}
python3 skills/google-search/lib/google_search.py <mode> "query" [options]
--json): For programmatic processing. Includes confidence scores, grounding supports, and search queries.Gemini 2.0 Flash + Google Search tool → synthesized answer with numbered citations.
python3 lib/google_search.py search "query" [--lang he] [--country IL] [--json]
When to use: Questions, current events, "what is X", Hebrew queries, anything needing a direct answer.
Examples:
# Hebrew (default)
python3 lib/google_search.py search "מזג אוויר תל אביב"
# English override
python3 lib/google_search.py search "latest AI news" --lang en --country US
# JSON output
python3 lib/google_search.py search "OpenAI GPT-5 release date" --json
Output format:
<Synthesized answer text>
Sources:
1. Source Title
https://example.com/article
2. Another Source
https://example.com/other
Custom Search JSON API → links with titles and snippets.
python3 lib/google_search.py raw "query" [-n 5] [--lang he] [--country IL] [--json]
When to use: Need actual URLs, research, building reference lists, when you want links not answers.
Examples:
python3 lib/google_search.py raw "python asyncio tutorial" -n 5
python3 lib/google_search.py raw "best restaurants tel aviv" --json
python3 lib/google_search.py raw "rust vs go performance" -n 3 --lang en
Output format:
1. Page Title
https://example.com/page
Brief snippet from the page...
2. Another Page
https://example.com/other
Another snippet...
Custom Search image search → image URLs with titles.
python3 lib/google_search.py image "query" [-n 5] [--lang he] [--country IL] [--json]
When to use: Finding images, visual references, thumbnails.
Examples:
python3 lib/google_search.py image "aurora borealis" -n 5
python3 lib/google_search.py image "תל אביב חוף" --json
| Option | Applies To | Description | Default |
|---|---|---|---|
| --lang CODE | all | Language code (he, en, ar, ja…) | env GOOGLE_SEARCH_LANG (he) |
| --country CODE | all | Country code (IL, US, DE…) | env GOOGLE_SEARCH_COUNTRY (IL) |
| -n NUM | raw, image | Number of results (1–10) | 10 |
| --json | all | Structured JSON output | off |
Language resolution order: --lang flag → GOOGLE_SEARCH_LANG env → None (auto)
Country resolution order: --country flag → GOOGLE_SEARCH_COUNTRY env → None (auto)
| API | Free Tier | Rate Limit |
|---|---|---|
| Gemini API (grounded search) | Generous free tier | ~15 RPM (free), higher on paid |
| Custom Search JSON API (raw/image) | 100 queries/day | 10K queries/day (paid) |
On 429 errors: Script retries once automatically. If quota exhausted, fall back to built-in web_search (Perplexity).
Works with queries in any language. Hebrew is the default:
# Hebrew (default, no flags needed)
python3 lib/google_search.py search "חדשות טכנולוגיה"
# English
python3 lib/google_search.py search "technology news" --lang en
# Arabic
python3 lib/google_search.py search "أخبار التكنولوجيا" --lang ar
bash skills/google-search/install.sh
Generated Mar 1, 2026
Startups can use the grounded search mode to gather synthesized insights on competitors, market trends, and customer needs with citations. This helps in creating business plans and pitch decks efficiently, leveraging multilingual support for global markets.
Journalists and content creators can utilize raw search mode to collect links and snippets for fact-checking and article references. The image search mode aids in sourcing visual content, with JSON output for programmatic integration into publishing workflows.
Researchers and students can employ grounded search to get synthesized answers with citations for literature reviews or current studies. The tool's error handling and quota management ensure reliable access to up-to-date sources across languages.
Businesses can integrate this skill into AI agents to provide real-time, cited answers to customer queries, especially in Hebrew or other languages. It enhances support systems by pulling current information from the web, reducing manual research.
E-commerce platforms can use raw and image search modes to find suppliers, product images, and market data. The ability to customize language and country codes helps in targeting specific regions for sourcing and localization.
Offer this search skill as part of a subscription-based SaaS platform for businesses needing web research capabilities. Revenue comes from tiered plans based on API usage limits, with premium features like higher query volumes and priority support.
Integrate the skill into a freemium AI assistant app, where basic search functions are free, but advanced modes like JSON output or increased quotas require a paid upgrade. This attracts users with free access and monetizes through premium features.
Provide customization and consulting services to enterprises for tailoring the search skill to specific needs, such as industry-specific language models or integration with internal databases. Revenue is generated through project-based fees and ongoing support contracts.
💬 Integration Tip
Ensure GOOGLE_API_KEY is set in environment variables and enable required APIs in Google Cloud Console; use the default grounded search mode for most applications to get synthesized answers with citations.
Summarize URLs or files with the summarize CLI (web, PDFs, images, audio, YouTube).
AI-optimized web search via Tavily API. Returns concise, relevant results for AI agents.
This skill should be used when users need to search the web for information, find current content, look up news articles, search for images, or find videos. It uses DuckDuckGo's search API to return results in clean, formatted output (text, markdown, or JSON). Use for research, fact-checking, finding recent information, or gathering web resources.
Web search and content extraction via Brave Search API. Use for searching documentation, facts, or any web content. Lightweight, no browser required.
Search indexed Discord community discussions via Answer Overflow. Find solutions to coding problems, library issues, and community Q&A that only exist in Discord conversations.
Multi search engine integration with 17 engines (8 CN + 9 Global). Supports advanced search operators, time filters, site search, privacy engines, and WolframAlpha knowledge queries. No API keys required.