Gemini API "automated queries" error

Hi,

I am using the Gemini API with web search (grounding) enabled and encountering the following error:

“We’re sorry… your computer or network may be sending automated queries.”

Details:

  • API: Gemini (via API key)
  • Environment: (Local machine / Windows / .NET C# application)
  • Use case: Backend processing (data extraction / automation)
  • Request pattern: Multiple sequential API calls (not scraping manually)
  • No API key or sensitive data is shared here

Observation:
The error seems to occur after multiple requests, possibly related to Google Search being triggered internally.

Questions:

  1. Is there a rate limit specific to web search grounding?
  2. Are there best practices to avoid triggering this automated query detection?
  3. Should web search be avoided for backend/batch use cases?

Any guidance would be appreciated.

Thanks.

I got the same error! I am calling gemini-3.1-flash-image-preview, and when the prompt is long, i got the error (below), but when the prompt is very simple, there is no error!

Sorry... body { font-family: verdana, arial, sans-serif; background-color: #fff; color: #000; }
Google
Sorry...

We're sorry...

... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.

See Google Help for more information.

Google Home

Solution here Gemini API Error Inquiry - #15 by SanterPD