Give any model live web results — it searches when it needs to, and each search is billed in DA.
The opendunes:web_search helper gives any model access to the web as it is today. When the model decides it needs current information, it writes a search query; the search runs, and the results — titles, addresses and excerpts — go back to the model, which answers from them. It may search several times in one request.
curl https://opendunes.com/v1/chat/completions \
-H "Authorization: Bearer $OPENDUNES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-5",
"messages": [{ "role": "user", "content": "What does an iPhone 16 cost in Algiers this week?" }],
"tools": [{ "type": "opendunes:web_search" }]
}'It works the same on /v1/responses and /v1/messages.
Put them in the helper's parameters; they travel to the search as you send them.
{
"type": "opendunes:web_search",
"parameters": {
"max_results": 5,
"max_total_results": 15,
"allowed_domains": ["ouedkniss.com", "jumia.dz"]
}
}| Parameter | Does |
|---|---|
engine | auto (the default: the model's own search where its provider has one, another engine otherwise), native, exa, parallel or perplexity |
max_results | results per search |
max_total_results | results across every search in the request |
max_uses | searches the model may run in the request |
search_context_size | low, medium or high — how much of each page comes back |
max_characters | the exact number of characters per result |
allowed_domains · excluded_domains | only these sites, or never these |
user_location | an approximate location, to bias the results — used by the model's own search |
What each engine honours differs; an option an engine does not take is ignored. firecrawl bills an account of your own elsewhere and is not offered: naming it answers 400.
Each search is billed in DA, on top of the model's tokens — the results the model reads are input tokens. A model's price per search is on its endpoints, as pricing.web_search. The request's usage.cost carries the whole charge.
A search counts as one of the request's 30 helper steps. Pair it with Web Fetch to read a page a search found, or with Datetime so the model knows what "this week" means.