---
schema_version: "1"
id: 4b29c2c656e89cd4aa583ef61278310fdde99c8b6b26a9198e095593ff2f83a7
title: Search the Web with Agentforce
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/agent_search_the_web.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.agent_search_the_web.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 38593d1bb11d18539d7d142869d505a1138fa30f5e6e8b41d04039ea68fdbbda
description: Use the Search the Web action to retrieve real-time information from the internet for your agents and prompt templates. Search the Web lets you ground agents with current data like news, market trends, and competitor details that aren't available in Salesforce.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Search the Web with Agentforce

Use the Search the Web action to retrieve real-time information from the internet for your agents and prompt templates. Search the Web lets you ground agents with current data like news, market trends, and competitor details that aren't available in Salesforce.

The Search the Web action retrieves current information from the internet for use in agents and prompt templates. Unlike data libraries, which require you to index content in advance, Search the Web retrieves information each time the action runs. It queries a search provider, retrieves relevant results, and summarizes them for use in the generated response. When the Search the Web action runs in a prompt template, the generated response includes citations to the web sources used.

Use Search the Web for information like:

- Breaking news and current events
- Market trends and industry developments
- Competitor information
- Product comparisons and reviews
- Public regulatory information

Search the Web complements Salesforce data instead of replacing it. For example, an agent can retrieve account information from Salesforce and combine it with current industry news from the web to generate more relevant responses.

## Search the Web vs. Data Libraries

While both Search the Web and data libraries enhance AI responses with additional context, they serve different purposes and work in different ways.

Use Search the Web when you need real-time information from the internet. Use data libraries when you need to ground responses in proprietary knowledge, product documentation, or internal content that isn't publicly available. For many use cases, you'll use both. For example, an agent helping a financial services customer might use a data library to retrieve internal product documentation and use web search to retrieve current market conditions or regulatory news.

  
| Feature | Search the Web | Data Libraries |
| --- | --- | --- |
| Data source | Public internet | Indexed internal content |
| When data is retrieved | Each time the action runs | Indexed in advance |
| Best for | Current, changing information | Stable organizational knowledge |
| Examples | News, competitor information, regulations | Knowledge articles, product docs, uploaded files |

## Use Search the Web

You can use the Search the Web action in both agents and prompt templates to retrieve current information from the internet.

To add Search the Web to your agent, you can:

- [Add the out-of-the-box General Web Search subagent from the asset library](https://help.salesforce.com/s/articleView?id=ai.agent_topics_add_asset.htm&release=264.0.0&type=5 "Add a standard subagent to your agent to start from an example built to handle a common business use case. Or add a custom subagent that you built yourself. When you add a subagent to your agent from the asset library, a copy of the subagent is added to your agent."). This subagent comes preconfigured with the Search the Web action and instructions optimized for web search queries.
- [Add the Search the Web action from the asset library to any existing subagent](https://help.salesforce.com/s/articleView?id=ai.agent_actions_add_asset_library.htm&release=264.0.0&type=5 "Add standard actions to your agent to start handling common business use cases quickly, or create custom actions tailored to your business needs. When you add these actions to an agent, the agent gets its own, independent copy. Changes to template actions within the asset library aren't automatically synced to subagents and actions within your agent. Changes made to one agent's actions don't affect another agent's subagents or actions."). You'll need to update the subagent's instructions to guide when and how the agent should use web search.

In agents, the action runs during conversations when the agent determines that web information is needed. See [Agentforce Platform | Search the Web](https://help.salesforce.com/s/articleView?id=ai.copilot_actions_ref_search_the_web.htm&release=264.0.0&type=5 "Retrieves real-time or external information that isn’t available in Salesforce CRM. Use it for questions about news, market trends, competitor details, and product comparisons, or when Salesforce answers need added context from the web."). In prompt templates, the action runs when the prompt template is executed, allowing generated responses to combine Salesforce record data with current web information. See [Add the Search the Web Action to a Prompt Template](https://help.salesforce.com/s/articleView?id=ai.copilot_add_search_the_web_to_prompt_template.htm&language=en_US&type=5).

## Search Providers

Search the Web supports multiple search providers. If you don't specify a provider, the action uses You.com by default.

 
| Search provider | Default rate limit |
| --- | --- |
| Shared across all providers (You.com, BrightData, and OpenAI) | 2,500 queries per hour per org (configurable through Salesforce Customer Support, up to a maximum of 10,000) |
| OpenAI | 500 requests per minute per org through the Large Language Model Gateway |

To change the search provider, see [Set the Search Provider for Search the Web Agent Action](https://help.salesforce.com/s/articleView?id=ai.copilot_set_search_provider_for_web_search_action.htm&release=264.0.0&type=5 "Improve the accuracy of web search responses by setting the search provider for the Search the Web agent action.").

## Control Search Results

Control which websites Search the Web uses by configuring allowed domains or excluded domains for each action. Configure either allowed domains or excluded domains for an action. Using both can significantly limit the available search results.

Allowed domains restrict searches to up to 10 trusted websites. Use allowed domains when you want responses only from specific, authoritative sources. For example, if you're building an agent that answers questions about federal regulations, you might restrict web search to government websites like fda.gov, sec.gov, and irs.gov. See [Customize Allowed Domains for the Search the Web Agent Action](https://help.salesforce.com/s/articleView?id=ai.copilot_customize_allowed_domains.htm&release=264.0.0&type=5 "Limit web search results to specified websites by defining allowed domains for the Search the Web agent action so your agents retrieve information from trusted sources.").

Excluded domains search the open web while excluding up to 10 websites. Use excluded domains when you want broad search coverage but need to avoid specific sites. For example, you might exclude competitor websites or user-generated content sites that don't meet your quality standards. See [Customize Excluded Domains for the Search the Web Agent Action](https://help.salesforce.com/s/articleView?id=ai.copilot_customize_excluded_domains.htm&release=264.0.0&type=5 "Limit web search results by excluding specific websites from the Search the Web agent action. Exclude the domains you don't want so your agents skip those sources and retrieve more relevant information.").

- **[Set the Search Provider for Search the Web Agent Action](https://help.salesforce.com/s/articleView?id=ai.copilot_set_search_provider_for_web_search_action.htm&release=264.0.0&type=5)**  
    Improve the accuracy of web search responses by setting the search provider for the Search the Web agent action.
- **[Customize Allowed Domains for the Search the Web Agent Action](https://help.salesforce.com/s/articleView?id=ai.copilot_customize_allowed_domains.htm&release=264.0.0&type=5)**  
    Limit web search results to specified websites by defining allowed domains for the Search the Web agent action so your agents retrieve information from trusted sources.
- **[Customize Excluded Domains for the Search the Web Agent Action](https://help.salesforce.com/s/articleView?id=ai.copilot_customize_excluded_domains.htm&release=264.0.0&type=5)**  
    Limit web search results by excluding specific websites from the Search the Web agent action. Exclude the domains you don't want so your agents skip those sources and retrieve more relevant information.
- **[Add the Search the Web Action to a Prompt Template](https://help.salesforce.com/s/articleView?id=ai.copilot_add_search_the_web_to_prompt_template.htm&release=264.0.0&type=5)**  
    Add the Search the Web data action to a prompt template so your prompt can include current information from the web, such as current events, industry trends, and product information.