The web plugin — search results attached to any request, once per request.
For better results, use the web search helper instead: the model decides when to search and how often, where the plugin searches once, before the model reads anything.
The web plugin runs one web search on the request's prompt and attaches the results to what the model reads. Name it in plugins, or add :online to the model:
{
"model": "anthropic/claude-sonnet-5:online",
"messages": [{ "role": "user", "content": "What changed in the Algerian startup law this year?" }]
}is the same as:
{
"model": "anthropic/claude-sonnet-5",
"messages": [{ "role": "user", "content": "What changed in the Algerian startup law this year?" }],
"plugins": [{ "id": "web" }]
}Both travel to the model's provider as you send them, and its answer — or its refusal — comes back as it gave it.
{
"plugins": [
{
"id": "web",
"max_results": 3,
"search_prompt": "Some relevant web results:",
"include_domains": ["aps.dz", "*.gov.dz"],
"exclude_domains": ["reddit.com"]
}
]
}| Option | Does |
|---|---|
engine | native, exa, parallel or perplexity; without it, the model's own search where its provider has one |
max_results | how many results to attach. Default 5 |
search_prompt | the words that introduce the results to the model |
include_domains · exclude_domains | only these sites, or never these; *.substack.com and paths such as openai.com/blog work |
firecrawl bills an account of your own elsewhere and is not offered: naming it answers 400.
The sources come back on the message as annotations, one url_citation each:
{
"type": "url_citation",
"url_citation": {
"url": "https://www.aps.dz/…",
"title": "…",
"start_index": 100,
"end_index": 200
}
}The search is billed in DA on top of the model's tokens, and the request's usage.cost carries the whole charge.