LLM API Billing Shift: Server-Side Search Moves into Token-Based Pricing

    A major LLM provider has changed how server-side search and web scraping are billed: instead of separate per-request charges, these operations are now folded into model token usage. This article explains the new billing rules, the technical difference between per-request and per-token pricing, and the engineering changes Agent and RAG applications need to make for cost control, caching, tool-call design, and migration.

    LLM API Billing Shift: Server-Side Search Moves into Token-Based Pricing

    Starting November 18, 2026, a major LLM provider officially adjusted the billing basis for its model API. When developers trigger server-side search and web scraping through capabilities such as web-access tools or search tool invocation interfaces, those operations are no longer billed separately. Instead, they are included in model token usage billing. This is another important pricing adjustment after the vendor previously introduced standalone search and scraping APIs and charged RMB 5 per 1,000 successful requests. For many Agents and retrieval-augmented generation (RAG) applications that depend on real-time external information, this is not just a change in price numbers. It means the cost model and engineering practices across the entire invocation chain need to be rebuilt.

    1. Core Interpretation of the Billing Rule Changes

    1.1 From Two Billing Dimensions to One

    For a long time, the platform had two parallel billing dimensions: one based on the number of model input and output tokens, and another based on the number of successful requests to search and scraping APIs. When building an intelligent application that needed web retrieval, developers often had to track two cost indicators at the same time and carefully control search invocation counts at the code level. After the adjustment, when a model invocation triggers server-side search and web scraping on the model side, the related costs are no longer listed separately. They are settled together with model token usage. This means developers only need to maintain one cost indicator—total token consumption—to calculate and control the operating cost of the entire application.

    According to the official description, typical scenarios that trigger server-side search include:

    • Using the platform’s web-access tool or real-time information retrieval tool so that the model actively initiates a network query while answering;
    • Passing a search instruction through a search tool invocation interface compatible with a common API format, with the server executing the query on the developer’s behalf;
    • In responsive API tool-call mode, initiating a web search and waiting for the result to return.

    Regardless of how the search is triggered, the cost of search and web scraping no longer appears separately on the bill. It is converted into additional tokens in the model context. One point is easy to overlook: web content returned by search and Markdown text produced after scraping both enter the model context as input tokens. In other words, “free search” does not mean “lower total cost.” It only consolidates and simplifies the cost structure, changing the bill from “request count × unit price + token count × token unit price” to a single calculation basis of “token count × token unit price.”

    2. The Technical Nature of the Cost Structure Change

    2.1 Core Difference Between Per-Request and Per-Token Billing

    Per-request billing is essentially pricing an “action.” One search or one page scrape has a fixed price regardless of how long the returned content is. This model has high predictability when search volume is controllable, but once an Agent’s autonomous invocation logic becomes complex, search counts can easily get out of control. For example, in a multi-step reasoning task, the model may initiate multiple searches in succession. Each round of search is an additional cost, and developers must limit search frequency through engineering controls.

    Per-token billing is essentially pricing “information volume.” Search itself is no longer the cost trigger. What really affects cost is the input token consumption generated after searched content is injected into the model context. This model is closer to the real overhead of model inference, because whether content comes from user prompts, system instructions, or web retrieval, the model processes token sequences. Folding search fees into token billing can be seen as a return to the essential cost driver: how much information the model processes.

    2.2 Transmission Path from Search to Token Consumption

    To understand this change more intuitively, we can break down a complete model invocation with real-time information retrieval into the following chain:

    1. The user sends a question to the model.
    2. During reasoning, the model determines that external information is needed and triggers server-side search.
    3. The server performs web search and content scraping, then returns the results in a unified format, such as Markdown text with a title and body.
    4. The search results are attached to the model input as context.
    5. The model generates the final response based on the complete context.

    In step 3, all returned content is counted as tokens in the input cost of that invocation. Therefore, what developers really need to focus on is avoiding invalid searches and low-quality web scraping. Even if a search request itself has “zero fee” under the new rules, if it retrieves a long page with tens of thousands of words, the corresponding token consumption may far exceed the old price of a single search request. In other words, the focus of cost control shifts from “how many searches were invoked” to “how much useful information was returned.”

    2.3 Qualitative Comparison of Old and New Cost Models

    Dimension Old Model (Per Search Request) New Model (Token-Only Billing)
    Cost driver Number of search and scraping invocations Total number of tokens processed in the model context
    Cost predictability Depends on invocation frequency and requires extra quota management Depends only on total token consumption, making unified estimation easier
    Search cost in multi-turn conversations Each search round is a separate billing item Folded into the model’s native context billing, resulting in a simpler bill
    Impact on invocation strategy Encourages as few searches as possible to avoid budget overruns Encourages search on demand because search itself is no longer separately charged

    It is important to emphasize that the new model does not mean “unlimited search.” Excessive search will fill the context with large amounts of external information, causing input token counts to surge. Overall costs will still rise, but the path of the increase shifts from “search count” to “context length.”

    3. Engineering Impact on Agent and RAG Applications

    3.1 Simplification and Reconstruction of Cost Budget Models

    For developers, the most direct benefit is simplification of the cost model. Previously, the monthly cost formula for an Agent application was roughly:

    Total cost = model invocation token fees + search API request fees + scraping API request fees

    Now it is simplified to:

    Total cost = model invocation token fees (including external retrieval content converted into tokens)

    This brings two positive engineering effects. First, on cloud cost management platforms, there is no longer a need to configure two sets of alert thresholds at the same time. Second, during capacity planning, costs can be roughly estimated based only on projected message volume and average token consumption, which also simplifies procurement and financial approval processes.

    3.2 Redesigning Tool Invocation Strategies

    Under the old model, developers often proactively limited search trigger conditions in tool definitions—for example, allowing web search only when keywords matched. Now, the decision of “whether web search is needed” can be handed to the model itself for autonomous judgment. Many advanced models already have good tool selection and timing judgment capabilities. As long as the rules are clearly stated in the system prompt, the model can decide whether retrieval is needed based on the question type.

    However, this does not mean developers should let go entirely. An important engineering practice is to set a “context budget.” If the model invokes a search tool once and scrapes a large amount of content, the input length can expand unpredictably. Therefore, it is advisable to perform initial filtering or summary truncation on search results at the application layer. For example, after scraping, keep only the first several characters of the body, or first use a lightweight model to compress information from the search results before passing them to the main model. Although this introduces an additional processing layer, it is often more cost-effective than injecting an entire long article directly into the main model, especially in high-frequency invocation scenarios.

    3.3 Strengthening Caching and Deduplication Mechanisms

    Because search fees are now included in token billing, if multiple turns of a conversation need to reuse the same external information after one search, repeated searches will waste tokens. Therefore, implementing a short-term cache layer for search results becomes particularly necessary. Feasible approaches include:

    • Use a query summary or normalized URL as the primary key to cache the most recent N search results;
    • Set a TTL (time to live), for example caching web page snapshots for 10 minutes;
    • In consecutive multi-turn invocations within the same session, if the model has already obtained the same information in previous steps, explicitly tell the model that it does not need to search again.

    A cache layer can not only reduce token consumption but also significantly shorten response latency, because web search often takes longer than model inference. A well-designed caching scheme often brings both cost and experience improvements.

    3.4 Considerations for Concurrent Invocations and High-Traffic Scenarios

    Search tasks have different latency characteristics from ordinary model inference. A web scrape needs to go through DNS resolution, HTTP requests, page parsing, and other steps, usually taking from hundreds of milliseconds to several seconds. When a large number of concurrent requests trigger search at the same time, server-side resource usage is high, and timeouts or rate limiting may occur. Although search fees are no longer billed separately, the overall invocation frequency of the API still has limits. Developers should design retry and degradation strategies based on actual business volume. It is recommended to use exponential backoff retries on the client side and fall back to pure model answers when search requests fail, ensuring continuity of user experience.

    4. Technical Positioning of Server-Side Search and Web Scraping

    4.1 Why Server-Side Search Fits Agent Scenarios

    Server-side search is fundamentally different from client-side search. In traditional development models, developers need to handle network requests themselves, including query parameter construction, result parsing, and web page body extraction. Server-side search packages these steps into a unified process, so the model only needs to receive formatted results. More importantly, scraped web pages are converted into a unified Markdown format containing a title and body. This structured output can be sent directly into the model as context without additional cleaning. This design naturally fits Agent scenarios, because the core requirement of an Agent is to obtain reliable, readable, and usable external information as quickly as possible.

    4.2 Differences and Value of Search and Scraping

    Search and scraping are two complementary capabilities:

    • Search returns a structured result list of relevant web pages based on a natural language query, suitable for scenarios that need a quick overview of “what information sources exist”;
    • Scraping targets a specific page and extracts its body content in Markdown form, suitable for scenarios that need to read the full content of a page.

    In practical applications, the usual pattern is to search first to locate the target page, then scrape to obtain the content. From a cost perspective, because the new rules fold both into token billing, developers can flexibly combine these two types of operations without worrying about extra line items for one more search here or one more scrape there.

    4.3 Compatibility with the Existing Search Tool Ecosystem

    It is worth noting that the new billing rules cover multiple trigger methods, including web-access tools, compatibility API search tools, and responsive API search tools. This means that even if developers currently use different integration modes, cost accounting will be unified. Users who have already built applications with these tools can benefit from the simplified billing without changing their invocation logic. Users who have not yet integrated search tools should re-evaluate application requirements and determine whether real-time retrieval capabilities should be added. A recommended evaluation method is to analyze the proportion of “factual and time-sensitive” questions in user prompts: if it exceeds 30%, introducing server-side search usually significantly improves answer quality.

    5. Migration and Optimization Recommendations

    5.1 Gradual Observation and Canary Validation

    After billing rules change, the safest approach is to first run several rounds of high-frequency invocations in a test environment and record the token consumption curve for each invocation. Pay particular attention to token fluctuations in the following scenarios:

    • User questions involve recent news or real-time market data, causing the model to trigger search frequently;
    • In multi-turn conversations, the same topic is searched repeatedly in every turn;
    • The target page for scraping is an extremely long article or a dynamically rendered page, and the returned content far exceeds expectations.

    Through this observation, abnormal peaks in operating costs can be identified quickly, and targeted optimizations can be made.

    5.2 Set Up Automated Cost Monitoring Tools

    Although API costs are managed uniformly through token billing, developers should still establish their own monitoring metrics on the application side. Based on common cloud practices, a typical approach is to combine logging services with monitoring alerts and record, per session, the number of input tokens, number of output tokens, whether search was triggered, and the length of search-returned content for each invocation. When token consumption in a session increases abnormally, trigger an alert and investigate whether the cause is model behavior or abnormal external page content. This data-driven governance approach allows intervention before costs get out of control and enables fine-grained resource management.

    5.3 Clarify Information Selection Strategies in Prompts

    Adding guidance on “how to use web information” to the system prompt can significantly reduce invalid searches. For example, the following guidance can be set:

    • Call external search only when the user explicitly requests real-time information or the question involves recent events;
    • If one search result is already sufficient to answer the current question, do not initiate additional related searches;
    • Prefer pages with moderate body length and clear structure, and avoid community comment pages or navigation pages.

    In this way, the model automatically distinguishes among three scenarios during decision-making: “must search,” “can search,” and “no need to search,” maximizing the benefit of search behavior while keeping token consumption within a reasonable range.

    The following sample code illustrates a tool invocation flow and shows how to control cost and quality at the engineering level after introducing the new billing model:

    1. def search_and_answer(question, client, cache):
    2. # 1. Check the cache to avoid repeated searches
    3. if question in cache:
    4. search_result = cache[question]
    5. else:
    6. # 2. Trigger server-side search, with structured results returned by the server
    7. search_result = client.search(query=question, max_results=3)
    8. # 3. Extract only key body snippets to avoid excessively long content entering the context
    9. search_result = trim_to_fit(search_result, max_tokens=1200)
    10. cache[question] = search_result
    11. # 4. Merge search results with the user question as model context
    12. messages = [
    13. {"role": "system", "content": "Organize the background information, then provide the final answer"},
    14. {"role": "user", "content": format_context(question, search_result)}
    15. ]
    16. # 5. The model generates a response, and token costs are counted automatically
    17. response = client.chat(messages=messages, max_tokens=1000)
    18. return response.content

    5.4 Replan Scenario-Based Budget Caps

    For enterprise users that need stable operating costs, it is advisable to split budgets by scenario. Common practices include:

    • For customer service Q&A scenarios, set a token cap per session to avoid extremely high-cost sessions;
    • For content generation scenarios, configure different parameters based on output length and retrieval depth;
    • For data analysis scenarios, allow more frequent searches and longer contexts, but accept relatively higher costs.

    6. Summary and Outlook

    Merging server-side search and web scraping from standalone billing into model token billing appears to be a simplification of pricing. In substance, it moves the anchor of cost accounting from “operation count” to “information processing volume.” This is closer to the essential logic of LLM inference and gives developers of Agent applications more unified and transparent means of cost control. In the future, as LLMs continue to evolve in real-time information acquisition, deep reasoning, and tool use, we can expect a more coherent invocation and billing system: no need to configure separate budgets for each external capability, and no need to write complex degradation logic for “how many searches were invoked.” For developers, the most practical recommendation is to refresh cost models immediately, carefully analyze the token distribution in historical invocation data, optimize prompts and caching strategies, and achieve a smooth transition from the old model to the new one at the lowest engineering cost. Search is no longer “charged per request,” but every character that enters the model context still has a real cost. What ultimately determines cost is not search itself, but the efficiency with which information enters the context.