Metadata returned when grounding is enabled.

Currently, only Grounding with Google Search and Grounding with Google Maps are supported (see [GoogleSearchTool](https://firebase.google.com/docs/reference/js/ai.googlesearchtool#googlesearchtool_interface) and [GoogleMapsTool](https://firebase.google.com/docs/reference/js/ai.googlemapstool#googlemapstool_interface), respectively).

> [!IMPORTANT]
> **Important:** If using Grounding with Google Search, you are required to comply with the "Grounding with Google Search" usage requirements for your chosen API provider: [Gemini Developer API](https://ai.google.dev/gemini-api/terms#grounding-with-google-search) or Agent Platform Gemini API (see [Service Terms](https://cloud.google.com/terms/service-terms) section within the Service Specific Terms).

> [!IMPORTANT]
> **Important:** If using Grounding with Google Maps, you are required to comply with the "Grounding with Google Maps" usage requirements for your chosen API provider: [Gemini Developer API](https://ai.google.dev/gemini-api/terms#grounding-with-google-maps) or Agent Platform Gemini API (see [Service Terms](https://cloud.google.com/terms/service-terms) section within the Service Specific Terms).

**Signature:**

    export interface GroundingMetadata 

## Properties

| Property | Type | Description |
|---|---|---|
| [googleMapsWidgetContextToken](https://firebase.google.com/docs/reference/js/ai.groundingmetadata#groundingmetadatagooglemapswidgetcontexttoken) | string | Resource name of the Google Maps widget context token that can be used with the `PlacesContextElement` widget in order to render contextual data. Only populated in the case that grounding with Google Maps is enabled. |
| [groundingChunks](https://firebase.google.com/docs/reference/js/ai.groundingmetadata#groundingmetadatagroundingchunks) | [GroundingChunk](https://firebase.google.com/docs/reference/js/ai.groundingchunk#groundingchunk_interface)\[\] | A list of [GroundingChunk](https://firebase.google.com/docs/reference/js/ai.groundingchunk#groundingchunk_interface) objects. Each chunk represents a piece of retrieved content (for example, from a web page). that the model used to ground its response. |
| [groundingSupports](https://firebase.google.com/docs/reference/js/ai.groundingmetadata#groundingmetadatagroundingsupports) | [GroundingSupport](https://firebase.google.com/docs/reference/js/ai.groundingsupport#groundingsupport_interface)\[\] | A list of [GroundingSupport](https://firebase.google.com/docs/reference/js/ai.groundingsupport#groundingsupport_interface) objects. Each object details how specific segments of the model's response are supported by the `groundingChunks`. |
| [searchEntryPoint](https://firebase.google.com/docs/reference/js/ai.groundingmetadata#groundingmetadatasearchentrypoint) | [SearchEntrypoint](https://firebase.google.com/docs/reference/js/ai.searchentrypoint#searchentrypoint_interface) | Google Search entry point for web searches. This contains an HTML/CSS snippet that must be embedded in an app to display a Google Search entry point for follow-up web searches related to a model's "Grounded Response". |
| [webSearchQueries](https://firebase.google.com/docs/reference/js/ai.groundingmetadata#groundingmetadatawebsearchqueries) | string\[\] | A list of web search queries that the model performed to gather the grounding information. These can be used to allow users to explore the search results themselves. |

## GroundingMetadata.googleMapsWidgetContextToken

Resource name of the Google Maps widget context token that can be used with the `PlacesContextElement` widget in order to render contextual data. Only populated in the case that grounding with Google Maps is enabled.

**Signature:**

    googleMapsWidgetContextToken?: string;

## GroundingMetadata.groundingChunks

A list of [GroundingChunk](https://firebase.google.com/docs/reference/js/ai.groundingchunk#groundingchunk_interface) objects. Each chunk represents a piece of retrieved content (for example, from a web page). that the model used to ground its response.

**Signature:**

    groundingChunks?: GroundingChunk[];

## GroundingMetadata.groundingSupports

A list of [GroundingSupport](https://firebase.google.com/docs/reference/js/ai.groundingsupport#groundingsupport_interface) objects. Each object details how specific segments of the model's response are supported by the `groundingChunks`.

**Signature:**

    groundingSupports?: GroundingSupport[];

## GroundingMetadata.searchEntryPoint

Google Search entry point for web searches. This contains an HTML/CSS snippet that must be embedded in an app to display a Google Search entry point for follow-up web searches related to a model's "Grounded Response".

**Signature:**

    searchEntryPoint?: SearchEntrypoint;

## GroundingMetadata.webSearchQueries

A list of web search queries that the model performed to gather the grounding information. These can be used to allow users to explore the search results themselves.

**Signature:**

    webSearchQueries?: string[];