Anthropic API Adds Web Search Capability, Enabling Advanced Real-Time Information Access for Claude

Anthropic has added web search functionality to its API. With this update, developers can now build Claude-based applications and AI agents that can access the latest web information.

Web Search-Enhanced Claude AI Agent

On May 8, 2025, Anthropic officially launched web search functionality for the API. Now developers can enable the web search tool when making Messages API requests to supplement Claude's knowledge base with current real-time data.

Claude assesses whether a web search tool could help provide more accurate answers when it receives requests requiring up-to-date information or specialized knowledge, using its own reasoning abilities to make this determination.

Web search can be useful, and when it is, Claude generates targeted search queries, finds relevant results, analyzes key information, and provides comprehensive answers with cited sources.

Additionally, Claude can function as an agent, performing multiple consecutive searches. By using previous results to formulate follow-up queries, it conducts simple research and generates more comprehensive answers. Developers can control this by adjusting the max_uses parameter. Internally, Claude may also refine queries to provide more accurate responses.

With the addition of this web search feature, developers can now build AI solutions that utilize the latest information without having to directly manage web search infrastructure.

Various Use Cases Across Industries

Web search functionality enables Claude to support various use cases across different industries by utilizing real-time data and specialized knowledge:

In the financial services sector, you can build AI agents that analyze real-time stock prices, market trends, and regulatory updates. In the legal research area, you could develop tools that access recent court decisions, regulatory changes, and legal news.

Developers can implement developer tools that help Claude reference the latest API documentation, GitHub releases, and technical updates. Companies can now also build agents that integrate the latest company reports, competitive information, or industry research to improve productivity.

Enhanced Reliability and Control Functions

All responses retrieved from the web include citations to source materials so users can verify the information directly. This appears to be particularly useful for sensitive use cases that require accuracy and accountability.

You can specify a domain to search for information so that results only appear within that domain. Conversely, it is also possible to block access to certain domains.

Adding Web Search to Claude Code

Web search functionality is now available in Claude Code as well, adding the latest information from the web to your development workflow.

When web search is enabled, Claude Code can access current API documentation, technical articles, and other information about development tools and libraries. This is especially valuable when using new or rapidly evolving frameworks, resolving ambiguous errors, or implementing features that require version-specific API references.

Web search functionality is available with Claude 3.7 Sonnet, upgraded Claude 3.5 Sonnet, and Claude 3.5 Haiku on the Anthropic API, and is billed at $10 per 1,000 searches plus standard token costs.

For more details, please refer to the Anthropic website.