[ ABORT TO HUD ]
SEQ. 1

Native Search Integration

🔍 Web Search Tool20 min600 BASE XP⌨ HANDS-ON LAB

Real-Time Information Access

Anthropic's native Web Search Tool (web_search_20260209) gives Claude the ability to search the internet during a conversation. Unlike MCP-based search integrations, this is a first-party, built-in tool that Claude can invoke autonomously when it determines real-time information is needed.

How It Works

  1. Detection: Claude identifies that the question requires current information beyond its training data.
  2. Search: The model generates optimized search queries and executes them against the web.
  3. Dynamic Filtering: Claude can write and execute code to post-process search results, discarding irrelevant content before loading it into context.
  4. Synthesis: Results are synthesized into a coherent response with automatic source citations.

API Configuration

// Enabling web search
const response = await anthropic.messages.create({
  model: "claude-sonnet-4-6",
  max_tokens: 4096,
  tools: [{
    type: "web_search_20260209",
    name: "web_search",
    max_uses: 5,               // Limit searches per request
    allowed_domains: ["docs.anthropic.com", "github.com"],
    blocked_domains: ["reddit.com"]
  }],
  messages: [{ role: "user", content: "What are the latest MCP spec changes?" }]
});

Domain Controls

For enterprise applications, you can restrict where Claude searches using allowed_domains (whitelist) and blocked_domains (blacklist). This ensures responses are grounded in trusted, approved sources only.

💰 Pricing: Web search costs $10 per 1,000 searches, plus standard token costs for processing the retrieved content. Use max_uses to control costs in production.
⌨ HANDS-ON LABGive Claude Live Web Access
⭐ +200 XP

Your model's knowledge has a cutoff — the news doesn't. Enable the server-side web_search tool with curl, then lock it down to a single trusted domain.

1Call /v1/messages with the web_search tool in the tools array (type web_search_20250305, capped at 3 searches).
2Re-run the request restricted to a single trusted domain with allowed_domains.
lab-sandbox — simulated environment
INFINITY LAB SANDBOX v2.6 — simulated shell
Type the command for the current objective. Helpers: "hint", "solution", "clear".
$
OBJECTIVE 1 / 2 — type "hint" if stuck
SYNAPSE VERIFICATION
QUERY 1 // 3
What is the built-in web search tool identifier?
brave_search
web_search_20260209
google_search
bing_api
Native Search Integration Tutorial | Web Search Tool — Claude Academy