:online to the model slug or by passing the web plugin in your request body.
Quick Start
Append:online to any model slug to enable web search:
plugins array explicitly:
- TypeScript
- Python
- cURL
Parsing Web Search Results
Web search results are standardized across all providers and returned in theannotations field of the response message:
Customizing the Web Plugin
Pass aplugins array to configure web search behavior:
Default search prompt:
Domain Filtering
Restrict which domains appear in search results:include_domains and exclude_domains accept domain strings with optional wildcards (*.substack.com) and path filtering (openai.com/blog).
Engine Compatibility
Engine Selection
ARouter supports multiple search engines via theengine parameter:
Default Behavior
- OpenAI, Anthropic, xAI models → native search by default
- All other models → Exa search
Search Context Size
For models that support native search, control how much search context is retrieved:Pricing
Web search incurs additional charges beyond normal LLM token costs.Exa Search
- **0.02 per request maximum)
- Charged from your ARouter credits
Native Search
Pricing depends on the provider and search context size. Refer to each provider’s documentation:Parallel Search
- $4 per 1,000 results (same rate as Exa)
- Charged from your ARouter credits
Web search charges apply even when used with
:free model variants.Combining with Free Models
You can combine:online with :free:
xAI X Search Filters
When using xAI models with web search, ARouter automatically includes X/Twitter search alongside web search. Control X search behavior with thex_search_filter parameter:
allowed_x_handles and excluded_x_handles are mutually exclusive. If both are set, the filter is silently dropped.Practical Examples
Research Assistant
News Summarization
Migrating to Server Tools
The recommended replacement for theweb plugin and :online suffix is the openrouter:web_search Server Tool. Server Tools are invoked by the model itself when it determines a search is needed, rather than being forced on every request.
See Server Tools — Web Search for the migration guide and full configuration reference.
See Plugins Overview for the full list of available plugins.