Skip to main content
Requesty supports native web search across major providers. Pass a single tool definition and Requesty translates it to the right provider format automatically.
Native web search providers: Vertex AI (Google), Azure OpenAI, OpenAI, Anthropic, xAI, Perplexity
Browse models with web search in the Requesty Console. Look for supports_web_search: true in the List Models response.

How It Works

Each provider implements web search differently. Requesty normalizes these differences behind a single tool definition that works across all three inference endpoints:
EndpointFormatTool definition
/v1/chat/completionsOpenAI Chat Completions"tools": [{ "type": "web_search" }]
/v1/responsesOpenAI Responses API"tools": [{ "type": "web_search" }]
/v1/messagesAnthropic Messages"tools": [{ "type": "web_search_20250305", "name": "web_search", "max_uses": 5 }]
We recommend using streaming ("stream": true) for all web search requests. Streaming delivers citations and content in real time, and avoids the extra latency of waiting for the full search to finish.

Usage

POST /v1/chat/completions - Add { "type": "web_search" } to the tools array.
curl https://router.requesty.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_REQUESTY_API_KEY" \
  -d '{
    "model": "anthropic/claude-sonnet-4-20250514",
    "messages": [
      { "role": "user", "content": "What are the latest news in London today?" }
    ],
    "tools": [{ "type": "web_search" }],
    "stream": true
  }'
Just change the model to switch providers:
# Vertex / Gemini
model="vertex/google/gemini-2.5-pro"

# xAI / Grok
model="xai/grok-3"

# Perplexity
model="perplexity/sonar-pro"
Response includes web_search metadata on streamed chunks with citation URLs and titles:
{
  "choices": [{
    "delta": {
      "content": "Based on the search results...",
      "web_search": {
        "content": [
          { "url": "https://example.com/news", "title": "London News" }
        ]
      }
    }
  }]
}
Web search requires models with tool use support. Check the Model Library to confirm web search support for specific models.
Last modified on June 8, 2026