Web search

by OpperSearchdocs.opper.ai

Add one tool entry and any model searches the web during its answer, with citations in the shape your endpoint already speaks. Models with their own search use it on their maker's endpoint, and every other tool-calling model gets Opper's engine. Pin Jina or Searchbase and the query and every page it reads stay in the EU. Each search shows up in your traces with its cost.

UseWeb searchwithin

Add web search on Opper

Set up with agents

Paste this into your coding agent (Claude Code, Cursor, Codex, and more) and it will set up and build with Opper for you.

Get your API key

In your code

curl https://api.opper.ai/v3/compat/chat/completions \
-H "Authorization: Bearer $OPPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "berget/kimi-k3",
"messages": [{"role": "user", "content": "What changed in the EU AI Act this week?"}],
"tools": [{"type": "opper:web_search", "engine": "jina", "freshness": "w"}]}'

Where searches run

auto uses the model's own search when the route has one and you call it on its maker's endpoint (Messages for Claude, Responses for OpenAI, generateContent for Gemini), and falls back to Jina everywhere else. Pin an engine when your searches have to stay in one region. Prices per search are on the docs page.

EngineRegionCitationsPin it with
EUPer answer block"engine": "jina"
EUPer answer block"engine": "searchbase"
USPer answer block"engine": "exa"
GlobalPer answer block"engine": "linkup"
ProviderPer sentence"engine": "native"
ProviderPer sentence"engine": "native"
ProviderPer sentence"engine": "native"
ProviderPer sentence"engine": "native"
ProviderPer sentence"engine": "native"

Add web search to these models

Step-by-step setup for adding web search to each of these models through Opper.

FAQ

Web search FAQ

Do I need a separate search API if my model already has web search?

+
No. With the engine set to auto, Opper uses the model's own search when the route has one and you call it on its maker's endpoint (Messages for Claude, Responses for OpenAI, generateContent for Gemini), and Opper's engine everywhere else, so one tool entry works on every model. Pin an engine when you want the same backend everywhere.

Where does the search run, and does anything leave the EU?

+
Jina and Searchbase keep search processing in the EU. Exa is US-based, Linkup runs in the US, EU, Canada and APAC, and a model's own search runs on its provider's infrastructure. Pin "engine": "jina" or "searchbase" and call an EU-hosted route, and the model, the query and every page it reads stay in Europe.

How is a search billed, and where do I see it?

+
Each search is billed per call on top of the model's tokens and itemised in the response under usage.opper.cost.tools.web_search. Every search also shows up as a step in your traces. Current prices per engine are on the docs page.

Can I limit results to certain domains or recent pages?

+
Yes. Pass allowed_domains or excluded_domains to restrict sources, freshness (d, w, m or y) to keep results recent, country to bias results to a region, and max_uses to cap how many searches the model runs in one request.

More tools on Opper

Add web search to any model

One key, 700+ models, a choice of region, and zero data retention. Tools run in the same request, with every call in your traces.

Get startedView Documentation