Grounding with Google Search

Grounding with Google Search connects the Gemini model to real-time web content and works with all available languages. This allows Gemini to provide more accurate answers and cite verifiable sources beyond its knowledge cutoff.

Grounding helps you build applications that can:

  • Increase factual accuracy: Reduce model hallucinations by basing responses on real-world information.
  • Access real-time information: Answer questions about recent events and topics.
  • Provide citations: Build user trust by showing the sources for the model's claims.

Python

from google import genai

client = genai.Client()

interaction = client.interactions.create(
    model="gemini-3.7-flash",
    input="Who won the euro 2024?",
    tools=[{"type": "google_search"}]
)

print(interaction