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
Web search supports the following four API call methods, each with different parameters for enabling it:
- OpenAI compatible-Responses API
- OpenAI compatible-Chat Completions API
- DashScope
- Anthropic compatible
Add the
web_search tool via the tools parameter to enable web search.The Responses API supports only some models. For supported models, see Web search with the Responses API.
Web search for multimodal models
Models such as the Qwen4-Max series, Qwen3.8 Max, Flash, and open-source series, Qwen3.7-Flash, Qwen3.7-Plus, the Qwen3.6 series, and the Qwen3.5 series (including the qwen3.5-plus, qwen3.5-flash, and qwen3.5-omni series, as well as Qwen open-source models) support multimodal input such as images and videos, and are multimodal models.
Search strategies vary by series: the qwen3.5-omni series supports only the agent strategy; qwen4-max, 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 with the multimodal interface (they use the default turbo or max). To use agent-style search with Qwen4 or Qwen3.8, switch to Web search with the Responses API; the other models listed in this section support the turbo, max, and agent strategies. These models must be called through the multimodal interface (the multimodal-generation endpoint): Python SDK 2.0 uses client.multimodal.chat.create, and Java uses MultiModalConversation, rather than the text-generation endpoint intended for text-only models. For basic usage of multimodal models, see the Visual Reasoning and Image and Video Understanding documentation.
If you call the multimodal models above through thetext-generationendpoint, they return400 url error, please check url. Use the multimodal interface instead (themultimodal-generationendpoint;client.multimodal.chat.createin Python andMultiModalConversationin Java). The Java SDK'sMultiModalConversationParamprovidesenableSearch(true)to enable web search but does not provide asearchOptions()method; use the generic parameterparameter("search_options", ...)to inject configuration such as the search strategy. Python'sclient.multimodal.chat.createacceptssearch_optionsdirectly. When web search is enabled for multimodal models, you must use streaming calls (streamCallin Java,stream=Truein Python); otherwise the errorNon-streaming mode does not support Web Searchis returned.
Python
Supported models
The models that support web search are as follows. Models that support multimodal input (the Qwen4-Max series, Qwen3.8 Max, Flash, and open-source series, Qwen3.7-Flash/Plus, the Qwen3.6 series, the Qwen3.5 series, and Qwen open-source models) must be called through the multimodal interface; see Web search for multimodal models.
- Singapore
- China (Beijing)
- Global
-
Qwen
- Qwen4 series: qwen4-max (
search_strategydoes not supportagent; for agent-style search, use theweb_searchtool via the Responses API) - Qwen3.8 series: qwen3.8-max, qwen3.8-max-0902, qwen3.8-flash, qwen3.8-2.4t-a95b, qwen3.8-27b (
search_strategydoes not supportagent; for agent-style search, use theweb_searchtool via the Responses API) - Qwen3.7 series: qwen3.7-max, qwen3.7-max-preview, qwen3.7-max-2026-05-17 and later snapshot versions, qwen3.7-plus, qwen3.7-plus-2026-05-26 and later snapshot versions, qwen3.7-flash, qwen3.7-flash-2026-07-15 and later snapshot versions
- Qwen3.6 series: qwen3.6-plus, qwen3.6-plus-2026-04-02 and later snapshot versions, qwen3.6-flash, qwen3.6-flash-2026-04-16 and later snapshot versions, qwen3.6-27b, qwen3.6-35b-a3b
- Qwen3.5 series: qwen3.5-plus, qwen3.5-plus-2026-02-15 and later snapshot versions, qwen3.5-flash, qwen3.5-flash-2026-02-23 and later snapshot versions, 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)
- Qwen4 series: qwen4-max (
-
Third-party models
- DeepSeek: deepseek-v4-pro, deepseek-v4-pro-0813, deepseek-v4-flash-0731,
deepseek-v4.1-flash-1017(the deepseek-v4 series also supports the Responses API) - GLM: glm-5.2 (supports web search only via the Responses API)
- Kimi: kimi-k3.1-pro (supports Responses
web_searchand Anthropicweb_search, but not Chat Completionsenable_search); kimi-k3 (supports web search only via the Responses API)
- DeepSeek: deepseek-v4-pro, deepseek-v4-pro-0813, deepseek-v4-flash-0731,
QuickStart
The following example queries stock information through web search.
- OpenAI compatible
- DashScope
Enable web search with
enable_search=True. When using qwen3.8-omni-flash, you also need to set search_options={"search_strategy": "agent"}; if you call through the Responses API, configure tools=[{"type": "web_search"}]. See Responses API web search.The OpenAI-compatible protocol does not support returning search sources in the response.
- Python
- Node.js
- curl
Response example
Responses API web search
Adding the web_search tool to the tools array of the tools parameter enables web search.
When enabled through theweb_searchtool, the model runs in an agent-style multi-round retrieval mode—it autonomously initiates multipleweb_search_callrequests (combined withweb_extractor_callwhen necessary) based on the question, and finally integrates the results to answer.
The following models are supported: the Qwen4-Max series; Qwen3.8 Max, Flash, and open-source series,qwen3.8-omni-flash; Qwen3.7 and Qwen3.5 series models (including open-source models, excluding Omni), Qwen3.6-Plus, the Qwen3.6-Flash series, and qwen3.6-35b-a3b; deepseek-v4-flash-0731,deepseek-v4.1-flash-1017, deepseek-v4-pro, deepseek-v4-pro-0813; glm-5.2; kimi-k3; kimi-k3.1-pro.
Agent-style retrieval for the Qwen4 / Qwen3.8 series: Qwen4-Max (qwen4-max) and the Qwen3.8 series (qwen3.8-max, qwen3.8-max-0902, qwen3.8-flash, qwen3.8-2.4t-a95b, qwen3.8-27b) do not supportsearch_strategy: agentunder the Chat Completions/DashScope protocols, but you can achieve the same agent-style multi-round retrieval capability through the Responses APIweb_searchtool described in this section.
The Responses API does not use thesearch_strategyparameter. Whether a web search is initiated and whether multi-round retrieval is performed are both determined by whether theweb_searchtool is mounted and by the model's autonomous decision; passingsearch_options.search_strategyis silently ignored and does not trigger a search.
For models that support the following tools, it is recommended to enableweb_search,web_extractor, andcode_interpreterat the same time. The built-in tools ofqwen3.8-omni-flashsupport onlyweb_search.
For usage instructions, code examples, and migration guides for the Responses API, see OpenAI-compatible Responses .
python
qwen4-max uses the top-level tool_usage of the response, where each tool's num_requests is the number of billable requests and pdf_page_parser.num_requests is the number of parsed pages. The Responses example for Qwen3.8 still uses usage.x_tools.
The following example shows the output and tool counts of multi-round retrieval. Billable requests are based on tool_usage, not on the number of output items.
Get search sources
After a web search is performed, the search sources are returned in the element whose type is web_search_call in the response's output array, and its action.sources field is a list of search source links. Based on the response in the example above, you can extract them as follows:
The Responses API does not currently support theenable_source,enable_citation, orcitation_formatparameters, and it does not automatically insert[1]superscript citations into the reply content. If you need superscript citations, use the DashScope call method.
Billing Details
The fee for web search consists of two parts:
- Model call fee: The web page content retrieved by web search is concatenated into the prompt, increasing the model's input tokens, and is billed at the model's standard price. For pricing details, refer to the Model Studio console. When using the Responses API or the Anthropic-compatible method, the billing for the web search tool is the same as for the agent strategy.
-
Search strategy fee:
-
agent strategy:
-
The fee for every 1,000 calls is:
- China (Beijing), US (Virginia), Hong Kong (China), Japan (Tokyo), and Germany (Frankfurt) regions: $0.573411
- Singapore region: $10.00.
-
The fee for every 1,000 calls is:
-
agent_max policy (limited-time offer):
The fee includes web search and web page fetching.
-
Web search tool fee per 1,000 calls:
- China (Beijing), US (Virginia), Hong Kong (China), Japan (Tokyo), and Germany (Frankfurt) regions: $0.573411.
- Singapore region: $10.00.
- The web page fetching tool is free of charge for a limited time.
-
Web search tool fee per 1,000 calls:
-
agent strategy:
Q: After a web search, the model returns "unable to answer" or no response?
A: The web search results may contain controlled information that triggers content safety rules, causing the model to return the DataInspectionFailed error (HTTP 400) with the response "Sorry, I cannot answer this question". Troubleshooting method: disable web search and resend the same query; if the model replies normally, it confirms that the content returned by the search triggered the interception. Content safety interception is non-deterministic behavior that depends on the specific content returned by the search; not all sensitive-topic queries will trigger it.
Q: The web search count on the bill does not match the count field returned by the API. How do I reconcile them?
A: The two use different statistical scopes, so a difference in values is expected:
- Billing: A call is billed when the search service actually completes retrieval and returns a successful result.
- The
countfield (usage.plugins.search.countin the DashScope API,usage.x_tools.search.count(Chat Completions / Qwen3.8 Responses) in the OpenAI-compatible API; the two carry the same value): Indicates that intent detection determined this turn required a web search. The field is set during the intent-detection stage and does not mean retrieval actually completed. It still returns a value even when the rate limit is exceeded or retrieval returns no results; it is not set to 0 and is not omitted.
count is not a basis for billing or reconciliation. Use your bill as the authoritative source for reconciliation.