> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://openrouter.ai/docs/llms.txt.
> For full documentation content, see https://openrouter.ai/docs/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://openrouter.ai/docs/_mcp/server.

# WebFetchServerToolConfig - Python SDK

The Python SDK and docs are currently in beta.
Report issues on [GitHub](https://github.com/OpenRouterTeam/python-sdk/issues).

Configuration for the openrouter:web\_fetch server tool

## Fields

| Field                | Type                                                                             | Required             | Description                                                                                                                                                                                                                                                                                                       | Example |
| -------------------- | -------------------------------------------------------------------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `allowed_domains`    | List\[*str*]                                                                     | :heavy\_minus\_sign: | Only fetch from these domains.                                                                                                                                                                                                                                                                                    |         |
| `blocked_domains`    | List\[*str*]                                                                     | :heavy\_minus\_sign: | Never fetch from these domains.                                                                                                                                                                                                                                                                                   |         |
| `engine`             | [Optional\[components.WebFetchEngineEnum\]](../components/webfetchengineenum.md) | :heavy\_minus\_sign: | Which fetch engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in fetch. "exa" uses Exa Contents API. "openrouter" uses direct HTTP fetch. "firecrawl" uses Firecrawl scrape (requires BYOK). "parallel" uses the Parallel extract API. | auto    |
| `max_content_tokens` | *Optional\[int]*                                                                 | :heavy\_minus\_sign: | Maximum content length in approximate tokens. Content exceeding this limit is truncated.                                                                                                                                                                                                                          | 100000  |
| `max_uses`           | *Optional\[int]*                                                                 | :heavy\_minus\_sign: | Maximum number of web fetches per request. Once exceeded, the tool returns an error.                                                                                                                                                                                                                              | 10      |