LLM Web Search Pricing Changes: How Developers Can Control Costs

    Built-in web search and standalone Search and Fetch APIs have different cost structures. This article explains how to estimate per-request costs, compare integration options, and use routing, result limits, and caching to manage spending, with a Python example and key pricing verification checks.

    LLMs typically access the web in one of two ways: the model decides when to search and which pages to retrieve, or the developer calls search and fetch APIs before sending the results to the model.

    These approaches have different billing models and cost structures. Understanding the distinction helps developers estimate costs, choose an integration path, and control spending.

    The prices and timing discussed below come from public reporting and have not been independently verified. Before making production decisions, check the platform’s official announcements and pricing documentation.

    1. Built-In Search vs. Standalone APIs

    According to public reporting, an unnamed LLM platform changed its billing rules effective at 12:00 on November 18. The year should be confirmed in the official announcement.

    Under the reported change, server-side search and webpage retrieval triggered through model calls no longer incur separate search or retrieval fees. Developers pay for the model’s input and output tokens instead.

    However, search results enter the model’s context and therefore still contribute to input-token usage. No separate search fee does not mean zero cost. The more retrieved content the model processes, the higher the token bill can be.

    Standalone Search API and Fetch API

    The platform also retains standalone Search API and Fetch API services. Public reporting quotes a price of CNY 5 per 1,000 successful requests, or CNY 0.005 per request.

    Before using that figure in a budget, verify:

    • What counts as a “successful request,” including whether an empty result is considered successful.
    • Whether failed requests and retries are charged.
    • Whether Search and Fetch have the same price. The reporting provides only one figure; confirm Fetch pricing on the official pricing page.
    • Whether model tokens used to process API results are billed separately. They are.

    With standalone APIs, developers retrieve structured search results or webpage content, process it, and then pass it to the model. This approach therefore combines per-request API fees with model token charges.

    Dimension Built-in search Standalone Search API Standalone Fetch API
    Trigger The model decides Developer code decides Developer code decides
    Search or retrieval fee No separate fee under the reported policy Per-request billing Per-request billing; verify the rate
    Token charges Model input and output are billed Model input and output are billed Model input and output are billed
    Control Lower; the model selects queries and pages Higher; developers specify queries and result counts Higher; developers specify URLs
    Latency Depends on the model’s search rounds Calls can be made in parallel before model processing Calls can be made in parallel before model processing
    Failure handling Managed by the platform, with limited developer visibility Retry limits must be implemented in code Failed retrievals require retries or fallback handling
    Caching Developers cannot directly cache the internal search step Results can be cached by query Content can be cached by URL
    Typical use cases General Q&A and time-sensitive questions Workflows requiring preprocessing, filtering, or auditing Retrieving content from a known page
    Main risks Unpredictable results and variable token usage Per-request fees grow with request volume Retrieval failures, page structure changes, and compliance issues

    2. How to Estimate the Cost of One Answer

    Use the following formula:

    1. Cost per answer =
    2. input tokens × input price per token
    3. + output tokens × output price per token
    4. + standalone search calls × price per search
    5. + standalone fetch calls × price per fetch

    For the examples below, the standalone search price is CNY 0.005 per call, based on the public reporting. Replace all token prices—and any unverified API prices—with the figures from the official pricing page.

    Count all input tokens

    Input-token usage includes more than the user’s question and retrieved text. It can include:

    • System prompts
    • The user’s question
    • Conversation history
    • Tool descriptions
    • Search results

    Leaving out system prompts or conversation history can materially underestimate costs.

    Use actual requests to establish a realistic baseline:

    1. Read input- and output-token counts from the model response’s usage field, commonly named usage.
    2. Group requests by workload, such as general Q&A, time-sensitive searches, and long-document analysis.
    3. Collect at least a few hundred requests for each workload. Calculate the average and the 90th percentile. Use the average for budgeting and the 90th percentile to help set alert thresholds.

    Worked example

    The following token prices are illustrative, not actual platform prices:

    • Input: CNY 2 per million tokens
    • Output: CNY 8 per million tokens

    Assume one answer uses 3,000 input tokens, 500 output tokens, and one standalone search call.

    Token cost:

    1. 3,000 × 2 / 1,000,000 + 500 × 8 / 1,000,000
    2. = CNY 0.006 + CNY 0.004
    3. = CNY 0.010

    Standalone search cost:

    1. 1 × CNY 0.005 = CNY 0.005

    Total:

    1. CNY 0.010 + CNY 0.005 = CNY 0.015

    With built-in search, assuming the same total input of 3,000 tokens and output of 500 tokens, the cost would be CNY 0.010. Under those assumptions, standalone search adds CNY 0.005 per answer.

    That conclusion depends on the token counts remaining equal. The following comparison uses the same illustrative prices:

    Scenario Total input tokens Output tokens Standalone search calls Cost per answer (CNY)
    Built-in search, 3,000-token input 3,000 500 0 0.010
    Built-in search, 6,000-token input 6,000 500 0 0.016
    Standalone search, 3,000-token input 3,000 500 1 0.015
    Standalone search, summary-only input of 1,500 tokens 1,500 500 1 0.012

    As more retrieved content enters the context, built-in search becomes more expensive. Conversely, passing only summaries from standalone search can reduce token charges.

    The amount of retrieved text sent to the model can matter more than the search request fee itself.

    Common estimation mistakes

    Avoid these assumptions:

    • Counting search fees but ignoring token charges. Both contribute to the total.
    • Treating the number of results as constant. Actual result counts may vary by query.
    • Ignoring retries. Retry behavior can affect cost, depending on billing rules.
    • Assuming a cache hit eliminates model token charges. Caching avoids repeated standalone API calls, but cached results still incur input-token charges when sent to the model.

    3. Choosing Between Built-In Search and Standalone APIs

    Public information reportedly indicates that a prerelease version of an unnamed open-source development framework, v0.2.2-rc.5, defaults to built-in search when configured with the platform discussed here and to a standalone Search API for other models.

    This behavior has not been verified. Check the project’s release notes and configuration documentation before relying on its defaults.

    Use the following three-step decision process.

    Step 1: Do you need to restrict sources or retrieve a specific page?

    For a known target URL, use the standalone Fetch API. Retrieving content by URL provides more control and makes caching straightforward.

    A site restriction and a known URL are not the same requirement. Confirm the relevant API’s documented source controls rather than assuming that a Fetch API performs site-wide search.

    Step 2: Do results need filtering, rewriting, or auditing before model processing?

    Use the standalone Search API. Your code can screen sources and process results before adding them to the model’s context.

    For general Q&A and time-sensitive questions, built-in search is the simpler starting point. It also avoids having to manage search retries yourself.

    If your budget is sensitive to unpredictable input-token usage, consider standalone search with a result-count limit such as top_k. Limiting the number of results improves control, although a result-count limit alone does not establish a fixed token ceiling because result lengths can vary.

    Routing and caching example

    The following Python code selects one of three routes and caches standalone search results.

    The cache key includes the API type, query, model name, and result count. Requests for the same query with different result limits therefore do not accidentally share an entry.

    1. import hashlib
    2. import json
    3. import time
    4. cache = {} # Use an external cache such as Redis in production
    5. TTL = 3600 # Cache lifetime in seconds; use a shorter TTL for freshness-sensitive queries
    6. def choose_route(need_filter: bool, target_url: str | None) -> str:
    7. if target_url:
    8. return "fetch" # Known page: use the standalone Fetch API
    9. if need_filter:
    10. return "search" # Pre-model filtering or auditing: use the standalone Search API
    11. return "builtin" # Default to model-integrated search
    12. def cache_key(kind: str, query: str, model: str, top_k: int) -> str:
    13. raw = json.dumps([kind, query, model, top_k], ensure_ascii=False)
    14. return hashlib.sha256(raw.encode("utf-8")).hexdigest()
    15. def get_search_results(query, model, top_k, call_search_api):
    16. key = cache_key("search", query, model, top_k)
    17. hit = cache.get(key)
    18. if hit and time.time() - hit["ts"] < TTL:
    19. return hit["data"] # Cache hit: no Search API call or search fee
    20. data = call_search_api(query, top_k) # Cache miss: make one billable search call
    21. cache[key] = {"data": data, "ts": time.time()}
    22. return data

    Keep these implementation details in mind:

    • Cache hit: Read the entry and check its age. If it has not expired, return the cached data without another standalone search call.
    • Cache miss: Call the API, store the result, and record a timestamp. The API call is billed according to the provider’s rules.
    • Token billing: Caching reduces API call counts. Results still count toward model input tokens when added to the context.
    • Model-specific keys: Including the model name keeps cache entries separate when switching models, at the cost of a potentially lower cache hit rate.
    • Expired entries: This example does not delete expired data. Long-running services should periodically remove expired entries to prevent continued memory growth.

    4. Compliance and Verification Checks

    Web retrieval compliance

    • Check the target site’s robots.txt rules and terms of service before fetching pages. Do not retrieve pages where crawling is prohibited.
    • Limit retrieval frequency to avoid placing excessive load on a single site.
    • Search results and webpage content may contain personal information. Consider that before storing content or writing it to logs.

    Verify pricing and defaults before deployment

    The reported pricing change, request price, and framework defaults should not be treated as confirmed production specifications. Check the official announcements, pricing pages, and relevant API documentation for:

    • The effective date and scope of the built-in search billing change.
    • The definition of a successful request.
    • Billing for empty results, failures, and retries.
    • Separate Search API and Fetch API rates.
    • Current framework defaults and configuration options.

    The central cost-control principle is to evaluate the full request, not just the search fee. Built-in search can simplify integration and remove a separate API charge, while standalone APIs provide more control over retrieval, preprocessing, and caching. The better choice depends on the resulting token usage as well as the per-call price.