Free tool

Web search API cost per agent task: price the window too

Pick the search APIs the agent calls. Enter searches, results, and the model. The page returns the call fee and the token cost of the tool definition plus the results you said it keeps.

Call prices were read November 13, 2026 from each vendor’s pricing page. A price this page could not re-read is not in the table. The worked comparison of list prices, limits, and MCP servers is Best web search tool for Claude and OpenAI agents, November 2026.

Loading the calculator.

What does one web search cost per agent task?

Two numbers, added. The vendor’s fee for the search, then the model’s price for the tool JSON and for the text that comes back.

At the starter inputs, gpt-5, 2 searches, 5 results, 400 tokens a result, 0 output tokens, and no free allowance, OpenAI web_search is $0.025 a task and $15.01 over 30 days at 20 tasks a day. Tavily basic pay as you go, on the same inputs, is $0.0221 a task. The gap is the $0.01 OpenAI call against Tavily’s $0.008, plus Tavily’s 862-token search schema against OpenAI’s 8-token declaration. Change 400 and the gap moves.

Which dollars are the call, and which are the context window?

The call is the published price per search. The window is input tokens times the model’s input rate, once per task.

Input tokens are the tool definition, counted once, plus searches times results times the token count you enter. Output tokens start at 0 because this page does not guess an answer length. A loop that resends the tools array on every model call pays the definition again. This page does not guess how many model calls sit inside the task. The November 11 measurement of those definitions is Brave's MCP tool list is 25,495 tokens. Web search alone is 1,400.

  • OpenAI, read November 13, 2026: $10.00 per 1,000 calls, plus search-content tokens at model rates. The web search guide still tells new integrations to send {"type":"web_search"}. Preview on non-reasoning models is $25.00 per 1,000 and the content tokens are free, so that mode zeroes the result tokens.
  • Anthropic, read November 13, 2026: $10 USD per 1,000 searches, plus tokens for search-generated content. A failed search is not billed. Citation fields do not count. The tool page examples use web_search_20260318.
  • Tavily: basic is 1 credit, advanced is 2, pay as you go is $0.008 a credit. The credit count does not grow with the result count.
  • Exa lite is $4 per 1,000 for the first 10 results. Each result past 10 is $1 per 1,000 results. Auto and fast are $7 per 1,000 on the same shape.
  • Brave Search is $5 per 1,000 requests. The result count does not change that request price.
  • Perplexity’s Search API is $5 or $1 per 1,000 requests and adds no model tokens of its own. Agent API web_search is $2.50 or $1 per 1,000 invocations, and this page prices that row’s result text at perplexity/sonar.
  • SerpAPI is a monthly plan. Starter is $25 for 1,000 searches. The page does not print a price for search 1,001.

What changes when the task fetches more results?

On Exa, result 11 starts a second meter. On the other APIs in this table, more results change the token line, not the call fee.

OpenAI, Anthropic, Tavily, Brave, Perplexity, and SerpAPI price the request. Extra URLs still land in the window if you keep them, at the tokens-per-result figure you entered. Exa’s page is the exception: the base price stops at 10 results. Gemini 3 is the other exception, and it runs the other way. The grounding guide bills each query, and the pricing page excludes the retrieved tokens. A wider result list does not move that row. A second query does. Queries past 1,500 a day are outside the published cap and are left unpriced.

Which vendors are missing, and why?

Parallel, Firecrawl, Linkup, You.com, Jina, and Serper are not in the calculator. Their November 12 prices were not re-read on November 13, so they are left out.

The November 12 dataset that does include them is the web search tools report. The rate card from November 11, including Serper’s $1 pack, is Claude and OpenAI web search both cost $10 per 1,000. Chat products, as opposed to these APIs, are Best AI agent for web search. Which tool belongs in a harness is What is the best web search tool for an AI agent harness? and the 8-token and 17-token declarations.

What should you open next?

Price the rest of the task, then pick the framework that will hold the tool.

The starter example uses 2 searches and 400 tokens a result. Canonical URL: https://www.aiagentsinfo.com/tools/web-search-api-cost-per-agent-task

What do buyers ask before they attach web search?

The answers are the vendor pages read November 13, 2026, plus token counts this site measured. They are not your invoice.

What does one web search cost an agent per task?

The call fee plus the tokens that stay in the context window. On the pages read November 13, 2026, OpenAI web_search and Anthropic web search are each $10 per 1,000 successful searches. Tavily basic pay as you go is $0.008 a request. Exa lite is $4 per 1,000 for up to 10 results. The tokens are a separate line, priced on the model you pick.

Which part is the tool definition, and which part is the results?

The tool definition is the JSON that stays loaded so the model can call search. OpenAI’s one-element tools array is 8 tokens and Anthropic’s web_search_20260318 array is 17, recounted November 13, 2026 with tiktoken o200k_base. Brave’s search tool was 1,400 tokens, Tavily’s search tool 862, and Exa’s search-only list 348, measured November 11 and not remeasured. Result tokens are whatever you type. This page does not invent a snippet length.

Does Gemini grounding bill the pages it retrieves?

Google’s Gemini pricing page, read November 13, 2026, says Search Grounding retrieved tokens are excluded. This calculator adds the $14 per 1,000 query fee for Gemini 3 and newer, and it does not add result tokens on that row. The grounding guide says Gemini 3 bills each query the model runs. Gemini 2.5 is a different row, $35 per 1,000 grounded prompts.

Why can a cheaper API cost more per task?

A $1-per-1,000 result list still has to be read by a model. Two searches that return five 400-token snippets are 4,000 input tokens before the tool definition. On gpt-5’s standard rate that text is the larger line once the call itself is only a fraction of a cent. The hosted $0.01 call can be cheaper than a cheap API plus a long page.

How is the month calculated?

Thirty days times tasks per day. That is the same window as the AI agent cost calculator. It is not a calendar month. SerpAPI is a subscription: if the month’s searches fit in the plan, you pay the plan price, not the divided rate. Searches past the plan are not priced, because SerpAPI’s page does not print an overage.

Is what I type stored?

No. The calculation stays in the browser. The share link puts the inputs in the address bar. This site does not receive the form, and there is no email field.