Search API Cost: What a Web Search Really Costs
A search costs a fraction of a cent. A search that returns ten pages of text into a prompt costs several cents, every time, for every user, forever. Here is where the money actually goes.
Ask a team how much their search costs and they will tell you the price of the search API. That number is almost always the smallest line in the invoice, and it is almost never the one that matters.
The arithmetic nobody runs
Take a support agent that answers with a web search. It runs three searches per question and reads five pages, then pastes everything into the model. Here is the shape of the cost, with prices you can substitute your own into:
- Three search calls at a few dollars per 1,000: roughly $0.01
- Five pages of body text, say 4,000 tokens each: 20,000 tokens
- The model's own answer, plus the question and the conversation around it: another 2,000 tokens
- At a typical frontier price, those 22,000 tokens are an order of magnitude more expensive than the search
Now scale it. Ten thousand questions a month is 220 million tokens of context - and that is the number nobody can attribute to the search feature, because it arrives on the model's invoice labelled "input tokens" and everybody assumes the chat feature caused it.
Cost one: context you did not need
This is the big one. Naive search reads pages because reading is what the tool does, not because the answer needs it. The agent fetches five pages to answer a question that the first three lines of one of them would have answered.
The fix is to make the summary the default and the page the opt-in. A summary is 600-800 characters and usually answers the question; a page body is thousands of tokens and usually does not. In AgentSearch this is one boolean:
{"query": "how does a Kubernetes rolling update work", "limit": 5, "need_content": false}
With need_content: false (the default) each result carries the summary. With need_content: true it carries the page body instead. A well-built agent asks for the body only for the one result it is going to quote - typically one page, not five. That single change is usually a five to ten times reduction in context, with no loss of answer quality, because the summary was already the dense read.
Cost two: calls you made twice
Agents re-search. Not because they are stupid - because the first search returned something that did not quite answer the question, and the agent has no way of knowing that until it reads. Every re-search is another round trip of latency and another bill.
Two things cut this. The first is the search syntax: a vague query gets you vague results, and a vague result gets re-searched. Writing after:2026-01-01 or site:docs.example.com in the first query frequently saves the second one entirely.
The second is a cache. AgentSearch caches a search for five minutes, keyed by the query, the result count and whether the body was requested - so the same question asked twice in a conversation does not run the search twice. Note that the cache does not change what the caller is charged for reading: the caller reads the same text either way, so the saving is ours, not theirs. That is the honest way to count it.
Cost three: pages that cost more than they add
Reading a page is not free even when the search is. It costs latency - a page read can take a second - and it costs a place in the context window. A page with 200,000 characters of boilerplate, navigation and cookie banners costs you the same as a page with 2,000 characters of the actual answer.
AgentSearch's Fetch caps what comes back at 20,000 characters by default, and the text is extracted rather than raw markup, so the boilerplate never enters the context. The part worth designing for is the choice of which pages to read: filter on quality first, read second.
hits = search(question, limit=10)["results"]
worth_reading = [h for h in hits if h["quality_score"] >= 0.75][:2]
bodies = [fetch(h["url"])["text"] for h in worth_reading]
That is ten searches' worth of ranking, two pages' worth of reading, and a fifth of the context of the naive version.
The cost nobody puts on the invoice
The most expensive thing about naive search is not measurable on a statement, and it is this: a citation you cannot verify is worse than no citation. When the model quotes a snippet it never read in full, the quote may not be in the page at all. When the page has no date, the model guesses one. When two pages disagree and neither carries a publication date, the model picks whichever read better.
The fix is not a better prompt. It is giving the model fields it can cite: published_date as a real UTC timestamp, url as the source of truth, and a quality score so it can refuse to cite a weak page. An answer that says "I could not confirm this - the sources I found were from 2023" is worth more than a confident wrong answer, and getting there costs one extra field.
How to measure it yourself
Four numbers, logged per answer:
| What to log | Why |
|---|---|
| Searches per answer | Above three, your queries are too vague - the syntax is the fix |
| Pages read per answer | Above two, you are reading instead of reading selectively |
| Result tokens per answer | The size of what you handed the model - the number that actually moves the bill |
| Cache hit rate | A falling rate after a release usually means the agent started phrasing queries differently |
Note the third one. Many dashboards call it "tokens consumed", which invites the assumption that the model generated them. It did not - it is the size of the text it was given. AgentSearch reports it as Result Tokens for exactly that reason: it is what the results cost you to read.
What it costs to run
- Free - 100 searches and 20 fetches per month, 2 requests per second
- Pro, $9/month - 3,000 searches and 1,000 fetches per month, 20 requests per second
- Team, $79/month - 30,000 searches and 10,000 fetches per month, 50 requests per second
A call beyond the allowance is priced at $2.5 per 1,000 on each meter and still served - an overage never interrupts a running agent. Annual billing is two months free.
The cheapest change is a boolean
Before you change anything else, set need_content to false and log your result tokens for a week. Most teams find the number drops by more than half without touching a single prompt.
Related: putting search in production, and adding search to an AI agent.