LLM API Web Search Billing: What the Shift to Token-Only Pricing Means for Developers
A recent pricing change at an LLM API platform removed per-request fees for server-triggered web search and page fetching, leaving token usage as the main cost. This article explains the timeline, the boundary between model-triggered search and standalone Search/Fetch APIs, why “free” search is not zero cost, and practical ways to control context size, caching, and request-level fallbacks.
Background
An LLM API platform recently announced that, starting from November 18 at 12:00 Beijing time, web search and page-fetch actions triggered automatically by the server during model calls would no longer be billed per request. Developers would instead pay only for the actual token usage of the model.
The change came quickly. On October 17, the platform launched standalone Search and Fetch APIs, free through the end of October. Starting November 1, those APIs were priced at CNY 5 per 1,000 successful requests. The per-request billing rule for model-triggered search lasted only about 18 days before being removed.
For developers, this is a real cost improvement. But “free” is misleading. A more accurate description: the search action is no longer charged separately, while token usage is still charged. That distinction matters when estimating the real cost of retrieval-augmented applications.
Billing Boundaries: Two Product Lines
The main trap is confusing two different ways of calling search.
Model-Triggered Search: No Longer Per-Request
This change covers scenarios where the model decides whether to search. Typical examples include:
- Built-in web search tools in the model, where the model decides during inference that a search is needed.
web_searchtools in Agent-style APIs.web_searchtools in Responses-style APIs.
The common feature is that search happens on the server side and is triggered by the model based on conversation context. The developer only enables the tool in the request. After the change, search and fetch counts no longer create separate line items; the cost is folded into token consumption.
Standalone Search/Fetch APIs: Still Per-Request
The boundary is here: standalone Search and Fetch APIs are unaffected and still cost CNY 5 per 1,000 successful requests.
These APIs serve a different purpose. Developer code decides what to search for and which page to fetch, then feeds the result to any model—or to no model at all.
| Calling mode | Decision maker | Billing model |
|---|---|---|
| Model-triggered web search/fetch | Model | Token usage only |
| Standalone Search/Fetch API | Developer program | CNY 5 per 1,000 successful requests |
These are two separate product lines. The first is for agent scenarios where the model is allowed to go online. The second is for traditional retrieval-augmented generation (RAG) pipelines where retrieval logic is controlled by code. Treating them as the same can cause errors in architecture selection or cost accounting.
“Free” Does Not Mean Zero Cost: The Token Ledger Is the Main Bill
Many developers react to “web search is free” by assuming costs go to zero. That intuition needs correction. To see the real change, trace one web-search Q&A cycle:
User question -> model decides a search is needed -> server executes search/fetch-> search results are injected into context -> model generates answer
Previously, this cycle produced two kinds of charges: per-request search/fetch fees plus token fees. Now, only the per-request search/fetch fees are removed. The token fee is usually the larger part, because search results are inserted into model context and can easily be thousands or tens of thousands of tokens.
- What you save: the fixed per-request fee for each search. The more frequently you call search, the more you save.
- What you still pay: input tokens for the content that enters the context, plus output tokens for the model’s answer.
In essence, this adjustment converts an explicit search-call fee into an implicit context-token fee. Agent applications with frequent, deep retrieval benefit clearly. But if search results are not trimmed before injection, token spend can rise quietly.
Practical Recommendations for Developers
Control the Length of Retrieved Content Injected into Context
Because tokens are still billed normally, the core optimization shifts from reducing the number of searches to reducing ineffective context.
- Clean fetched page text to remove navigation, ads, and other noise, keeping only paragraphs relevant to the question.
- Combine and summarize multiple search results before injection instead of dumping the full raw text.
- Set a context length limit and truncate or rank by relevance when necessary.
Choose the Calling Mode Based on the Scenario
The two search modes fit different use cases.
- For agent applications that need model-driven planning and multi-step exploration, such as deep research assistants, prefer model-triggered web search. It has no per-request fee and lets the model decide search strategy dynamically.
- For traditional RAG applications with fixed retrieval logic and precise control over query terms and result sources, continue using the standalone Search API. It is still billed per request, but retrieval results can be cached and reused deterministically, avoiding repeated model-driven searches that waste tokens.
Build Caching and Deduplication
Caching is essential for frequent, similar queries in either mode.
- Store historical retrieval results in object storage.
- Use a message queue for asynchronous fetching and cleaning.
- Track token consumption and cache hit rate through monitoring and alerts to maintain a sustainable cost-observability system.
Add Request-Level Fallback Controls
A sample call configuration can look like this:
response = client.chat.completions.create(model="your-model",messages=[{"role": "user", "content": query}],tools=[{"type": "web_search"}], # model-triggered search; no per-request feemax_tokens=2048 # cap output tokens to control cost)
Also add an application-level switch. When web search is not strictly necessary—for example, in pure knowledge Q&A or code generation—disable the search tool explicitly. This prevents unnecessary context expansion from over-triggered searches.
An Industry Observation
The fact that per-request search billing was removed after only 18 days shows that web search is moving from a value-added feature to a baseline capability. Like streaming output and long context, it is gradually becoming a default configuration rather than a paid plugin.
The logic is straightforward: web search greatly improves the usefulness and stickiness of a model, so platforms have an incentive to monetize through token consumption rather than feature access fees.
For developers, this lowers the barrier to building retrieval-augmented applications. Whether you integrate a third-party LLM API or build a RAG pipeline on a cloud platform such as Baidu AI Cloud, the “retrieval + generation” architecture is converging. The focus will shift to engineering details: retrieval quality, context engineering, and cost control.
Conclusion
In one sentence: the ticket for model web search has been removed, but the seat fee—token usage—remains. Developers should clearly separate model-triggered search from standalone Search/Fetch APIs, and move cost optimization work toward context management and caching. Pricing windows can change quickly, so teams should verify the calling patterns of their applications and update billing models and budget estimates accordingly, rather than building architecture on billing assumptions that are already outdated.
