---
title: "Enabling Web Search for AI Agents | Hostman Docs"
description: "Learn how to enable web search for your AI agent, understand when it's triggered, and restrict search results to specific trusted domains."
---

> For the complete documentation index for AI agents, see [llms.txt](https://hostman.com/llms.txt).

You can [enable web search](https://hostman.com/docs/ai-agents/manage-agents/web-search/#configuring-web-search) so your agent can look up information online when it needs to.

This option costs $5.42 per 1,000 requests ($0.00542 per request).

## Why Use Web Search

Web search lets your agent reach out to the internet while processing a request, so it can pull in up-to-date information about current events, prices, and facts that may have changed. Without web search, the agent relies solely on the knowledge baked into the language model, which is only current up to its training cutoff.

Web search is especially useful for things like:

-   Recent news and events
-   Current prices, exchange rates, and market data
-   Information that changes over time, such as schedules, pricing plans, or company contact details
-   Verifying facts that may be outdated
-   Finding specific pages or sources related to a user's query

## When the Agent Uses Web Search

With web search enabled, the agent evaluates each incoming request and decides whether it needs to look anything up online:

-   If the model's existing knowledge is enough to answer the request, it skips the search.
-   If up-to-date information is needed for a good answer, the agent runs one or more search queries, retrieves the results, and uses them to shape its response.

> [!NOTE]
> This decision is made by the model itself—there's no way to force a search or block it for a specific request.

## Limiting the Search Scope

When [creating an agent](https://hostman.com/docs/ai-agents/manage-agents/web-search/#when-creating-an-agent), or later [in its settings](https://hostman.com/docs/ai-agents/manage-agents/web-search/#in-an-existing-agents-settings), you can restrict web search to specific domains. Instead of searching the entire internet, the agent will then only pull results from the sources you've specified.

This helps you get more accurate and relevant answers, rely only on trusted and verified sources, and filter out results from forums, aggregators, or random websites.

This is particularly useful in scenarios where the agent needs to work strictly with official data or a limited set of approved external resources.

## Configuring Web Search

You can manage web search settings both when creating an agent and afterward, from its settings.

### When Creating an Agent

On the **Pricing** step, leave the **Web search** option enabled, or turn it off if you don't need it. You can also [set up domain restrictions](https://hostman.com/docs/ai-agents/manage-agents/web-search/#limiting-the-search-scope) right away, or configure them later in the agent's settings.

![Web search settings](https://content.hostman.com/assets/2330ad68-df47-41b0-bde5-0da22da59aaf.png?width=749&height=741)

### In an Existing Agent's Settings

To configure web search for an existing agent:

1.  Go to **AI Services** → **Agents** and select the agent you want to configure.
    
2.  Open the **Management** tab.
    
3.  Click **Modify** in the **Web search** block.
    

![Web search settings](https://content.hostman.com/assets/859758a4-399c-4d41-bebd-bbeb69bd394b.png?width=1580&height=786)

4.  Turn the option on or off.
5.  If needed, [enable the domain restriction](https://hostman.com/docs/ai-agents/manage-agents/web-search/#limiting-the-search-scope) and specify the allowed domains.
    
6.  Save your changes.
    

![Web search settings](https://content.hostman.com/assets/8b6154e5-83f8-491f-a94e-277d20d3de43.png?width=1745&height=855)
