This page describes Web Grounding for Enterprise compliance controls and how to use the Web Grounding for Enterprise API to generate responses that are grounded on the web. The indexed content is a subset of what's available on Google Search and suitable for customers in highly-regulated industries, such as finance, healthcare, and the public sector.
If you don't require the compliance controls, use Ground with Google Search, because it offers access to a broader web index.
Overview
Web Grounding for Enterprise uses a web index that is used to generate grounded responses. The web index supports the following:
- ML processing in the US or European multi-regions
- No logging of customer data
- VPC Service Controls
Because no customer data is persisted, customer-managed encryption keys (CMEK) and Access Transparency (AxT) aren't applicable.
Use the API
This section provides sample requests of using the Generative AI API Gemini 2 on Vertex AI to create grounded responses with Gemini. To use the API, you must set the following fields:
Contents.parts.text
: The text query users want to send to the API.tools.enterpriseWebSearch
: When this tool is provided, Web Grounding for Enterprise can be used by Gemini.
Gen AI SDK for Python
Install
pip install --upgrade google-genai
To learn more, see the SDK reference documentation.
Set environment variables to use the Gen AI SDK with Vertex AI:
# Replace the `GOOGLE_CLOUD_PROJECT` and `GOOGLE_CLOUD_LOCATION` values # with appropriate values for your project. export GOOGLE_CLOUD_PROJECT=GOOGLE_CLOUD_PROJECT export GOOGLE_CLOUD_LOCATION=global export GOOGLE_GENAI_USE_VERTEXAI=True
REST
Replace the following variables with values:
PROJECT_NUMBER
: Your project number.LOCATION
: Your region.TEXT
: Your prompt.
curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json" -H "x-server-timeout: 60" https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION/publishers/google/models/gemini-2.0-flash:generateContent -d '
{
"contents": [{
"role": "user",
"parts": [{
"text": TEXT
}]
}],
"tools": [{
"enterpriseWebSearch": {
}
}]
}
}
'
What's next
- To learn more about how to ground Gemini models to your data, see Ground to your data.
- To learn more about responsible AI best practices and Vertex AI's
safety filters, see Responsible AI.