Learning resourcesReviewed · Anthropic

Restrict web search and web fetch domains

This Anthropic guide explains web access controls for developers building Claude agents, but several layers of settings determine which sites are reachable. It covers domain lists for web_search and web_fetch, content limits, search localization and restrictions inherited by subagents. Its Managed Agents availability table labels support as beta.

Researched 23 Nov 2026

In short.

This Anthropic guide teaches developers to restrict Claude agents' web search and page fetching, but tool, organization and environment settings jointly determine access. It documents independent domain lists for each tool, matching rules, validation errors and restrictions across subagents. Its detail is useful for configuring agents that should consult known sources, although the Managed Agents availability table marks support as beta. Pricing and licensing are unknown from this page, and runtime enforcement was not assessed.

Researched and written by an AI model and checked by a second AI model. How it works

Covers the complete page at [https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions.md], including configuration examples, matching and validation rules, organization and environment interactions, multiagent behavior, session updates, Messages API differences and availability notices. Linked pages are excluded, including detailed agent setup, networking, pricing and service terms. All operational descriptions reflect documentation; no commands, examples or agent sessions were executed, and runtime behavior remains unassessed.

The overview

Identity

Restrict web search and web fetch domains is Anthropic documentation about controlling the sites accessible to Claude's web_search and web_fetch tools. The original source address is [https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions.md]. It is a configuration guide rather than a standalone application or an agent definition.

The page concentrates on Managed Agents and explains how its settings differ from the Messages API. It includes API, CLI, SDK and Console configuration examples, alongside domain rules, failure behavior and multiagent interactions.

Assessment

The guide is useful when an agent should research a defined set of websites or avoid particular hosts. Its strongest practical detail is the interaction between restrictions: an agent's tool settings can be narrowed further by organization settings, limited cloud networking and restrictions inherited from other agents.

It provides enough configuration and error detail to support implementation planning. It does not establish that permitted websites contain accurate information, that retrieved content is safe, or that these two tools' restrictions cover every network operation an agent might perform.

Users

The main audience is developers configuring Claude Managed Agents, especially research agents that need predictable source boundaries. Organization administrators also need the information because Console settings can disable a tool or further restrict its domains.

Beginners can follow the examples more easily with an understanding of API requests, domain names and agent tool configuration. Experienced developers will find the distinctions between tool domains, environment hosts, redirects and subagent inheritance particularly relevant. Complete introductory agent setup is outside this page.

Capabilities

Each web_search or web_fetch entry can have allowed_domains, which permits only listed hosts and their subdomains, or blocked_domains, which excludes listed hosts and their subdomains. The two tools have independent settings, so restricting search does not automatically give fetch the same boundary.

For web_fetch, max_content_tokens caps the fetched page content included in the model's context and must be a positive integer. For web_search, user_location localizes results; the example specifies an approximate US location and America/Los_Angeles timezone.

The Console exposes domain lists in the agent form's Built-in tools card. The page directs users to its Raw configuration view for max_content_tokens and user_location.

Using it

Requirements

The API example uses an Anthropic API key, the /v1/agents endpoint, anthropic-version 2026-10-21 and the managed-agents-2026-04-01 beta header. It creates an agent using claude-opus-5-5 and an agent_toolset_20260401 toolset. These are identifiers shown in the documentation; no minimum SDK package versions or complete account entitlement requirements are supplied.

Organization settings must permit the relevant tool. If an administrator disables search or fetch, its calls return error results while the session continues. In a cloud environment with limited networking, enabled web tools' allowed_domains must also fit within the environment's allowed_hosts when sessions are created or updated.

Mechanism

The web tools run on Anthropic's servers. Their per-tool lists operate alongside organization restrictions. A fetched URL and every redirect destination must pass the applicable organization and tool lists. Disallowed search results are omitted; a fetch excluded by its domain list returns an agent.tool_result with is_error set to true and the error code url_not_allowed.

A tool domain matches its named host and all subdomains, without regard to case. For example, example.com covers docs.example.com, while www.example.com does not cover example.com. Limited cloud networking uses different matching: allowed_hosts entries match exact hosts unless they begin with *. . Unrestricted networking and self-hosted environments do not impose that environment restriction on these server-side web tools.

In multiagent sessions, every applicable allowed_domains list must cover a host, while blocked_domains lists accumulate. Restrictions come from the listed agent, its callers and the current session agent. max_content_tokens and user_location instead use the thread's own value, then its caller's value, then the session agent's value. A self subagent entry follows the current session agent's settings.

Setup

Configure web_search and web_fetch inside the agent toolset's configs entries. Each entry accepts at most one domain list containing 1 to 64 distinct entries, each 1 to 255 characters. Omit the field or supply null when no per-tool restriction is intended; an empty list is invalid.

Use ASCII hostnames without schemes, ports, credentials or wildcards. IP addresses, bare registry suffixes, single-label names and specified local or internal hostnames are rejected. Internationalized names require Punycode. A single trailing slash is ignored. Fetch domains cannot contain paths; search domains can, but the page recommends plain hostnames because search paths are provider URL patterns rather than strict host rules.

The page supplies cURL, CLI, Python, TypeScript, C#, Go, Java, PHP and Ruby examples. The CLI example uses ant apply agent.md. Installation procedures and SDK version compatibility are not established by this page.

Example

The documented Research Agent allows web_search on docs.example.com and arxiv.org, sets search location to the US with timezone America/Los_Angeles, and blocks ads.example.com for web_fetch. Fetch also receives max_content_tokens of 50000.

Under those tool settings alone, search is limited to the two named domains and their subdomains. Fetch excludes ads.example.com and its subdomains but is not limited to the search domains. Organization and environment restrictions can narrow access further. This describes the example's documented configuration; it was not executed.

Assessment & evidence

Limitations

Provider restrictions can reject an otherwise well-formed allowed domain if Anthropic's crawler cannot access it. Unsupported localization countries and invalid IANA timezone names are also rejected. These dependencies mean syntactically valid configuration is not sufficient to establish availability.

If a setting becomes invalid before the tool first initializes, the session emits session.error and returns to idle without retrying. If inherited allowed_domains lists have no permitted host in common, the tool remains visible but every call fails with url_not_allowed and a message including no domain is permitted.

The Managed Agents toolset does not expose max_uses, citations or cache_control. The grader in outcome-driven sessions has neither web_search nor web_fetch, regardless of domain settings. No enforcement audit, reliability measurements or end-to-end results accompany the guide.

Reasoning

For an agent intended to consult a known set of sources, allowed_domains is the natural configuration choice because it explicitly defines permitted hosts. For broad web access with particular exclusions, blocked_domains expresses that requirement. These recommendations follow the documented matching semantics.

Choosing the domain level matters: a bare domain authorizes its subdomains too, so it can allow a broader set of hosts than a developer intends. A separate review of environment and inherited settings is needed to understand the effective boundary. None of these settings demonstrates the quality of permitted content.

Alternatives

The page describes Messages API domain filtering as an alternative for configuring restrictions directly on tools in an individual request. Managed Agents differs through its 64-domain cap, ASCII-only entries, prohibition on fetch-domain paths and absence of max_uses, citations and cache_control on its toolset.

The Console is another configuration route for the same Managed Agents feature. Limited environment networking supplies an additional host restriction rather than replacing per-tool lists. Other providers and third-party filtering tools are not compared in the supplied evidence.

Evidence

The evidence is the complete original documentation page supplied as selected-page.txt, acquired from [https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions.md]. Its recorded source revision is sha256:a708d4324bb6ee0e38ef9f1da53da7ba57027898d0ae1348264ffa0515ad7970.

The page supports descriptions of configuration syntax, expected matching behavior and documented errors. It contains illustrative code but no execution logs or independent verification. Nothing was executed; actual enforcement, SDK compatibility, latency and search coverage remain unassessed.

Access & freshness

Costs

The page supplies no model prices, search or fetch charges, platform fees, free allowance or worked cost example. Total operating cost is unknown.

max_content_tokens limits fetched content included in context. The page does not establish a spending cap or quantify any savings from using it.

Rights

The supplied page contains no explicit license or redistribution permission for its prose or code examples. Permission to redistribute those materials is unknown from this evidence.

Domain access settings also do not establish reuse rights for content fetched from other websites. Terms governing that content and the underlying service are not assessed here.

Freshness

The supplied page was captured at 2026-11-23T09:03:11.658Z. No publication or last-updated date is provided. The API-version date and beta-header identifier identify settings used by the examples, not a confirmed publication date.

The availability block labels Managed Agents Available, while its platform table labels support Beta across all supported platforms and lists the managed-agents-2026-04-01 beta header. This mixed labeling leaves general-release status unclear; the beta requirement remains part of the documented setup. Changes after capture are unknown.

Actions

Define the intended website boundary separately for search and fetch, choose one list type per tool, and account for subdomains. Check organization settings and reconcile allowed_domains with a limited environment's allowed_hosts before creating a session. Plan handling for both omitted search results and fetch error results.

For multiagent configurations, ensure every intended host survives the inherited allowed lists and blocked lists. Change session tools while the session is idle; each thread applies the new session lists from its next turn. Listed subagents retain their own lists from session creation.

If initialization fails because a setting has become invalid, the documented recovery is to correct the session's tools, update the agent for future sessions and send a new user.message. Practical next steps include confirming pricing, applicable terms and required SDK versions, then exercising permitted, blocked, redirected and subagent cases in the intended environment.

Evidence for this report

selected-page.txtselected · checked 2026-11-23