BetaServer tools are currently in beta. The API and behavior may change.
openrouter:web_fetch server tool gives any model the ability to fetch
content from a specific URL. When the model needs to read a web page or PDF
document, it calls the tool with the URL. OpenRouter fetches and extracts the
content, returning text that the model can use in its response.
How It Works
- You include
{ "type": "openrouter:web_fetch" }in yourtoolsarray. - Based on the user’s prompt, the model decides whether it needs to fetch a URL and generates the request.
- OpenRouter fetches the URL using the configured engine (defaults to
auto, which uses native provider fetch when available or falls back to Exa). - The page content (text, title, and URL) is returned to the model.
- The model incorporates the fetched content into its response. It may fetch multiple URLs in a single request if needed.
Quick Start
Configuration
The web fetch tool accepts optionalparameters to customize behavior:
Engine Selection
The web fetch server tool supports multiple fetch engines:auto(default): Uses native fetch if the provider supports it, otherwise falls back to Exanative: Prefers the provider’s built-in web fetch; falls back to theopenrouterengine if the model doesn’t support native fetch. When a workspace admin has set an engine list on the Server Tools page, the fallback is the first non-native engine in that list instead; a list of onlynativerejects the request with a 403 on models without native fetchexa: Uses Exa’s Contents API to extract page content (supports BYOK)openrouter: Uses direct HTTP fetch with content extractionfirecrawl: Uses Firecrawl’s scrape API (BYOK, bring your own key)parallel: Uses Parallel’s extract API for high-quality content extraction
Engine Capabilities
Firecrawl (BYOK)
Firecrawl uses your own API key. To set it up:- Go to your OpenRouter plugin settings and configure your Firecrawl API key
- Your Firecrawl account is billed separately from OpenRouter
Hard Limits
To prevent runaway costs:- Exa engine: No hard limit (billed via API credits)
- Parallel engine: No hard limit (billed via API credits)
- Firecrawl engine: No hard limit (uses your Firecrawl credits)
- OpenRouter/native engines: Hard limit of 50 fetches per request
Domain Filtering
Restrict which domains can be fetched usingallowed_domains and
blocked_domains:
allowed_domains is set, only URLs from those domains will be fetched.
When blocked_domains is set, URLs from those domains will be rejected.
Content Truncation
Usemax_content_tokens to limit the amount of content returned:
Works with the Responses API
The web fetch server tool also works with the Responses API:Response Format
When the model calls the web fetch tool, it receives a response like:Workspace Settings
Workspace admins can set an engine list, allowed domains, and blocked domains foropenrouter:web_fetch on the workspace’s Server Tools page. Each tool entry is either locked or a default:
- Locked (the default when the entry is created): requests and presets in the workspace are limited to these settings. A request that names an engine outside the list, or whose domain list has no overlap with the workspace’s, is rejected with a
403. - Default (“Prevent overrides” off): the settings fill in what a request leaves unset. A request that names its own engine keeps it, and a request that sets either domain list (an empty list counts) keeps its lists as sent; the workspace domain lists are used only when the request sets neither.
engine (or engine: "auto") runs the workspace’s Default engine, and a native request on a model without native fetch runs its Native fallback engine (see the native row under Engine Selection). Both are stored at the head of the engine list: the default first, then the fallback. Settings on the workspace’s Plugins tab do not apply to server tools.
Pricing
All pricing is in addition to standard LLM token costs for processing the
fetched content.
Next Steps
- Server Tools Overview. Learn about server tools
- Web Search. Search the web for real-time information
- Datetime. Get the current date and time
- Tool Calling. Learn about user-defined tool calling