Where are the search queries in a grounded Gemini API response?

The Citead team, updated

In short. Read google_search_call arguments.queries in Interactions responses and groundingMetadata.webSearchQueries in GenerateContent responses.

Definition: In the Gemini Interactions API, search queries appear in a response step whose type is google_search_call. Read the strings in that step's arguments.queries array. Google documents this record separately from the result step and from the citations attached to model output.

Key facts

  • Google says the grounding flow can generate one or multiple search queries and execute them when Search is needed. Grounding with Google Search describes this as part of the model's search workflow.
  • A grounded Interactions response includes google_search_call and google_search_result steps. The first carries the queries, while the second carries search suggestions.
  • The API reference describes the response steps field as the output-only list of steps that make up an interaction, when included. The Interactions API reference defines google_search_call as a Google Search call step.
  • In the GenerateContent response format, the corresponding query field is groundingMetadata.webSearchQueries. The GenerateContent reference describes groundingMetadata as output-only metadata for a candidate.

Where do I read the query?

Inspect the interaction's steps array and select the step with type set to google_search_call. The query text is nested under arguments.queries. Google's API example shows one string in that array and an id on the call:

{
  "type": "google_search_call",
  "arguments": {
    "queries": [
      "Who won the men's 100m in Paris 2024?"
    ]
  },
  "id": "search_call_19201"
}

The Interactions API reference defines queries as an optional array of strings for the following-up web search. Treat each array item as one recorded query. The grounding guide says the model can generate one or multiple queries for a prompt, so code that reads only the first item can omit part of the record.

What do the other steps contain?

The search call and the search result are separate steps. Google's grounding example places a google_search_result step after the call. Its call_id identifies the call, and its result contains search_suggestions, an HTML snippet intended for rendering search suggestions in a user interface.

The answer itself is in a model_output step. The grounding documentation says the text content block can carry url_citation annotations. Each annotation has start_index and end_index, which identify the part of the answer associated with a source URL. Query inspection and source display therefore use different response fields: arguments.queries records the search text, while annotations identify cited answer spans.

Is the field the same in GenerateContent?

Google documents two response shapes relevant to this question. The Interactions API exposes an ordered steps array containing typed records, including google_search_call. GenerateContent exposes a candidate's output-only groundingMetadata object. Its schema includes webSearchQueries, groundingChunks, groundingSupports, and an optional searchEntryPoint.

For a GenerateContent response, look under the candidate's groundingMetadata.webSearchQueries. The same reference describes groundingChunks as supporting references retrieved from the specified grounding source. This gives the query list and supporting references separate places in that response shape.

How can I check a saved response?

For an Interactions response, the lookup can be represented as:

response.steps[*].type == "google_search_call"
response.steps[*].arguments.queries[*]

Keep the call id with the extracted queries. The API example uses the same identifier as the call_id on the following google_search_result step, which lets an inspection record connect the query step to its result step.

FAQ

Can one grounded response contain several search queries?

Yes. Google describes the search stage as generating one or multiple queries, and the queries field is an array of strings. Read the complete array for the call.

Does google_search_call contain the source URLs?

The documented call record contains the query arguments and a call identifier. Source URLs appear in url_citation annotations on the model's text content, where each annotation also identifies the cited text range.

Which field should I inspect in GenerateContent?

Inspect the candidate's groundingMetadata.webSearchQueries field. The Interactions response uses steps and a google_search_call record instead.

Sources

  1. Google AI for Developers, "Grounding with Google Search", 13 October 2026
  2. Google AI for Developers, "Gemini Interactions API", 15 October 2026
  3. Google AI for Developers, "Generating content", 13 October 2026

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark