# WebFetch Tool

> The tool that reads one web page and pulls out what Claude asked for.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** WebFetch, WebFetch(domain:...), Fetch a URL

## Think of it like

It is like a friend who reads a page and tells you the part you need.

## Definition

The WebFetch tool opens one web page and turns it into plain text. It then runs a short question about the page through a second, smaller model, and Claude gets that answer, not the whole page. So the result only holds what the question asked for. It reads up to 100,000 characters per call and keeps each page for 15 minutes. It will not open localhost. A rule like WebFetch(domain:example.com) allows one site.

## Example

Emma asks how a library's new option works. Claude fetches the library's docs page and asks it only about that option.

## Example code

```json
{"permissions": {"allow": ["WebFetch(domain:docs.python.org)"]}}
```

Let Claude read one docs site without asking.

## Why it matters

Claude can check the latest docs instead of guessing from old training.

## Common mistake

Trusting a no from it. If the page seems not to mention something, the question may have been too narrow. Ask again more exactly.

## Three principles

- **One page.** Turned into text.
- **A second model.** Pulls out the answer.
- **Allow by site.** WebFetch(domain:...).

## Related terms

- [WebSearch Tool](https://learn.benibix.com/term/ai/web-search-tool)
- [AI Search Engine](https://learn.benibix.com/term/ai/ai-search-engine)
- [Permission Rule](https://learn.benibix.com/term/ai/permission-rule)

## Told apart from

- [WebSearch vs WebFetch](https://learn.benibix.com/compare/web-search-tool-vs-web-fetch-tool): People often think WebSearch reads the pages it finds. It does not. WebSearch only brings back titles and links. To read a page, Claude has to call WebFetch on one link. WebFetch then opens that page and pulls out only the part Claude asked about. So a search finds where to look, and a fetch does the reading.

## Taught in

- [Bash, WebFetch and WebSearch](https://learn.benibix.com/learn/ai-claude-code/bash-webfetch-and-websearch): Claude Code, 10/16

![WebSearch returns titles and links. WebFetch opens one page, and a second model pulls out what was asked.](https://learn.benibix.com/diagrams/ct-web-tools.svg)

---

Source: https://learn.benibix.com/term/ai/web-fetch-tool
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
