← Back to Skills Marketplace
phucanh08

Google Search Grounding 3

by phucanh08 · GitHub ↗ · v1.0.0
cross-platform ✓ Security Clean
874
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install google-search-grounding-3
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).
README (SKILL.md)

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 \x3Cmode> "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.

Modes

search — Grounded Search (Default, Recommended)

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:

\x3CSynthesized answer text>

Sources:
  1. Source Title
     https://example.com/article
  2. Another Source
     https://example.com/other

raw — Raw Search Results

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...

image — Image Search

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

Options Reference

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)


Error Handling

  • Missing API key: Clear error message with setup instructions.
  • 429 Rate Limit: Automatic retry once after 5-second wait.
  • Network errors: Descriptive error with cause.
  • No results: Clean "No results found." message.
  • Timeout: 30-second timeout on all HTTP requests.

Quota & Rate Limits

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).


Multilingual Support

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

Install

bash skills/google-search/install.sh
Usage Guidance
This skill appears to be what it claims: a Google/Gemini-grounded web search tool. Before installing: (1) Verify the GOOGLE_API_KEY you provide has minimal scopes (enable only Gemini API and Custom Search JSON API), (2) set GOOGLE_CSE_CX if you plan to use raw or image modes (the code requires it), (3) prefer installing dependencies into a virtualenv or container rather than using pip with --break-system-packages, (4) confirm the package 'google-genai' is acceptable for your environment, and (5) be aware that all queries and retrieved content go to Google's services (privacy considerations). Also note small metadata/version/ownerId inconsistencies in the package manifest — ask the publisher if provenance matters to you.
Capability Analysis
Type: OpenClaw Skill Name: google-search-grounding-3 Version: 1.0.0 The skill bundle is benign. It provides Google search functionality using the Gemini API and Custom Search JSON API, as described. The `SKILL.md` clearly outlines its purpose and requirements, including the `GOOGLE_API_KEY`. The `install.sh` script installs the necessary `google-genai` Python package and performs a benign smoke test. The `lib/google_search.py` script correctly uses environment variables for API keys and directs all network traffic to legitimate Google API endpoints (googleapis.com). There is no evidence of prompt injection against the agent, data exfiltration, malicious execution, or persistence mechanisms beyond the stated purpose.
Capability Assessment
Purpose & Capability
Name/description match the implementation: the Python script calls Google Gemini (google-genai) for grounded answers and the Google Custom Search JSON API for raw/image searches. The primary credential requested (GOOGLE_API_KEY) is exactly what those APIs need. Minor metadata discrepancies exist (registry ownerId/version differ from _meta.json and SKILL.md versions), which look like packaging/authoring inconsistencies but do not change functionality.
Instruction Scope
SKILL.md and the script operate within the stated scope (run the script, call Google APIs). However the registry-level 'required env vars' lists only GOOGLE_API_KEY while the SKILL.md and code rely on GOOGLE_CSE_CX for raw/image modes (the code raises if CSE_CX is not set). The instructions therefore reference an environment variable not declared as required in the registry metadata — this will cause raw/image modes to fail unless the user sets GOOGLE_CSE_CX. Otherwise, the runtime instructions do not read unrelated files or exfiltrate data to unknown endpoints.
Install Mechanism
There is no complex external download; install.sh runs 'pip install google-genai' (a public Google package) which is appropriate for using Gemini. The installer first attempts pip with --break-system-packages (which can modify system-managed Python packages on some systems) then retries without it. This is expected but the --break-system-packages option can be intrusive on some hosts — recommend installing into a virtualenv or container.
Credentials
The skill asks only for GOOGLE_API_KEY (declared as primaryEnv) and uses optional env vars GOOGLE_CSE_CX, GOOGLE_SEARCH_LANG, and GOOGLE_SEARCH_COUNTRY. These are proportionate to a Google search integration. Action item: restrict the API key's scopes in Google Cloud to only the required APIs (Gemini / Custom Search) and avoid supplying a broadly privileged key. Also note the registry metadata did not mark GOOGLE_CSE_CX as required even though raw/image modes need it.
Persistence & Privilege
The skill does not request 'always: true' or other elevated platform privileges. It does not modify other skills or system settings. It will attempt a smoke test during install but does not persist extra credentials or alter unrelated configs.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install google-search-grounding-3
  3. After installation, invoke the skill by name or use /google-search-grounding-3
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Major update: Adds Gemini Search Grounding, enhanced multilingual support, and improved usability. - Integrates Gemini 2.5 Flash Search Grounding for synthesized answers with citations (grounded search). - Adds multiple search modes: grounded answers, raw link results, and image search. - Professional Hebrew support and robust multilingual query handling. - Includes clear error handling, output modes (text/JSON), and automatic retry on common rate limits. - Environment variable configuration for language, country, and API keys. - Recommended as the new primary web search tool, replacing previous solutions.
Metadata
Slug google-search-grounding-3
Version 1.0.0
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Google Search Grounding 3?

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). It is an AI Agent Skill for Claude Code / OpenClaw, with 874 downloads so far.

How do I install Google Search Grounding 3?

Run "/install google-search-grounding-3" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Google Search Grounding 3 free?

Yes, Google Search Grounding 3 is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Google Search Grounding 3 support?

Google Search Grounding 3 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Google Search Grounding 3?

It is built and maintained by phucanh08 (@phucanh08); the current version is v1.0.0.

💬 Comments