# Grounding with Google Search

Category: [AI Search & GEO](https://seo-geo-glossary.com/en/glossary/category/ai-search-geo/) › [Retrieval & grounding](https://seo-geo-glossary.com/en/glossary/category/ai-search-geo/retrieval-grounding/)

**Grounding with Google Search** is a tool in the Gemini API. The model runs Google searches before it answers and bases its response on the web content it finds. The response includes source references that an application can display.

## How does grounding work?

According to the Gemini API documentation, the process has five steps. The application sends a prompt with the Google Search tool enabled. The model analyzes whether a search would improve the answer, generates search queries and runs them. The results are processed, and the API returns a grounded response with metadata. Google announced the feature for the Gemini API and AI Studio on October 31, 2024.

In the Firebase and generateContent interface, the metadata has four parts:

- `webSearchQueries` lists the searches that were run.
- `groundingChunks` lists web sources with URI and title.
- `groundingSupports` links text segments of the answer to the sources.
- `searchEntryPoint` provides HTML and CSS for the Google Search suggestions.

Applications that show the answer must display the search suggestions and the sources. Other interfaces name the fields differently, for example `url_citation` annotations.

## What does it mean for SEO and GEO?

The queries come from Google Search. Content that is found well there may therefore have better chances of appearing as a source (assumption). The queries in `webSearchQueries` also show how a model breaks a prompt into search terms, similar to query fan-out.

## Example

Example using the generateContent interface (Python SDK). The Gemini API docs now show the newer Interactions API, which uses different field names.

```python
from google import genai
from google.genai import types

client = genai.Client()
response = client.models.generate_content(
    model="<gemini-model>",
    contents="What is a canonical tag?",
    config=types.GenerateContentConfig(
        tools=[types.Tool(google_search=types.GoogleSearch())]
    ),
)
print(response.candidates[0].grounding_metadata.web_search_queries)
```

*Diagram: Retrieval-augmented generation.* In retrieval-augmented generation, the system first retrieves matching passages and passes them to the language model as context. Google calls the link between model output and verifiable sources grounding. The answer can only cite what was retrieved first (an inference from the method, not a Google statement).

## Related terms

- [AI search](https://seo-geo-glossary.com/en/glossary/ai-search/index.md)
- [Retrieval-augmented generation (RAG)](https://seo-geo-glossary.com/en/glossary/retrieval-augmented-generation/index.md)
- [Query fan-out](https://seo-geo-glossary.com/en/glossary/query-fan-out/index.md)
- [Agentic search](https://seo-geo-glossary.com/en/glossary/agentic-search/index.md)

## Sources

- [Grounding with Google Search – Gemini API (Google AI for Developers)](https://ai.google.dev/gemini-api/docs/google-search)
- [Grounding with Google Search – Firebase AI Logic](https://firebase.google.com/docs/ai-logic/grounding-google-search)
- [Grounding with Google Search in the Gemini API – Google Developers Blog (Oct 31, 2024)](https://developers.googleblog.com/en/gemini-api-and-ai-studio-now-offer-grounding-with-google-search/)

---

Last updated: October 8, 2026
URL: https://seo-geo-glossary.com/en/glossary/grounding-with-google-search/
