# Web search tool

> Canonical: https://skillalmanac.com/glossary/web-search-tool | Last verified: 2026-11-24 | Index status: not offered to search engines

A web search tool is a tool an AI model can call to look things up on the web during a conversation. The model gets search results back and writes an answer from them. Anthropic's and OpenAI's versions return citations.

Also called: AI web search, LLM web search, search tool AI, grounding with search.

## In plain language

A language model only knows what was in its training data, which has a cutoff date. A web search tool lets it look something up, like today's price or a recent announcement, the way you would open a search engine. The model decides whether to search, reads what comes back and writes an answer, often with links to the pages it used. It can still go wrong: search results can be thin, outdated or wrong, and the model may read them badly. Searching also costs money. Anthropic lists a per-search charge on top of normal token costs. Open the cited pages for anything that matters.

## Technical definition

In Anthropic's API, web search is a server tool added to the tools array of a Messages request. Claude decides when to search, the API runs the searches and provides the results, and the final reply carries citations. Anthropic's documentation says "citations are always enabled", that max_uses limits the searches in a turn, and that allowed_domains or blocked_domains filter results. On 2026-11-24 its page listed web search at 10 USD per 1,000 searches on the Claude API, plus standard token costs. OpenAI's web search is enabled through the tools array of a Responses API request, and its documentation says responses include inline citations by default.

## How it shows up when you use agents

In a session, a search tool is what lets an agent answer questions about things that changed after its training. Anthropic's documentation says Claude searches when a request depends on information that is current, changing or outside its training data, and answers directly for stable knowledge. You can steer this through the system prompt and cap it with a search limit. Search results count as input, so a search-heavy task uses more [tokens](/glossary/token) and, on Anthropic's API, adds a per-search charge.

In Claude Code, the approval prompt is where you see a search happen. According to the Claude Code permissions documentation, WebFetch and WebSearch require approval by default.

What breaks when it is misunderstood: people treat a cited answer as a verified answer. A citation shows where a claim came from, not that the page is right. A search tool also differs from [retrieval-augmented generation](/glossary/retrieval-augmented-generation): search queries the open web at request time, while RAG retrieves from documents you chose.

Next action: for any claim you will act on, open the cited page, check its date and read the sentence the model relied on. For repeatable research, the [Cited Deep Research](/skills/skill-almanac/cited-deep-research) skill logs each source and quote.

## Common confusions

- **Web search tool versus a browser.** A search tool returns results to the model. It is not a person browsing a site.
- **Search versus knowledge.** A model that does not search answers from training data. A model with search can read newer pages, and it can also read bad ones.
- **Citation versus verification.** OpenAI's documentation says responses include inline citations by default. A link is a pointer, not a check.
- **Search versus RAG.** Search queries the public web. RAG retrieves from a store you control. Both put text in front of the model before it answers.

## Worked examples in this catalogue

### [cited-deep-research](https://skillalmanac.com/skills/skill-almanac/cited-deep-research)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A skill that runs research as an auditable procedure so every claim traces to a logged source and quote, then checks it by script.

Why it exercises the concept: Search results are only useful if you can trace a claim back to a page. This skill is a procedure for that tracing.

### [sourced-market-research](https://skillalmanac.com/skills/skill-almanac/sourced-market-research)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A skill for competitor and market research in which every figure traces to a source marked opened, snippet or unverified.

Why it exercises the concept: It separates a page the agent opened from a search snippet it only saw, which is a practical limit of any search tool.

### [Claude Code](https://skillalmanac.com/tools/claude-code)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The what-is-claude-code guide says WebFetch and WebSearch prompt for approval by default in Claude Code.

Why it exercises the concept: Claude Code has web tools of its own, and by default it asks you first, so a search is a decision you can see in the session.

## Related terms

- [Tool calling (function calling)](https://skillalmanac.com/glossary/tool-calling.md)
- [Retrieval-augmented generation (RAG)](https://skillalmanac.com/glossary/retrieval-augmented-generation.md)
- [AI agent](https://skillalmanac.com/glossary/ai-agent.md)
- [AI hallucination](https://skillalmanac.com/glossary/hallucination.md)
- [Large language model (LLM)](https://skillalmanac.com/glossary/large-language-model.md)

## Sources

- [Web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool), Anthropic (Claude Docs) (accessed 2026-11-24)
- [Web search](https://developers.openai.com/api/docs/guides/tools-web-search), OpenAI (API Docs) (accessed 2026-11-24)
- [Configure permissions](https://code.claude.com/docs/en/permissions), Anthropic (Claude Code Docs) (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-24. [Glossary index](https://skillalmanac.com/glossary.md).
