LLM Web Search Q&A Cost: Estimating 1,000 Calls

    This article breaks down the real cost of web-enabled LLM question answering into model inference, search calls, and web fetch charges. It compares letting the model use built-in web tools with having the application call Search and Fetch APIs directly, then estimates the cost of 1,000 tasks, shows how costs scale with usage, and offers practical engineering guidance for controlling token and API expenses.

    Many developers building web-enabled Q&A applications start by looking at the “price per million tokens” and multiplying by an estimated factor. But once a task involves web search, that approach will likely be wrong, because web-enabled answering involves at least three cost components: model inference, search calls, and web page fetching.

    A recent announcement from a cloud provider that model built-in search and web fetch on its API side would no longer charge tool-invocation fees led some community discussions to conclude that “search is free.” That interpretation is not accurate. This article separates the billing logic of two integration patterns and provides a reusable cost-estimation framework.

    1. First Distinguish the Two Integration Patterns: Their Billing Logic Is Completely Different

    Pattern A: Let the Model Use Web Tools Itself

    In this mode, web search and web fetch are triggered autonomously by the model during inference and executed by the server on its behalf:

    • The tool action itself is not charged: When the model decides to “search” or “open a web page,” that action is not billed.
    • But the retrieved material participates in inference: Search snippets and page bodies are inserted into the context and billed as input tokens. If fetched pages are long, this cost cannot be ignored.

    So the real meaning of “no tool fee” is: the search/fetch service fee that was previously charged separately drops to zero, but the context expansion caused by web access still appears in the input-token bill. The more searches performed and the longer the fetched pages, the more input tokens are consumed and the higher the model fee.

    Pattern B: The Application Calls Search / Fetch APIs Itself

    Another approach is for the application layer to control the web-access workflow: the program first calls a search API to get results, then fetches page bodies as needed, and finally feeds the organized material to the model to generate an answer.

    Under this mode, the bill is split into two parts:

    • Search and fetch APIs: Billed per successful request. A common industry order of magnitude is about CNY 5 per 1,000 successful requests; failed, timed-out, or no-result requests are generally not billed.
    • Model fee: Settled separately based on input/output tokens, using the same basis as Pattern A.

    Key Takeaway

    To determine which pattern is more cost-effective, you cannot look only at “how much input costs per million tokens.” You must put model fees, search fees, and fetch fees into the same bill and compare them together.

    The core difference is this: Pattern A eliminates search/fetch service fees, but control over input tokens sits on the model side. Pattern B pays extra API fees, but the application layer can perform precise context trimming, deduplication, and caching, creating an opportunity to push input tokens lower.

    2. Cost Estimate for 1,000 Built-in Web-Enabled Q&A Tasks

    Take a typical cost-effective inference tier as an example. Most cloud providers split model inference pricing into “peak” and “off-peak” ranges:

    Billing Item Off-Peak Peak
    Uncached input CNY 1 CNY 2
    Cache-hit input CNY 0.02 CNY 0.04
    Output CNY 4 CNY 8

    (Unit: CNY per million tokens. Peak usually refers to fixed periods on weekdays, with the rest being off-peak. Refer to the billing documentation of the platform you use for specifics.)

    Assume a single task accumulates 6,000 uncached input tokens + 1,000 output tokens (including reasoning usage), with no retries and no other paid services. For web-enabled Q&A tasks, 6,000 input tokens is a reasonable order of magnitude because search results and web page content must be inserted. Note that this is the total billable input for the entire task, not the length of the user’s question.

    Total volume for 1,000 tasks: 6 million input tokens + 1 million output tokens, with a built-in tool fee of 0.

    • Off-peak model fee: 6 × 1 + 1 × 4 = CNY 10
    • Peak model fee: 6 × 2 + 1 × 8 = CNY 20

    Spread across individual tasks, that is roughly CNY 0.01 to CNY 0.02 per task. In other words, once the tool fee is waived, the cost of web-enabled Q&A is almost entirely model inference itself.

    3. Comparison for Pattern B: How Much More Does Self-Managed Search Cost?

    With the same model usage, if the application calls APIs itself:

    • Search and fetch fees: Assume each task triggers 1 search + several fetches. At CNY 5 per 1,000 successful requests, search alone for 1,000 tasks costs CNY 5. If each task also fetches 2 web pages, fetch fees add another CNY 10.
    • Model fee: Same basis as Pattern A, but by trimming context, the application layer may be able to reduce input from 6,000 to around 4,000. In that case, the off-peak model fee can drop to 4 + 4 = CNY 8.

    Overall, the total cost of Pattern B typically falls in the CNY 20–40 range. Whether it is cheaper than built-in web access depends on two things: the frequency of search/fetch calls (the more frequent, the more expensive) and context-trimming capability (the more aggressively you trim, the lower the model fee).

    4. Scaling Usage and Budget Table

    Costs are linear, so you can scale them up using the same unit prices:

    Input per Task Output per Task Off-Peak Model Fee (1,000 Tasks) Peak Model Fee (1,000 Tasks)
    6,000 1,000 CNY 10 CNY 20
    12,000 2,000 CNY 20 CNY 40
    30,000 5,000 CNY 50 CNY 100

    5. Engineering Practice Recommendations

    1. Monitor call logs rather than subjective impressions: Whether the model actually triggered web access and how many times it did so should be based on call logs, not guessed from the style of the answer.
    2. Take advantage of the cache price gap: The unit price of cache-hit input differs from uncached input by one to two orders of magnitude. Try to make fixed prefixes (system prompts, few-shot examples) hit the cache.
    3. Schedule off-peak: For offline batch tasks, schedule them during off-peak periods to cut model fees directly in half.
    4. Control fetch size: Regardless of the integration pattern, web page bodies are the largest source of input tokens. Prioritize extracting the main body and stripping out navigation, ads, and other noise.
    5. Set a retry limit: Although failed requests are usually not charged search fees, the model fees caused by retries are very real.

    Finally, a reminder: the numbers above are estimates based on public price tiers and assumed usage. They are intended to establish a budgeting framework, not as an official commitment from any platform; actual costs should be based on the real-time billing page of the cloud platform you use. The cost gap often does not come from model price cuts, but from integration-pattern choices and context engineering.