How It Works
Requesty supports two types of web search:- Anthropic Web Search: Using the
web_search_preview
tool for Claude models - Google Grounding Search: Using the
web_search
function for Gemini models
Anthropic Web Search
Add theweb_search_preview
tool to enable web search for Claude models:
Python Example
JavaScript/TypeScript Example
Google Grounding Search
For Gemini models, use theweb_search
function to enable Google’s grounding search:
Python Example
JavaScript/TypeScript Example
Response Format
When web search is used, the response includes the AI’s answer along with citations and metadata about the search:Web search functionality requires models that support tool use. Check the Model Library to confirm web search support for specific models.