Skip to main content
The --web-fetch flag enables URL content retrieval and analysis using Anthropicโ€™s native web fetch capability.

Quick Start

Web Fetch Demo

Usage

Basic Web Fetch

Expected Output:

Combine with Other Flags

Requirements

Web Fetch is only available with Anthropic models. It will not work with other providers.

YAML Equivalent

Use web_fetch: true on an agent with an Anthropic model:
Web Fetch requires an Anthropic model - the same requirement applies to YAML configurations.

How It Works

  1. Enable: The --web-fetch flag activates Anthropicโ€™s URL fetching
  2. Fetch: Claude fetches the content from the specified URL
  3. Parse: Content is parsed and cleaned
  4. Analyze: Claude analyzes the content based on your prompt
  5. Respond: Synthesized response is returned

Use Cases

Summarization

Data Extraction

Content Analysis

Documentation Review

Programmatic Usage

Best Practices

Use Web Fetch when you have a specific URL to analyze. Use Web Search when you need to find information.
Some websites may block automated fetching. Results may vary based on site accessibility.