Web Search

Pattern
Claude Web Search Tool
Search the web with Claude AI. Includes result filtering, multiple search types, and language support.
IntermediateNov 2025View the full pattern on desktop


Problems solved
- Search the web with Claude's built-in webSearch tool
- Stream citation-backed answers with sendSources
- Use Anthropic provider-native tools inside streamText
Use cases
- Research assistants on Claude
- Fact-checking chats with source links
- News monitoring agents
- Competitive intelligence lookups
AI SDK APIs
streamTexttools:convertToModelMessagestool(generateTextcreateUIMessageStreamResponseuseChat
Tags
aiwebsearchclaudesearch-toolresearchfact-checkinginformation-discoveryzod-validationtype-safe
Requirements
- Node.js
- 24+
- Memory
- 512MB
- Other
- Claude API key
Environment variables
CLAUDE_API_KEYGet key
External services
claude
Ready to use?
View the full interactive pattern with live preview and copy the source code.
View the pattern on desktop






