How can Claude filter search results before loading them into context?

The Citead team, updated

In short. Claude uses dynamic filtering in web search version 20260209 and later to filter results before they reach the context window.

Definition: Dynamic filtering is the Claude web search behavior in web_search_20260209 and later that uses code to filter search results before relevant content reaches Claude's context window. Anthropic documents the feature for Claude 4.6 and later models and Claude Mythos Preview.

Key facts

  • Anthropic's web search tool documentation lists web_search_20250305 for basic search, web_search_20260209 for dynamic filtering and web_search_20260318 for response inclusion control.
  • Dynamic filtering runs code over search results before they reach the context window, which Anthropic says reduces token use on search-heavy requests.
  • The feature is available with Claude 4.6 and later models and Claude Mythos Preview.
  • Anthropic's tool reference says older tool versions remain available when a new version changes behavior, schema or model support.
  • Anthropic's server-tools documentation says dynamic filtering relies on code execution internally and is not ZDR-eligible by default.

What changes in the versioned web search tool?

The version suffix identifies a capability set. web_search_20250305 provides basic web search. web_search_20260209 adds dynamic filtering. web_search_20260318 adds response_inclusion, which controls whether consumed search result blocks remain in the API response. Anthropic describes tool versions as active choices: older versions remain available when a new version changes behavior, schema or model support.

For a request that needs dynamic filtering, the tool type is the relevant configuration point:

{
  "type": "web_search_20260209",
  "name": "web_search"
}

The web search documentation also states that dynamic filtering is available with Claude 4.6 and later models and Claude Mythos Preview. The version name alone therefore does not describe model support.

How does Claude filter results before context loading?

With basic web search, every search result is loaded into Claude's context window, and some of that content can be irrelevant to the request. With web_search_20260209 and later, Claude writes and runs code that filters results first, so only relevant content reaches the context window. Anthropic describes this as a way to reduce token use on search-heavy requests.

On these versions, allowed_callers defaults to ["code_execution_20260120"]. The API provisions the needed code execution automatically, so the request does not need a separate code execution tool. Anthropic states that code execution calls made through this dynamic-filtering path incur no additional charges beyond standard token costs.

Setting allowed_callers to ['direct'] selects direct web search without dynamic filtering:

{
  "type": "web_search_20260209",
  "name": "web_search",
  "allowed_callers": ["direct"]
}

The server-tools documentation describes this setting as bypassing the internal code execution step. Models without programmatic tool calling require the direct setting, or the API returns a 400 error.

Where is dynamic filtering available?

Anthropic documents web search with and without dynamic filtering for the Claude API, Claude Platform on AWS and Microsoft Foundry. Microsoft Foundry deployments hosted on Azure support only web_search_20250305, without dynamic filtering. Deployments hosted on Anthropic support all web search versions. On Google Cloud, only basic web search is available, and Anthropic documents web search as unavailable on Amazon Bedrock.

The same documentation gives a separate support statement for Claude Mythos Preview: web search is supported on the Claude API, Google Cloud and Microsoft Foundry, while Mythos Preview web search is unavailable on Amazon Bedrock and Claude Platform on AWS. These platform statements are separate from the model requirement for dynamic filtering.

FAQ

Which web search version should I configure for dynamic filtering?

Use web_search_20260209 or a later version when the supported model and platform meet Anthropic's requirements. Use web_search_20260318 when the request also needs response_inclusion control.

Does allowed_callers: ["direct"] keep dynamic filtering enabled?

No. Anthropic documents the direct setting as a way to call web search without dynamic filtering by bypassing the internal code execution step.

Is dynamic filtering available on every Claude platform?

No. Anthropic documents basic-only web search on Google Cloud and on Azure-hosted Microsoft Foundry deployments. The Claude API and Anthropic-hosted deployments support the documented dynamic-filtering versions.

Sources

  1. Anthropic, "Web search tool", undated
  2. Anthropic, "Tool reference", undated
  3. Anthropic, "Server tools", undated

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark