How It Works
Enable web search by addingweb_search_options to your chat completion request. 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:
qwen/qwen3.8-omni-flash and deepseek/deepseek-v4-pro. See Qwen Web Search and DeepSeek Web Search.
Parameters
Qwen Web Search
qwen/qwen3.8-omni-flash searches 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. - 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 model whose pricing carries no per-search rate answers
501.
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/deepseek-v4-pro searches the web through DeepSeek’s own search, on two endpoints.
- 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. - 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, and 10 otherwise.
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