All server tools

Web search

openrouter:web_search

Lets any model search the web mid-request. The model decides when to search and what to query, OpenRouter runs the search on the configured engine and returns titles, URLs, and snippets, and the model synthesizes them into its answer with citations.

How it works

For questions that need current information, like this week’s news or today’s prices.

  1. Your model decides a search would help and writes the query.

  2. OpenRouter runs it on the configured engine and returns titles, URLs, and snippets.

  3. Your model answers with citations, and can search again in the same request.

Providers and pricing

The default engine, auto, uses the model provider’s native search on endpoints that advertise it and falls back to Exa otherwise. Set engine explicitly to pin a provider.

  • Favicon for https://exa.ai

    Exa

    $0.007 / request

    instant, fast, auto (default) modes

    Search with relevant page highlights.

  • Favicon for https://parallel.ai

    Parallel

    $0.005 / request

    basic (default), advanced modes

    Web search with fast and advanced modes.

  • Favicon for https://perplexity.ai

    Perplexity Search

    $0.005 / request

    Ranked web results with domain filtering.

  • Favicon for https://firecrawl.dev

    Firecrawl

    $0.005 / request

    Search using Firecrawl.

  • Favicon for https://openai.com

    OpenAI

    Native

    Built-in web search on GPT-4.1, GPT-5 and later, o3, and o4-mini.

    Via OpenAI, Azure

  • Favicon for https://anthropic.com

    Anthropic

    Native

    Built-in web search on Claude 3.5 Haiku, Claude 3.7 Sonnet, and Claude 4 and later.

    Via Anthropic, Claude Platform on AWS, Amazon Bedrock, Google Vertex

  • Favicon for https://ai.google.dev

    Google

    Native

    Search grounding on Gemini 3 and later.

    Via Google AI Studio, Google Vertex

  • Favicon for https://x.ai

    xAI

    Native

    Built-in web search and X search on Grok 4 and later.

    Via xAI

Standard model token costs apply to every request.

Using this tool

OpenRouter runs the tool during the request and returns the result to the model, so no client-side tool loop is needed.

Supported APIs: Chat Completions, Responses, and Anthropic Messages.

Shell
curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "openai/gpt-5.2",
  "tools": [
    {
      "type": "openrouter:web_search"
    }
  ],
  "messages": [
    {
      "role": "user",
      "content": "What were the major AI announcements this week?"
    }
  ]
}'

Setup, parameters, and examples in the docs.

Read the integration guide

Benchmarks

  • BrowseComp

    Hard-to-locate facts on the live web, scored on persistent multi-step research.

  • DeepSearchQA

    Questions whose answers are lists, scored for exhaustive retrieval with no padding.

  • HLE

    Humanity's Last Exam as a search benchmark: expert questions answered with live search.

  • WideSearch

    Fill an entire table; answer-item accuracy scores partial matches.

Frequently asked questions