The training data for large language models has a knowledge cutoff date, preventing them from answering real-time questions. Enabling web search lets the model retrieve real-time data and accurately answer time-sensitive questions, such as stock prices, weather forecasts, and breaking news.
Usage
You can enable web search using the four API calls below, each requiring different parameters.
For web search with models such as qwen3.7-max, use the web search feature of the Responses API.
- OpenAI-compatible: Responses API
- OpenAI-compatible: Chat Completions API
- DashScope
- Anthropic-compatible
Add the
web_search tool to the tools parameter to enable web search.The Responses API supports only some models. For the supported models, see Web search with Responses API.
Web search with multimodal models
The Qwen3.8 Max, Flash, and open-source series, Qwen3.7-Flash, Qwen3.7-Plus, the Qwen3.6 series, and the Qwen3.5 series (including qwen3.5-plus, qwen3.5-flash, the qwen3.5-omni series, and Qwen open-source models) accept multimodal input (images, video) and are multimodal models.
Search strategy support varies by series: the qwen3.5-omni series supports only the agent strategy; qwen3.8-max, qwen3.8-max-0902, qwen3.8-flash, qwen3.8-2.4t-a95b, and qwen3.8-27b do not support the agent strategy on the multimodal API (use the default turbo or max)—to run Qwen3.8 with agent-style retrieval, use Web search with the Responses API; other models listed in this section support the turbo, max, and agent strategies. Call these models through the multimodal API (the multimodal-generation endpoint): use MultiModalConversation in both Python and Java, not Generation (the text-generation endpoint), which is for text-only models. For the basics of calling multimodal models, see the Visual reasoning and Image and video understanding topics.
Calling the multimodal models above withGeneration(thetext-generationendpoint) returns400 url error, please check url. UseMultiModalConversation(themultimodal-generationendpoint) instead.In the Java SDK,MultiModalConversationParamprovidesenableSearch(true)to enable web search, but does not provide asearchOptions()method. Inject the search strategy and other options through the genericparameter("search_options", ...)method. In Python,MultiModalConversation.callacceptssearch_optionsdirectly.Web search on multimodal models requires streaming calls (usestreamCallin Java, or setstream=Truein Python); otherwise the request returns aNon-streaming mode does not support Web Searcherror.
Python
Supported models
The following models support web search. Models with multimodal input (the Qwen3.8 series, Qwen3.7-Flash/Plus, the Qwen3.6 series, the Qwen3.5 series, and Qwen open-source models) must be called through the multimodal API. See Web search with multimodal models.
- Singapore
- China (Beijing)
- Global
-
Qwen
- Qwen3.8 series: qwen3.8-max, qwen3.8-max-0902, qwen3.8-flash, qwen3.8-2.4t-a95b, qwen3.8-27b (
search_strategy: agentis not supported; for agent-style retrieval, use theweb_searchtool through the Responses API) - Qwen3.7 series: qwen3.7-max, qwen3.7-max-preview, qwen3.7-max-2026-05-17 and later snapshots, qwen3.7-plus, qwen3.7-plus-2026-05-26 and later snapshots, qwen3.7-flash, qwen3.7-flash-2026-07-15 and later snapshots
- Qwen3.6 series: qwen3.6-plus, qwen3.6-plus-2026-04-02 and later snapshots, qwen3.6-flash, qwen3.6-flash-2026-04-16 and later snapshots, qwen3.6-27b, qwen3.6-35b-a3b
- Qwen3.5 series: qwen3.5-plus, qwen3.5-plus-2026-02-15 and later snapshots, qwen3.5-flash, qwen3.5-flash-2026-02-23 and later snapshots, qwen3.5-27b, qwen3.5-35b-a3b, qwen3.5-122b-a10b, qwen3.5-397b-a17b
- Qwen-Omni: qwen3.8-omni-flash, qwen3.5-omni-plus, qwen3.5-omni-plus-2026-03-15, qwen3.5-omni-flash, qwen3.5-omni-flash-2026-03-15 (the search strategy must be set to
agent) - Qwen-Omni-Realtime: qwen3.8-omni-flash-realtime, qwen3.5-omni-plus-realtime, qwen3.5-omni-plus-realtime-2026-03-15, qwen3.5-omni-flash-realtime, qwen3.5-omni-flash-realtime-2026-03-15 (the search strategy must be set to
agent)
- Qwen3.8 series: qwen3.8-max, qwen3.8-max-0902, qwen3.8-flash, qwen3.8-2.4t-a95b, qwen3.8-27b (
-
Third-party models
- DeepSeek: deepseek-v4-pro, deepseek-v4-pro-0813, deepseek-v4-flash-0731 (the deepseek-v4 series also supports the Responses API)
- GLM: glm-5.2 (supported only by the Responses API)
- Kimi: kimi-k3 (supported only by the Responses API)
Quick start
The following examples show how to query stock information using web search.
- OpenAI compatible
- DashScope
Set
enable_search=True to enable web search. For qwen3.8-omni-flash, also set search_options={"search_strategy": "agent"}. When using the Responses API, configure tools=[{"type": "web_search"}] instead. See Web search with the Responses API.The OpenAI-compatible protocol does not support returning search sources in the response.
- Python
- Node.js
- curl
Sample response
Web search with Responses API
You can enable web search by adding the web_search tool to the tools array of the tools parameter.
This feature is supported only for the following models: the Qwen3.8 Max, Flash, and open-source series, and qwen3.8-omni-flash; the Qwen3.7 and Qwen3.5 series models (including open-source models, but not Omni models), the Qwen3.6-Plus and Qwen3.6-Flash series, and qwen3.6-35b-a3b; deepseek-v4-flash-0731, deepseek-v4-pro, deepseek-v4-pro-0813; glm-5.2; and kimi-k3.
When enabled through theweb_searchtool, the model performs agent-style multi-turn retrieval — it can autonomously callweb_search(and optionallyweb_extractor/code_interpreter) multiple times within a single response.
qwen3.8-max,qwen3.8-max-0902,qwen3.8-flash,qwen3.8-2.4t-a95b, andqwen3.8-27bdo not support theagentvalue ofsearch_strategyon the Chat Completions API. To use agent-style multi-turn retrieval with Qwen3.8, use the Responses APIweb_searchtool documented in this section.
The Responses API does not use thesearch_strategyparameter. Whether web search is triggered — and whether the model performs multiple search rounds — is determined solely by attaching theweb_searchtool and by the model's own decisions. Asearch_options.search_strategyvalue passed to the Responses API is silently ignored and does not trigger a search.
For models that support these tools, enableweb_search,web_extractor, andcode_interpretertogether. Forqwen3.8-omni-flash, the only supported built-in tool isweb_search.
For usage instructions, code examples, and migration guides for the Responses API, see OpenAI-compatible - Responses.
Sample response output (agent-style multi-turn retrieval)
Sample response output (agent-style multi-turn retrieval)
For a query such as "What is the weather in Singapore tomorrow?", the model performs multiple retrieval rounds within a single response. The The presence of multiple
output array contains multiple web_search_call (and optionally web_extractor_call) items interleaved with reasoning and the final message:web_search_call items and x_tools.web_search.count > 1 confirms agent-style multi-turn retrieval — the model decided on its own to refine the query and search again.Get search sources
After a web search runs, the search sources are returned in the response. They appear in the element whose type is web_search_call within the output array, and its action.sources field is the list of source links. You can extract them from the response in the example above as follows:
The Responses API does not support theenable_source,enable_citation, orcitation_formatparameters, and does not insert[1]citation markers into the response content. To use citation markers, use the DashScope API.
Billing
The web search described in this topic refers to the model's built-in web search feature, which is billed as described below and does not include a free call quota. It is separate from the Web Search MCP service offered in the Model Studio MCP marketplace, and the two are billed independently: the Web Search MCP service provides a free quota of 2,000 calls for all users, after which it is billed at CNY 29 per 1,000 calls. For more information, see Add web search MCP.
- model call fees: The web search feature appends retrieved web content to the prompt, increasing the number of input tokens. These tokens are billed at the model's standard rate. For pricing details, see the Model Studio console. When you use the Responses API or the Anthropic-compatible method, the web search tool is billed at the same rate as the agent policy.
-
search policy fees:
-
agent policy:
-
The fee per 1,000 calls is as follows:
- For the China (Beijing), US (Virginia), China (Hong Kong), Japan (Tokyo), and Germany (Frankfurt) regions: $0.573411.
- For the Singapore region: $10.00.
-
The fee per 1,000 calls is as follows:
-
agent_max policy (Limited-time offer):
This policy covers both the web search and the web extractor tool.
-
Fee per 1,000 calls for the web search tool:
- For the China (Beijing), US (Virginia), China (Hong Kong), Japan (Tokyo), and Germany (Frankfurt) regions: $0.573411.
- For the Singapore region: $10.00.
- The web extractor tool is free for a limited time.
-
Fee per 1,000 calls for the web search tool:
-
agent policy: