GroundingMetadata

metadata returned to client when grounding is enabled.

Fields
webSearchQueries[] string

Optional. Web search queries for the following-up web search.

retrievalQueries[] string

Optional. Queries executed by the retrieval tools.

groundingChunks[] object (GroundingChunk)

List of supporting references retrieved from specified grounding source.

groundingSupports[] object (GroundingSupport)

Optional. List of grounding support.

searchEntryPoint object (SearchEntryPoint)

Optional. Google search entry for the following-up web searches.

retrievalMetadata object (RetrievalMetadata)

Optional. Output only. Retrieval metadata.

googleMapsWidgetContextToken string

Optional. Output only. Resource name of the Google Maps widget context token to be used with the PlacesContextElement widget to render contextual data. This is populated only for Google Maps grounding.

JSON representation
{
  "webSearchQueries": [
    string
  ],
  "retrievalQueries": [
    string
  ],
  "groundingChunks": [
    {
      object (GroundingChunk)
    }
  ],
  "groundingSupports": [
    {
      object (GroundingSupport)
    }
  ],
  "searchEntryPoint": {
    object (SearchEntryPoint)
  },
  "retrievalMetadata": {
    object (RetrievalMetadata)
  },
  "googleMapsWidgetContextToken": string
}

SearchEntryPoint

Google search entry point.

Fields
renderedContent string

Optional. Web content snippet that can be embedded in a web page or an app webview.

sdkBlob string (bytes format)

Optional. Base64 encoded JSON representing array of <search term, search url> tuple.

A base64-encoded string.

JSON representation
{
  "renderedContent": string,
  "sdkBlob": string
}

GroundingChunk

Grounding chunk.

Fields
chunk_type Union type
Chunk type. chunk_type can be only one of the following:
web object (Web)

Grounding chunk from the web.

retrievedContext object (RetrievedContext)

Grounding chunk from context retrieved by the retrieval tools.

maps object (Maps)

Grounding chunk from Google Maps.

JSON representation
{

  // chunk_type
  "web": {
    object (Web)
  },
  "retrievedContext": {
    object (RetrievedContext)
  },
  "maps": {
    object (Maps)
  }
  // Union type
}

Web

Chunk from the web.

Fields
uri string

URI reference of the chunk.

title string

title of the chunk.

domain string

domain of the (original) URI.

JSON representation
{
  "uri": string,
  "title": string,
  "domain": string
}

RetrievedContext

Chunk from context retrieved by the retrieval tools.

Fields
context_details Union type
Tool-specific details about the retrieved context. context_details can be only one of the following:
ragChunk object (RagChunk)

Additional context for the RAG retrieval result. This is only populated when using the RAG retrieval tool.

uri string

URI reference of the attribution.

title string

title of the attribution.

text string

Text of the attribution.

documentName string

Output only. The full document name for the referenced Vertex AI Search document.

JSON representation
{

  // context_details
  "ragChunk": {
    object (RagChunk)
  }
  // Union type
  "uri": string,
  "title": string,
  "text": string,
  "documentName": string
}

Maps

Chunk from Google Maps.

Fields
placeAnswerSources object (PlaceAnswerSources)

Sources used to generate the place answer. This includes review snippets and photos that were used to generate the answer, as well as uris to flag content.

uri string

URI reference of the chunk.

title string

title of the chunk.

text string

Text of the chunk.

placeId string

This Place's resource name, in places/{placeId} format. Can be used to look up the Place.

JSON representation
{
  "placeAnswerSources": {
    object (PlaceAnswerSources)
  },
  "uri": string,
  "title": string,
  "text": string,
  "placeId": string
}

PlaceAnswerSources

Sources used to generate the place answer.

Fields
reviewSnippets[] object (ReviewSnippet)

Snippets of reviews that are used to generate the answer.

flagContentUri string

A link where users can flag a problem with the generated answer.

JSON representation
{
  "reviewSnippets": [
    {
      object (ReviewSnippet)
    }
  ],
  "flagContentUri": string
}

ReviewSnippet

Encapsulates a review snippet.

Fields
review string

A reference representing this place review which may be used to look up this place review again.

authorAttribution object (AuthorAttribution)

This review's author.

relativePublishTimeDescription string

A string of formatted recent time, expressing the review time relative to the current time in a form appropriate for the language and country.

flagContentUri string

A link where users can flag a problem with the review.

googleMapsUri string

A link to show the review on Google Maps.

JSON representation
{
  "review": string,
  "authorAttribution": {
    object (AuthorAttribution)
  },
  "relativePublishTimeDescription": string,
  "flagContentUri": string,
  "googleMapsUri": string
}

AuthorAttribution

Author attribution for a photo or review.

Fields
displayName string

name of the author of the Photo or Review.

uri string

URI of the author of the Photo or Review.

photoUri string

Profile photo URI of the author of the Photo or Review.

JSON representation
{
  "displayName": string,
  "uri": string,
  "photoUri": string
}

GroundingSupport

Grounding support.

Fields
groundingChunkIndices[] integer

A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim.

confidenceScores[] number

confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. For Gemini 2.0 and before, this list must have the same size as the groundingChunkIndices. For Gemini 2.5 and after, this list will be empty and should be ignored.

segment object (Segment)

Segment of the content this support belongs to.

JSON representation
{
  "groundingChunkIndices": [
    integer
  ],
  "confidenceScores": [
    number
  ],
  "segment": {
    object (Segment)
  }
}

Segment

Segment of the content.

Fields
partIndex integer

Output only. The index of a Part object within its parent Content object.

startIndex integer

Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero.

endIndex integer

Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero.

text string

Output only. The text corresponding to the segment from the response.

JSON representation
{
  "partIndex": integer,
  "startIndex": integer,
  "endIndex": integer,
  "text": string
}

RetrievalMetadata

metadata related to retrieval in the grounding flow.

Fields
googleSearchDynamicRetrievalScore number

Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range [0, 1], where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search.

JSON representation
{
  "googleSearchDynamicRetrievalScore": number
}