Web Search Is No Longer Billed Separately: How to Control Token Costs

    This article explains how a recent change to an LLM API provider's web search billing folds search and page-fetching costs into token usage. It walks through the function-calling workflow for web-enabled Q&A and compares total costs under the old and new billing models using illustrative prices.

    1. What Changed in the Billing Structure

    A large language model API provider recently changed how it bills web-enabled features. Server-side searches and web page fetches triggered during model calls are no longer billed per request. Their costs are now included in token-based billing. For the effective date, supported models, and API scope, refer to the provider’s official announcement.

    Previously, the provider offered separate search and fetch APIs billed per successful request, for example 5 CNY per 1,000 requests.

    2. How a Web-Enabled Q&A Request Works

    When using Function Calling or a built-in web search tool, a web-enabled question typically goes through four steps:

    1. The application sends the user’s question and the tool definitions to the model API.
    2. The model decides whether the question requires real-time information and generates a search instruction, which the server executes.
    3. The returned search titles, summaries, and links, or the fetched page text, are injected into the model’s context.
    4. The model generates the final answer based on this content.

    Step 3 is the key to understanding the billing change. In both the old and new models, search results enter the context as input tokens and are billed as such. The only difference is that the old model adds a separate per-search fee.

    3. How Costs Compare Between the Two Models

    Old model total cost = input token cost + output token cost + (number of searches × cost per search)

    New model total cost = input token cost + output token cost

    The examples below use assumed prices: 2 CNY per million input tokens, 8 CNY per million output tokens, and 5 CNY per 1,000 searches (0.005 CNY per search). These figures are for illustration only. Actual prices are listed in the official pricing.

    Scenario Input tokens Output tokens Search calls Old model total cost New model total cost Savings
    Low-frequency short query 1,300 400 1 0.0108 CNY 0.0058 CNY 0.0050 CNY (about 46%)
    Low-frequency long text 3,500 800 1 0.0184 CNY 0.0134 CNY 0.0050 CNY (about 27%)
    High-frequency multi-turn retrieval (5 turns in one session) 30,000 4,000 5 0.1170 CNY 0.0920 CNY