- Web Search uses Grounding with Bing Search and Grounding with Bing Custom Search, which are First Party Consumption Services governed by these Grounding with Bing terms of use and the Microsoft Privacy Statement.
- The Microsoft Data Protection Addendum doesn’t apply to data sent to Grounding with Bing Search and Grounding with Bing Custom Search. When you use Grounding with Bing Search and Grounding with Bing Custom Search, data transfers occur outside compliance and geographic boundaries.
- Use of Grounding with Bing Search and Grounding with Bing Custom Search incurs costs. See pricing for details.
- See the management section for information about how Azure admins can manage access to use of web search.
Usage support
The following table shows SDK and setup support.Prerequisites
- A basic or standard agent environment
- The latest SDK package. The .NET SDK is currently in preview. See the quickstart for details.
- Azure credentials configured for authentication (such as
DefaultAzureCredential). - Your Foundry project endpoint URL and a model deployment name.
Code examples
See best practices for information on optimizing tool usage.
Configure the web search tool
You can configure web search behavior when you create your agent.Optional parameters for general web search
user_location: Helps web search return results relevant to a user’s geography. Use an approximate location when you want results localized to a country/region/city.search_context_size: Controls how much context window space to use for the search. Supported values arelow,medium, andhigh. The default ismedium.
Security and privacy considerations
- Treat web search results as untrusted input. Validate and sanitize data before you use it in downstream systems.
- Avoid sending secrets or sensitive personal data in prompts that might be forwarded to external services.
- Review the terms, privacy, and data boundary notes in the preview section of this article before enabling web search in production.
Known limitations
For information about web search behavior and limitations in the Responses API, see Web search with the Responses API.Troubleshooting
Administrator control for the web search tool
You can enable or disable the web search tool in Foundry Agent Service at the subscription level by using Azure CLI. This setting applies to all accounts within the specified subscription.Prerequisites
Before running the following commands, make sure that you:- Have Azure CLI installed.
- Are signed in to Azure by using
az login. - Have Owner or Contributor access to the subscription.