LLM API web search pricing

Letting the model search the web usually costs a fee per search on top of tokens (DeepSeek bills only the tokens). Fees from each provider's official pricing page, checked 2026-11-28.

LLM API web search pricing
APIPer 1,000 searchesFree allowanceBilling notes
OpenAI web search (reasoning models also with web search preview)$10.00None listedBilled at the model's rates. gpt-4o-mini and gpt-4.1-mini: a fixed 8,000 input tokens per call
OpenAI web search preview, non-reasoning models$25.00None listedFree
Claude API web search tool$10.00None listedCounted as input tokens, also in later turns. A search that fails with an error is not billed
Gemini API Grounding with Google Search (Gemini 3 and newer)$14.00Paid tier: 5,000 searches a month, shared across Gemini 3 and newer modelsOne request can run several searches; each is billed. Default cap 1,500 searches a day per project. Gemini 4 models also bill the internal tool system instructions and function declarations used for grounding as tokens
xAI Grok API web search tool$5.00None listedInput, reasoning and completion tokens are billed at the model's rates on top of the fee
Kimi API web_search tool (Responses API)$5.00None listedCharged only when the server runs a search. Tokens billed at the model's rates. The separate search endpoint costs $2 per 1,000 calls ($3 for Search Pro); failed calls and empty results are not billed
DeepSeek API server-side web search$0No per-search fee since November 18, 2026 (12:00 Beijing time)Search results are added to the model context and billed as model tokens. The separate Search API costs $0.75 per 1,000 successful requests

Example: 1,000 searches cost $10 with OpenAI standard web search or Claude. On the Gemini paid tier the first 5,000 a month are free, then $14 per 1,000. With OpenAI standard web search and Claude, token costs for the search results come on top: estimate them in the calculator.

Other built-in tool fees

Other built-in tool fees
ToolFeeBilling notes
OpenAI file search, tool calls$2.50 per 1,000 callsResponses API only
OpenAI file search, storage$0.10 per GB per dayFirst 1 GB free
OpenAI containers (Hosted Shell, Code Interpreter)$0.03 (1 GB) to $1.92 (64 GB) per 20-minute session per containerEligible sessions are billed by the minute, 5-minute minimum per session
Claude code execution$0.05 per hour per container, after 1,550 free hours a month per organizationFree when the request includes web search or web fetch (2026-02-09 tool versions or later). 5-minute minimum. With files in the request, time is billed even if the tool is not called
Claude web fetchNo extra feeFetched content is billed as tokens
Gemini file search, indexingPaid tier, at embedding rates: $0.15 per 1M tokens (Gemini Embedding) or, with Gemini Embedding 2, $0.20 per 1M text tokens and $0.45 per 1M image tokens. Free tier: freeStorage and query-time embeddings are free. Retrieved document tokens are billed as input tokens at the model's rates

On OpenAI, tokens used by built-in tools are billed at the chosen model's per-token rates. OpenAI's GB is a binary gigabyte (1 GB = 2^30 bytes).

Gemini 2.5 models, paid tier: 1,500 grounded prompts a day free (Flash and Flash-Lite share one limit; Pro has its own), then $35 per 1,000. Sources: OpenAI · Anthropic · Google · Google file search · xAI · Kimi · DeepSeek · 2026-11-28