How to enable domain filtering in Gemini search grounding?

Hi everyone,

I’m exploring Gemini’s grounding capabilities using Google Search, and I understand that Gemini builds its index via Vertex AI. Since Vertex AI Search supports domain-level filtering, I’m wondering how to apply similar filters within Gemini’s search grounding setup.

Specifically, I’d like to restrict results to certain domains (e.g., example.com) or exclude others. Is there a configuration option or API parameter that enables domain filtering in Gemini?

Any pointers or examples would be greatly appreciated. Thanks!

Hi @Tian_Zhh,

Welcome to the Google AI Forum! :confetti_ball: :confetti_ball:

The standard Google Search grounding feature in the Gemini API does not support direct domain-level filtering. However, you can achieve the desired outcome of restricting results to specific domains by leveraging Vertex AI Search as your grounding source.

Please refer to this documentation for more information: