Skip to main content
The web plugin and :online model suffix are deprecated. They continue to work, but new integrations should use Server Tools instead. Server Tools give the model control over when to search, return structured citations, and support more engines.
ARouter supports web search grounding for any model — not just models with built-in search. Activate it by appending :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:
Or use the plugins array explicitly:
Both approaches are equivalent.

Parsing Web Search Results

Web search results are standardized across all providers and returned in the annotations field of the response message:

Customizing the Web Plugin

Pass a plugins array to configure web search behavior:
Default search prompt:

Domain Filtering

Restrict which domains appear in search results:
Both 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 the engine 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.
  • **4per1,000results(defaultmaxresults:5=4 per 1,000 results** (default `max_results: 5` = 0.02 per request maximum)
  • Charged from your ARouter credits
Pricing depends on the provider and search context size. Refer to each provider’s documentation:
  • $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:
The LLM inference is free but web search still incurs search costs.

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 the x_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 the web 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.