Gemini Search Tool icon

Gemini Search Tool

Use Google Gemini as a search tool

Gemini Search Tool

AI-generated

Summary

Searches the web with Gemini using each input item’s query, then returns the generated answer and query metadata. Optionally adds URL or organization context, tunes generation, throttles requests in batches, and includes source or full-response data.

Inputs

  • Query (required) — Search query sent to Gemini for each input item.
  • Model — Gemini model to use; defaults to gemini-2.5-flash.
  • Enable URL Context Tool — When enabled with a non-empty Restrict Search to URLs value, adds Gemini’s URL context tool and appends the comma-separated URLs to the query.
  • Restrict Search to URLs — Comma-separated URLs. Used for URL context only when that tool is enabled; the value is also included in the output when non-empty.
  • Enable Organization Context — When enabled, uses the Organization value to guide the model toward organization-related information.
  • Organization Context — Organization name used when organization context is enabled. A custom system instruction takes precedence over the generated organization instruction.
  • Options: Batching — Items per batch and interval in milliseconds for throttling requests. The implementation defaults to one item per batch and no delay when values are absent; batch size 0 is treated as 1.
  • Options: Temperature — Controls response randomness from 0 to 1; defaults to 0.6.
  • Options: Max Output Tokens — Maximum generated tokens; defaults to 8192.
  • Options: Top P — Nucleus sampling setting from 0 to 1.
  • Options: Top K — Top K sampling setting; included in the request when provided.
  • Options: Custom System Instruction — System instruction sent with the request; overrides the instruction generated from organization context.
  • Options: Return Full Response — When enabled, includes Gemini’s full API response in the output.
  • Options: Extract Source URL — When enabled, extracts the first web grounding URL when available and attempts to resolve its redirect.

Output shape

One output item per input item, paired with its input; each successful item contains a JSON object.

Successful outputs contain result (generated text), query, and organization (empty when organization context is disabled). Optional fields include restrictedUrls, urlContextMetadata, sourceUrl, redirectedSourceUrl, and fullResponse. Source URL fields appear only when extraction is enabled and a grounding URL is present; redirect lookup may fall back to the original URL. With Continue On Fail enabled, failed items contain an error field.

Links

Discussion