Definition
Search API cost per context window is the total API expense incurred to fill an AI agent's context with search-grounded data for a single task, including multiple queries, result parsing, and follow-up searches.
In Depth
A single agent task rarely involves just one search query. A research task might require 3-5 searches: an initial broad query, 2-3 refinement queries, and a verification query. The cost per context window captures the total search API spend for one complete agent interaction. Calculation: cost_per_window = avg_queries_per_task * cost_per_query. At Scavio's $0.005/credit, a typical 4-query research task costs $0.02 per context window. At Tavily's Researcher tier ($30/mo for 1,000 requests), the same task costs $0.12. At Perplexity Sonar ($5-12/1K requests), it costs $0.02-0.048. At Brave's $5/1K queries, it costs $0.02. This metric matters because LLM inference costs dominate agent budgets, and search is the second-largest cost center. Optimizing search cost per context window involves: reducing redundant queries (cache recent results), using structured responses to minimize follow-up searches, and choosing APIs that return rich data in a single call. Scavio's structured responses with AI Overview, Knowledge Graph, and People Also Ask data often reduce the need for follow-up queries, effectively lowering cost per context window below the per-query price.
Example Usage
An agent framework benchmarked search cost per context window across providers. With Tavily, the average task used 4.2 queries ($0.126/window). With Scavio, structured SERP data reduced average queries to 2.8 ($0.014/window) because AI Overview and PAA data answered follow-up questions in the initial response.
Platforms
Search API Cost per Context Window is relevant across the following platforms, all accessible through Scavio's unified API:
Related Terms
Agent Search Budget Calculator
An agent search budget calculator is a formula that estimates monthly search API costs for AI agents based on daily acti...
Free Search API Tier Comparison
A free search API tier comparison is a side-by-side evaluation of the remaining no-cost search API options in 2026, meas...