Does web search count toward the limit?

Claude: yes, web search and web fetch count. Codex: OpenAI does not document web search separately; tool use and retrieval are listed as things that raise usage.

Codex

Not documented separately. Tool use and retrieval raise usage.

OpenAI's web search page says nothing about usage. The pricing page lists tool use and retrieval among the factors that affect usage, and there is no separate meter for search: what a search brings back becomes context, and context is what the window counts.

What the official docs say

Model choice, context, reasoning, tool use, retrieval, and caching all affect usage, so prompt length alone isn't a reliable estimate.
OpenAI Developers · Codex pricing

Claude

Yes. Web search and web fetch count toward your limits.

Fetching a long page costs far more than a search query, because the page text enters your context. Research runs many searches and consumes faster. The help article covers claude.ai; Claude Code does not document its WebSearch and WebFetch tools separately, and their tokens count like any other turn.

What the official docs say

Usage of web search and web fetch counts toward your usage limits.
Claude Help Center · Enable and use web search
asking Claude to summarize a 10,000-word article will use substantially more of your context window than a regular web search query.
Claude Help Center · Enable and use web search
Research sessions may consume tokens more quickly due to multiple searches and comprehensive analysis.
Claude Help Center · Manage usage credits for paid Claude plans

In practice

  • Ask for a search when you need a fact; ask for a fetch only when you need the page itself.

Quotes checked against the live docs on 2026-09-15.

Answers rest on official OpenAI and Anthropic documentation, quoted and linked on each page · Not endorsed by either.