Web Search Agent Cost per Task: Turn On Prompt Caching First, Then Cap Searches and Test Haiku 5.5
At $10 per 1,000 searches, the search fee is not what makes a prospect-research task cost $0.90. Re-sent search results billed as input tokens are, and one caching field fixes most of that before any model change.
Anthropic's web search tool costs $10 per 1,000 searches, so ten searches add only $0.10 to a prospect-research task. Most of a $0.90 task is the search results themselves, which the API bills as input tokens on every later step of the agent loop. The first thing to change is prompt caching: one field, no quality risk, and on Claude Opus 5.5 it bills those re-sent results at 5% of the input price, taking the $0.90 example task below to about $0.38. Getting under $0.15 then takes a search cap of about five and a cheaper model tier proven on your own eval set, after which the search fee becomes the largest cost left.
The figures in this article are list-price arithmetic on one stated task profile, with prices as Anthropic's pricing page lists them on November 17, 2026. They are not measured runs, and the field-level accuracy cost of each change on prospect research has not been measured. The method section below gives every assumption, and a logging snippet lets you replace the assumptions with your own agent's numbers.
Where $0.90 goes: the search fee is the small part
Anthropic's web search documentation states the billing rule that drives agent cost: search results "are counted as input tokens, in search iterations run during a single turn and in subsequent conversation turns." The docs also say that with basic web search "every search result is loaded into Claude's context window, and much of that content can be irrelevant to the request."
In a loop, that means a result fetched at step two is paid for again at steps three, four and every step after. The input bill grows roughly with the square of the number of steps, while the search fee grows in a straight line.
Take a prospect-research task that starts from a 2,000-token system prompt and task description, runs ten searches (one per model call), adds 2,800 tokens of results per search and ends with a final answer: eleven model calls in all. The first call sends 2,000 tokens; the last sends 30,000. Across the eleven calls the agent sends 176,000 input tokens, although only 30,000 of them are unique.
On Claude Opus 5.5, which Anthropic's pricing page lists at $4 per million input tokens and $20 per million output, that task costs:
- Input: 176,000 tokens at $4 per million, $0.704
- Output: 5,000 tokens at $20 per million, $0.10
- Searches: 10 at $0.01, $0.10
The total is $0.904. Input is 78% of it; the searches are 11%. Your own split will differ, but the shape is general: if the agent carries raw results forward, tokens dominate, and most of those tokens are repeats.
Why caching comes before the model switch
The obvious lever is the model tier, since Haiku 5.5 lists at $0.10 per million input tokens, a fortieth of Opus 5.5. But a model switch carries a quality risk you cannot price until you have run an eval. Caching changes nothing about what the model sees.
Anthropic's tool-use caching docs describe a behaviour that depends on one setting. When a request has prompt caching enabled and Claude uses a server tool such as web search, "the API automatically places a cache breakpoint on the server tool result before running the next iteration of the agentic loop," so later iterations read the growing prefix from cache. The same page adds the condition: "This behavior only applies when your request already has at least one cache_control marker. Requests without prompt caching do not receive the automatic breakpoint." An agent that never set cache_control pays full input price for every re-sent result.
Turning it on is one top-level field. The prompt caching docs say automatic caching moves the breakpoint "to the last cacheable block in each request," so a growing message history is cached without moving markers by hand. The minimum cacheable prompt on Opus 5.5, Sonnet 5.5 and Haiku 5.5 is 512 tokens, and the default cache lives five minutes, refreshed free on each use, which covers a task that runs in a few minutes.
The pricing makes this unusually strong on the current models. Cache hits on Opus 5.5 and Sonnet 5.5 cost 0.05 times the base input price, against 0.1 times on other models, while five-minute cache writes cost 1.25 times. In the example, each call writes only its new tokens and reads the rest: 30,000 tokens written and 146,000 read. On Opus 5.5 that is $0.150 in writes and $0.029 in reads, so input falls from $0.704 to $0.179 and the task from $0.904 to $0.379.
That also changes what drives the bill. Once re-sends are nearly free, cost follows the unique tokens that enter the context, which is why the next levers aim at how much each search brings in.
Cap the searches, then plan the sources
Anthropic's docs say single-fact queries "typically use 1–3 searches; comparative or multientity research can use 10 or more." Prospect research has a known shape: company, person, recent news, funding. A max_uses of four to six enforces it. Failed searches count against the limit, and once it is hit the tool returns a max_uses_exceeded error instead of running.
With five searches, the example drops to six calls whose prompts grow from 2,000 to 16,000 tokens, and the Opus 5.5 task with caching costs $0.238: $0.080 in cache writes, $0.008 in reads, $0.10 in output and $0.05 in searches.
A source plan in the prompt, with allowed_domains where the useful sources are fixed, keeps the five searches on pages that answer the fields you need. The docs allow either allowed_domains or blocked_domains, not both, and return a 400 error if a request includes both. What a source plan saves depends on how often your agent now searches off-target, which only your logs show.
Choosing the tier, with the eval first
Opus 5.5 with caching and a cap still costs more than $0.15, mostly because its output price is $20 per million. Two tiers get under the target on the same five-search profile:
| Configuration (5 searches, caching on) | Tokens | Searches | Cost per task |
|---|---|---|---|
| Opus 5.5 | $0.188 | $0.05 | $0.238 |
| Opus 5.5 through the Batch API | $0.094 | $0.05 | $0.144 |
| Sonnet 5.5 | $0.094 | $0.05 | $0.144 |
| Haiku 5.5 | $0.005 | $0.05 | $0.055 |
| Sonnet 5.5 plans and writes, Haiku 5.5 researches | $0.033 | $0.05 | $0.083 |
On Haiku 5.5 the token cost almost disappears and the search fee is 91% of the task. On Sonnet 5.5 the task lands at $0.144, just under the target, with no margin for longer outputs.
Anthropic's model guide lists Haiku 5.5 for "high-volume intelligent processing, cost-sensitive deployments needing strong reasoning, subagent tasks," and says that when changing models "having a good evaluation set is the most important step." For an SDR agent that means 50 prospects from past runs with known-good values for each field you use, such as company size, the contact's role and recent funding, scored field by field before and after the switch. The same guide says "tuning effort is often a better lever than switching models"; the effort parameter trades intelligence for latency and cost within one model, and Opus 5.5 and Haiku 5.5 default to medium. Changing effort partway through a session can invalidate the message cache, so set it once per task.
The Batch API route keeps Opus 5.5 but only fits work that need not be real-time. Batch halves token prices and stacks with the cache discount, but the search fee is unchanged, and Anthropic's docs say the Batches API throttles web search per organization, "so large batches with many searches might take longer to complete."
Per-step routing: a small model for the bulk, a larger one for judgment
The last row of the table splits the task. Sonnet 5.5 plans the research (2,000 tokens in, 500 out, $0.009), Haiku 5.5 runs the five searches and fills a structured note ($0.054, of which $0.05 is search fees), and Sonnet 5.5 writes the final brief from that note rather than from the raw history ($0.020). The total is $0.083, between Haiku alone and Sonnet alone.
Anthropic's guide to combining models reports two internal results that bound the expected trade. Adding Haiku 5.5 subagents to Opus 5.5 on a coding benchmark "cut cost per attempt by 32% and the pass rate by about 4 percentage points." Sonnet 5.5 subagents under Opus 5.5 on a defect-search benchmark cost "about a third less" and "scored about the same." The same page carries a warning that fits single-prospect research closely: when the work "is one dependent chain, or fits in a single context without a long cost tail, the orchestrator's model alone at lower effort came out ahead in every case measured on earlier models." Anthropic calls these results directional and tells readers to measure on their own workload. For prospect research, whether routing beats a single model at lower effort has not been measured.
Parsec, a small language model lab, offers a managed version of the small-model route: according to its comparison page it routes per turn rather than per task, deploys models post-trained on the customer's own traffic that the customer owns, and gives a first post-trained model in about four weeks, a figure the page states without a baseline. Its inference page says requests the customer's model is not confident about go to a closed frontier model. Parsec publishes no price for this service and no figures for prospect-research agents.
Three traps once the obvious savings are taken
The 100,000-token price step on Haiku 5.5. Anthropic prices Haiku 5.5 by prompt length: a request whose prompt is over 100,000 tokens pays five times as much on every token category, and the prompt length "counts all of its input tokens, including cache reads and cache writes." Caching does not protect you. The five-search example peaks at 16,000 tokens, far below the line, but web fetch changes that quickly: Anthropic's fetch docs put a large documentation page at about 25,000 tokens, so three such fetches push a Haiku loop over the threshold. Set max_content_tokens on web fetch, which has no per-call fee, so its cost is all tokens.
Context editing breaks the cache it sits on. Anthropic's clear_tool_uses_20250919 strategy (beta header context-management-2025-06-27) clears old tool results once the prompt passes a trigger, but its docs say it "invalidates cached prompt prefixes when content is cleared" and tell you to use clear_at_least so the clearing is worth the re-write. Its default trigger is 100,000 input tokens, the same point at which Haiku 5.5's higher prices start, so on Haiku a lower trigger is needed for clearing to help. For a short research task, handing a structured note to the next step does the same job without a cache break.
Dynamic filtering can raise cost. With web_search_20260209 or later, Claude writes code that filters results before they enter the context, and Anthropic's pricing page says that code execution is free when used with web search. Anthropic's February 17, 2026 announcement reported an average 11% better performance on 24% fewer input tokens, but "price-weighted tokens decreased for Sonnet 4.6 on both benchmarks but increased for Opus 4.6." Test it on your queries; on Haiku 5.5, where tokens are already under a cent per task, the most it can save is small.
One accounting note: Anthropic's pricing page says Claude 4.7 and later models use a tokenizer that produces about 30% more tokens for the same text than Sonnet 4.6 and earlier. If your $0.90 was measured on Sonnet 4.6, re-measure token counts on the new model before trusting any projection.
Method, and the snippet to reproduce the split
Every figure above uses Anthropic's list prices as of November 17, 2026: Opus 5.5 at $4 input, $5 five-minute cache write, $0.20 cache hit and $20 output per million tokens; Sonnet 5.5 at $2, $2.50, $0.10 and $10; Haiku 5.5 at $0.10, $0.125, $0.01 and $0.50 for prompts up to 100,000 tokens; web search at $10 per 1,000. The task profile is a 2,000-token starting prompt, 2,800 tokens of results per search, one search per model call, a final answer call and 5,000 output tokens (4,000 for the Haiku research step in the routed version). Cached runs assume every call reads the previous prefix and writes only its new tokens.
To get your own split, log one row per API request:
import csv
import anthropic
# USD per million tokens, Anthropic list prices as of Nov. 17, 2026 (5-minute cache writes)
PRICES = {
"claude-opus-5-5": {"input": 4.00, "write": 5.00, "read": 0.20, "output": 20.00},
"claude-sonnet-5-5": {"input": 2.00, "write": 2.50, "read": 0.10, "output": 10.00},
"claude-haiku-5-5": {"input": 0.10, "write": 0.125, "read": 0.01, "output": 0.50},
}
SEARCH_FEE = 10 / 1000 # $10 per 1,000 searches
def log_usage(writer, task_id, step, model, usage):
read = usage.cache_read_input_tokens or 0
write = usage.cache_creation_input_tokens or 0
stu = getattr(usage, "server_tool_use", None)
searches = (stu.web_search_requests or 0) if stu else 0
prompt = usage.input_tokens + read + write
p = PRICES[model]
# Haiku 5.5 bills every token category at 5x when the prompt exceeds 100,000 tokens
mult = 5 if model == "claude-haiku-5-5" and prompt > 100_000 else 1
tokens_usd = mult * (usage.input_tokens * p["input"] + write * p["write"]
+ read * p["read"] + usage.output_tokens * p["output"]) / 1e6
writer.writerow([task_id, step, model, usage.input_tokens, read, write,
usage.output_tokens, searches, prompt,
round(tokens_usd, 5), round(searches * SEARCH_FEE, 5)])
client = anthropic.Anthropic()
MODEL = "claude-haiku-5-5"
with open("usage.csv", "a", newline="") as f:
w = csv.writer(f)
resp = client.messages.create(
model=MODEL, max_tokens=4096,
cache_control={"type": "ephemeral"}, # automatic caching of the growing prefix
tools=[{"type": "web_search_20260209", "name": "web_search", "max_uses": 5}],
messages=[{"role": "user", "content": "Research the prospect: ..."}],
)
log_usage(w, "prospect-001", 1, MODEL, resp.usage)
Twenty logged tasks show whether your bill is re-sent input, unique input, output or searches, and which section above to start with. If you use one-hour cache writes or US-only inference, adjust the prices: Anthropic bills one-hour writes at twice the input price and US-only inference at 1.1 times.
Bottom line
If the agent sends no cache_control today, add it first; on an Opus 5.5 loop that alone cuts the example from $0.90 to $0.38 with no change in output. If you need the answer in real time, cap searches at about five and move to Sonnet 5.5 for about $0.14, or to Haiku 5.5 for about $0.06 once a 50-prospect eval shows its fields hold up. If the work can wait and Opus quality is the requirement, the Batch API brings the capped, cached Opus task to about $0.14. Whatever you choose, keep every Haiku request under 100,000 tokens, and expect the search count, not the model, to be the lever that is left.
Sources
- Anthropic, Pricing: https://platform.claude.com/docs/en/about-claude/pricing
- Anthropic, Web search tool: https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool
- Anthropic, Improved web search with dynamic filtering (February 17, 2026): https://claude.com/blog/improved-web-search-with-dynamic-filtering
- Anthropic, Web fetch tool: https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool
- Anthropic, Context editing: https://platform.claude.com/docs/en/build-with-claude/context-editing
- Anthropic, Prompt caching: https://platform.claude.com/docs/en/build-with-claude/prompt-caching
- Anthropic, Tool use with prompt caching: https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-use-with-prompt-caching
- Anthropic, Choosing the right model: https://platform.claude.com/docs/en/about-claude/models/choosing-a-model
- Anthropic, Optimizing for cost and intelligence: https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence
- Parsec vs routers: https://parseclab.ai/compare/routers/
- Parsec, Inference: https://parseclab.ai/inference/