TL;DR
- OpenAI's web search tool costs $10 per 1,000 calls plus search content tokens at the model's rate. The preview on non-reasoning models is $25 per 1,000 with content tokens free.
- On gpt-4o-mini and gpt-4.1-mini, each call bills a fixed 8,000 input tokens of search content.
- Claude's web search is also $10 per 1,000, and results count as input tokens on every later turn.
- In a loop, a standalone API is far cheaper: Keirolabs lite is $0.03–0.10 per 1,000 and works with any model.
Turning on web search inside OpenAI’s or Anthropic’s API is the fastest way to give a model fresh information: one tool in the request and you’re done. It’s also, call for call, one of the most expensive ways to search the web. Here’s exactly how it’s billed and when to use something else.
How OpenAI’s web search is priced
From OpenAI’s pricing page, November 5, 2026:
| Tool | Per 1,000 calls | Search content tokens |
|---|---|---|
| Web search (all models) | $10 | Billed at the model’s input rate |
| Web search preview, reasoning models (gpt-5, o-series) | $10 | Billed at the model’s input rate |
| Web search preview, non-reasoning models | $25 | Free |
| Image web search | $10 | Billed at the model’s input rate |
Two details that matter:
- On gpt-4o-mini and gpt-4.1-mini with the non-preview tool, search content is billed as a fixed 8,000 input tokens per call, whatever comes back.
- There’s also a dedicated gpt-5-search-api model at $1.25 per million input tokens and $10 per million output.
How Claude’s web search compares
From Anthropic’s web search tool docs:
- $10 per 1,000 searches, plus standard token costs.
- Results count as input tokens, both in the turn they’re fetched and in later turns of the conversation.
- Failed searches aren’t billed. You can cap searches with
max_uses, and limit sources withallowed_domainsorblocked_domains. - Newer tool versions can filter results with code before they reach the context window, which cuts tokens on search-heavy requests.
The real cost: search fee plus tokens
One search on a mini model: $0.01 (search) + 8,000 tokens of content. At $0.15 per million input tokens that’s another $0.0012, so about $11.20 per 1,000 searches. On a larger model at $2.50 per million, the same 8,000 tokens cost $0.02, making it $30 per 1,000. And in a multi-turn chat, the content gets re-read every turn.
When built-in search is the right call
- Prototypes. One line, no new vendor, no new key.
- Low volume. A few hundred searches a day won’t hurt.
- You want the model to decide when to search and don’t mind paying for that convenience.
When a standalone search API wins
- Agents and loops, where you make thousands of searches.
- You want to control what the model reads: fewer results, excerpts, or text only for the pages that matter.
- You might switch models. Built-in search is locked to its model; a search API works with any.
- You want to cache or reuse results, or show them in your own UI.
| Search option | Per 1,000 searches | Works with any model |
|---|---|---|
| OpenAI web search | $10 + content tokens | No |
| Claude web search | $10 + tokens | No |
| Brave | $5 | Yes |
| Exa lite | $4 | Yes |
| Parallel fast | $1 | Yes |
| Keirolabs lite | $0.03–0.10 | Yes |
The swap I’d make in any agent past the prototype stage: give the model a search tool backed by Keirolabs instead of the built-in one. Lite search is 100× or more cheaper per call, /api/v2/answer gives cited answers for $0.89–2.67 per 1,000 if you want the “search and summarize” behaviour, and the MCP server plugs straight into tools like Codex and Claude Code. Through Black Friday, KEIRO20 takes 20% off: pricing.
A minimal function-calling tool backed by a search API:
import os, requests
def web_search(query: str) -> list[dict]:
r = requests.post(
"https://api.keirolabs.cloud/api/v2/search/fast",
headers={"Authorization": f"Bearer {os.environ['KEIRO_API_KEY']}"},
json={"query": query},
timeout=20,
)
r.raise_for_status()
return r.json()
Register it as a tool with OpenAI or Claude, and the model calls your search. You decide how many results it sees and how much text comes back.
FAQ
Does OpenAI have a web search API?
Yes, as a built-in tool in the Responses API (and the Chat Completions search models). It’s billed per call plus content tokens.
How much does ChatGPT’s web search cost through the API?
$10 per 1,000 calls plus content tokens, or $25 per 1,000 for the preview tool on non-reasoning models with free content tokens.
Is Claude’s web search cheaper than OpenAI’s?
The per-search fee is the same, $10 per 1,000. Total cost depends on tokens, so it varies by model and how many results come back.
What’s the cheapest way to add web search to an LLM?
Call a standalone search API as a tool. Keirolabs lite is $0.03–0.10 per 1,000. Compare everything in the calculator, and see search APIs for AI agents.