Ground model responses in real-time web data
Web search lets a model query the internet before responding, so answers can include up-to-date facts such as stock prices, weather, or recent news. Enable it by adding a single parameter to any text-generation call.
Get an API key and set it as an environment variable.
Web search supports two search strategies:
Control how aggressively the model searches via the
When you set
Use these fields to render inline citations or a references list in your application. The model's response text may reference sources by index (e.g., "according to source [1]").
Billing involves two aspects:
If a call fails, see Error messages.
Enable web search
- OpenAI compatible
- Responses API
- DashScope
Set
enable_search: true and optionally pass search_options to choose a strategy.The OpenAI compatible Chat Completions endpoint does not return search sources. Use the Responses API or DashScope if you need citations.
Supported models
Web search supports two search strategies: agent (standard search) and agent_max (search + full-page reading).
| Model family | Thinking mode | Non-thinking mode | Notes |
|---|---|---|---|
Qwen3.6 Plus (qwen3.6-plus and later snapshots) | agent, agent_max | agent, agent_max | |
Qwen3.5 Plus (qwen3.5-plus and later snapshots) | agent, agent_max | agent, agent_max | |
Qwen3.5 Flash (qwen3.5-flash and later snapshots) | agent, agent_max | agent, agent_max | |
Qwen3 Max (qwen3-max, qwen3-max-2026-01-23) | agent, agent_max | agent | agent_max requires thinking mode |
Qwen3 Max (qwen3-max-2025-09-23) | agent | agent | agent only |
Search strategies
Control how aggressively the model searches via the search_strategy field inside search_options:
agent-- The model decides when and how often to search. Suitable for most queries. One search call is billed per invocation.agent_max-- The model may search multiple times and, when supported, use the web extractor tool to read full pages. Best for research-heavy prompts that need deep or cross-referenced information. Requires thinking mode on Qwen3 Max.
search_strategy, the default is agent.
Read search results
When you set enable_source: true (DashScope only), the response includes a search_info.search_results array. Each entry contains:
| Field | Description |
|---|---|
index | Citation number referenced in the response text |
title | Page title of the source |
url | URL of the source |
Billing
Billing involves two aspects:
- Model call fees: The web content from the web search is added to the prompt, which increases the number of input tokens for the model. You are charged based on the standard pricing of the model. For more information about pricing, see Pricing.
-
Search call fees (per 1,000 calls):
Strategy ( search_strategy)What it does Fee agent(default)Model searches the web as needed $10.00 agent_maxSearches + reads full pages via web extractor $10.00 for search; web extractor is free for a limited time