How It Works
Enable web search by addingweb_search_options to your chat completion request. DeepSeek is the exception: on Chat Completions its models never search, and web_search_options does not make them search. See DeepSeek Web Search for the endpoints that search. When enabled, the model will:
- Analyze the user’s query to determine if web search is needed.
- Search the web for relevant, current information.
- Generate a response grounded in the search results, often including source citations.
Basic Example
Supported Models
Not all models support web search. Use the List LLM Models endpoint to find models wherecapabilities.supports_web_search is true:
true does not mean every endpoint searches. On Qwen and DeepSeek, the models whose flag is true are qwen/qwen3.8-omni-flash, qwen/deepseek-v4.1-flash-1017 and deepseek/deepseek-v4-pro. deepseek/deepseek-v4-pro searches on Responses and Messages, never on Chat Completions. On Messages, Eden AI sends the search tool to every DeepSeek model, including those whose flag reads false. See Qwen Web Search and DeepSeek Web Search.
Parameters
Qwen Web Search
qwen/qwen3.8-omni-flash and qwen/deepseek-v4.1-flash-1017 search the web through Alibaba’s own search. On other Qwen models the request runs without search.
- Turn it on with
web_search_optionson Chat Completions, or aweb_searchtool on Responses. Anenable_searchfield in your request is ignored: Eden AI sets it. - Messages does not search on Qwen. A
web_searchserver tool sent to a Qwen model on/v3/v1/messagesruns no search. - Streaming only. Set
streamtotrue. A search request without it is refused with400. - Global only. Search runs on a Global-scope workspace, so it has no EU route. A call tagged
@euruns on the EU workspace and does not search. See EU data residency. - No search rate, no search. A search request on a model whose pricing carries no per-search rate answers
501. The same model without a search request runs as usual.
Python
Billing
A call is billed for its tokens plus the searches Alibaba reports, at the model’s per-search rate (web_search_cost_per_call).
DeepSeek Web Search
DeepSeek models search the web through DeepSeek’s own search, on two endpoints. Responses searches ondeepseek/deepseek-v4-pro only. Messages sends the search tool to whichever DeepSeek model you name, and bills the searches DeepSeek reports.
- Responses: add a
web_searchtool. - Messages (
/v3/v1/messages): add Anthropic’sweb_searchserver tool.
web_search_options field there does not make the model search.
Request body for POST /v3/responses:
output as a web_search_call item, and action.queries lists the queries it ran.
Request body for POST /v3/v1/messages:
server_tool_use block, and usage.server_tool_use.web_search_requests counts them.
Limits
- Responses searches on
deepseek/deepseek-v4-proonly. Ondeepseek/deepseek-flashDeepSeek ignores the tool and the request runs without search. Messages has no such restriction on the model. - Chat Completions does not search. DeepSeek’s chat endpoint has no search parameter.
- Data is processed in China. DeepSeek processes and stores requests in the People’s Republic of China, and DeepSeek search carries no
eutag, so it has no EU route. See EU data residency. - No search rate, no search. A model whose pricing carries no per-search rate answers
501on Responses, and on Messages when the request carries a server search or fetch tool.
Billing
A call is billed for its tokens plus its searches, at the model’s per-search rate (web_search_cost_per_call in its pricing, listed by GET /v3/models), one query at a time. On Responses, each page the model opens counts as one query. The text it reads is counted in its input tokens.
Every query the call ran is billed, including one that returns no results. Before the call, your balance is held for the searches as well as the tokens. Responses holds 10 searches. Messages holds the sum of the
max_uses you set when every search tool states one. When any search tool states none, it holds that sum or 10 searches, whichever is larger.
With System Messages
Combine web search with system messages to control how the model uses search results:When to Use Web Search
Web search is useful when the user’s question involves:- Current events — news, stock prices, weather, sports scores
- Recent releases — software versions, product launches, research papers
- Factual lookups — statistics, regulations, schedules that change over time
- Verification — checking claims against live sources
Next Steps
Topic Extraction
Extract structured topics from text with Expert Models