Skip to main content
Web search lets LLMs access real-time information from the internet when generating responses. Instead of relying solely on training data, the model can search the web to ground its answers with up-to-date facts, links, and sources.

How It Works

Enable web search by adding web_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:
  1. Analyze the user’s query to determine if web search is needed.
  2. Search the web for relevant, current information.
  3. 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 where capabilities.supports_web_search is true:
The flag is set per model and does not name an endpoint, so 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.
You can also browse models visually in the Eden AI model catalog and filter by capability, including web search.
OpenAI models: on /v3/chat/completions, web search only runs on the dedicated search variants (e.g. openai/gpt-5-search-api, openai/gpt-5-search-api-2025-10-14). Other OpenAI models either reject web_search_options with a 400 error or accept the request without performing any search. To use web search with regular OpenAI models, call them through the Responses API instead.

Parameters

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_options on Chat Completions, or a web_search tool on Responses. An enable_search field in your request is ignored: Eden AI sets it.
  • Messages does not search on Qwen. A web_search server tool sent to a Qwen model on /v3/v1/messages runs no search.
  • Streaming only. Set stream to true. A search request without it is refused with 400.
  • Global only. Search runs on a Global-scope workspace, so it has no EU route. A call tagged @eu runs 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 models search the web through DeepSeek’s own search, on two endpoints. Responses searches on deepseek/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_search tool.
  • Messages (/v3/v1/messages): add Anthropic’s web_search server tool.
The model decides when to search. Web search on DeepSeek is not available on Chat Completions: a web_search_options field there does not make the model search. Request body for POST /v3/responses:
Each search appears in output as a web_search_call item, and action.queries lists the queries it ran. Request body for POST /v3/v1/messages:
Each search appears as a server_tool_use block, and usage.server_tool_use.web_search_requests counts them.

Limits

  • Responses searches on deepseek/deepseek-v4-pro only. On deepseek/deepseek-flash DeepSeek 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 eu tag, 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 501 on 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:
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
For questions about static knowledge (math, programming concepts, general reasoning), web search adds latency without much benefit. Only enable it when freshness matters.

Next Steps

Topic Extraction

Extract structured topics from text with Expert Models