Skip to main content

web_fetch()

Create a tool that extracts content from one public web page.

Usage

Source

web_fetch(
    *,
    provider="auto",
    include_examples=True,
    api_key=None,
    client=None,
    default_params=None,
    timeout=None,
    mode=SearchResultMode.COMPACT,
    response_format=SearchResultFormat.MARKDOWN,
    name="web_fetch"
)

Parameters

provider: ProviderName | str = "auto"

Agent SDK adapter name, "auto", or "function" for a callable.

include_examples: bool = True

Add a URL example to the model-facing description.

api_key: str | None = None

Authentication, optional client, and transport timeout in seconds. Clients must implement extract(params).

client: str | None = None

Authentication, optional client, and transport timeout in seconds. Clients must implement extract(params).

timeout: str | None = None

Authentication, optional client, and transport timeout in seconds. Clients must implement extract(params).

default_params: Mapping[str, Any] | None = None

Extract API settings such as include_tags and exclude_tags. This tool supports only mode="scrape".

mode: SearchResultMode | str = SearchResultMode.COMPACT

For JSON, "compact" selects the top-level markdown field and "full" returns the complete response. Markdown is always returned unchanged.

response_format: SearchResultFormat | str = SearchResultFormat.MARKDOWN

"markdown" (default) requests output="md". "json" requests output="json".

name: str = "web_fetch"
Tool name presented to the model.

Returns

Any
A provider-native tool with one required url input.