WebSearch
APIs
Submit an API
★ KEIRO20 = 20% off Keirolabs Keirolabs $0.03/1kSerper $0.30/1kZenserp $0.90/1kParallel $1.00/1kPerplexity $1.00/1kSearchApi $1.40/1kSerpApi $1.96/1kExa $4.00/1kBrave $5.00/1kLinkup $5.00/1kYou.com $5.00/1kTavily $5.00/1kOpenAI Web $10/1kClaude Web $10/1k Full price index →

Blog/Pricing

OpenAI web search API: pricing, limits and when a search API is cheaper

How OpenAI's web search tool is billed ($10 per 1,000 calls plus content tokens, or $25 for the preview on non-reasoning models), how Claude's compares, the hidden token cost, and when a standalone search API wins.

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.
$10Per 1,000 web search calls, OpenAI and Claude
8,000Tokens billed per call on the mini models
$25Preview tool on non-reasoning models
100×+Cheaper per search with a standalone lite API

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:

ToolPer 1,000 callsSearch content tokens
Web search (all models)$10Billed at the model’s input rate
Web search preview, reasoning models (gpt-5, o-series)$10Billed at the model’s input rate
Web search preview, non-reasoning models$25Free
Image web search$10Billed 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 with allowed_domains or blocked_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 optionPer 1,000 searchesWorks with any model
OpenAI web search$10 + content tokensNo
Claude web search$10 + tokensNo
Brave$5Yes
Exa lite$4Yes
Parallel fast$1Yes
Keirolabs lite$0.03–0.10Yes

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.

Topic hub

More on search apis for ai and agents

  1. Best web search APIs in 2026, ranked on two benchmarksStart here
  2. Web search in LM Studio and Open WebUI: free and paid setups, step by step
  3. How to search the web from Python: ddgs, googlesearch and 3 APIs (with code)
  4. Tavily MCP, Exa MCP and Keirolabs MCP: setup for Claude Code, Cursor and LM Studio
  5. Tavily vs Perplexity vs Exa: search API pricing, accuracy and which to pick
  6. Keirolabs: pricing, endpoints, benchmarks and how to start
  7. Exa vs Tavily: pricing, index, accuracy and which to pick
  8. Exa API pricing and API key: every endpoint, explained
  9. Tavily API key: get one free in 2 minutes, plus the real cost per search
  10. Web search APIs for AI agents: MCP servers, token costs and what actually matters
  11. Free web search APIs in 2026: every free tier, and how far it really goes
  12. What is a web search API? Types, prices and how to pick one (2026)
  13. Perplexity API pricing (Nov 2026): $5 per 1,000 searches, or $1 on Fast
  14. Tavily alternatives: 8 search APIs for AI agents, compared

Keep reading