Hi everyone,
I’m encountering an issue with using the Google Maps grounding tool in the Gemini API. My production service calls the Gemini API with Google Maps grounding, and for about a week now the API requests have stopped returning any information. Until yesterday information was returned in about 50% of cases and retries helped, but today nothing is returned 100% of the time.
I have a POC script:
import json
from google import genai
from google.genai import types
api_key = "MY_KEY"
model_name = "gemini-2.5-pro"
query = "best breakfast in new york"
client = genai.Client(api_key=api_key)
# Test: WITH Google Maps
print("=== WITH Google Maps ===")
config2 = types.GenerateContentConfig(
tools=[
types.Tool(google_maps=types.GoogleMaps()),
],
system_instruction="Find 1 place for the query. Return place name and link in google maps.",
)
response2 = client.models.generate_content(model=model_name, contents=query, config=config2)
print(f"Response text: {response2.text or '[EMPTY]'}")
print(f"Parts: {response2.candidates[0].content.parts if response2.candidates else None}")
if response2.candidates and response2.candidates[0].grounding_metadata:
print(f"Grounding metadata: {json.dumps(response2.candidates[0].grounding_metadata.model_dump(), indent=2, default=str)}")
Output:
=== WITH Google Maps ===
Response text: [EMPTY]
Parts: None
Grounding metadata: {
"google_maps_widget_context_token": null,
"grounding_chunks": null,
"grounding_supports": null,
"retrieval_metadata": null,
"retrieval_queries": null,
"search_entry_point": null,
"source_flagging_uris": null,
"web_search_queries": [
"best breakfast in new york"
]
}
Does anyone know what might be causing this issue and how to fix it?