Overview
Web search is a built-in tool that allows models to search the web during a response. Unlike function tools, you don’t need to define a schema or handle execution yourself — the model searches the web automatically and incorporates the results into its answer. Add{"type": "web_search"} to your tools array to enable it.
Concentrate can service the search two ways: with the model provider’s native web search, or with Concentrate’s own Exa-backed engine. By default it picks the best available for the model, so most models can search the web even when they have no native support. See Search engines to control this.
Prerequisites
Before using web search, ensure you have:- A Concentrate AI API key (get one here)
- A model that supports web search (check the models endpoint)
Quick Start
Tool Parameters
search_context_size, filters, and user_location are not supported natively by Google Vertex AI (Gemini) or Mistral models, and are silently ignored when those providers run the search themselves. To have them honored on any model, route the search through the Exa engine.Search Context Size
Controls how much search context the model uses. Higher values may return more detailed results but use more tokens.Domain Filtering
Restrict search results to specific domains:User Location
Provide an approximate location for more relevant local results:user_location fields are optional.
Search engines
The optionalengine field controls which backend runs the search:
Exa engine
Concentrate runs its own web search through Exa. This is what lets models with no native web search still search the web: underauto, Concentrate transparently runs the search for them. Set engine.type to "exa" to force this path even on models that support native search — useful for consistent behavior across providers.
Mechanically, Concentrate exposes an exa_web_search function tool to the model in place of the built-in tool. When the model calls it, Concentrate runs the query against Exa, feeds the results back, and repeats until the model stops searching or a turn limit is reached. The response you get back is identical to native search: a web_search_call item followed by the model’s answer, with the source URLs attached.
Because Concentrate runs these searches itself, search_context_size, filters, and user_location are honored on every model routed through Exa — including Gemini and Mistral, which ignore them natively. search_context_size maps to the number of results fetched per query: low = 3, medium = 5 (default), high = 10.
Pricing
Exa searches are billed separately from tokens, asexa_web_search tool calls, at **0.007 per query). Each query in a search counts as one call. The count is reported in the response usage:
web_search instead.
Response Format
When the model performs a web search, the responseoutput array includes a web_search_call item:
sources array contains the URLs the model referenced. Use these to provide citations in your application.
Combining with Function Tools
Web search works alongside function tools in the same request:Provider Limitations
Google Vertex AI (Gemini) and Mistral models do not support using web search and function tools together in the same request. When both are provided, function tool calling takes priority and web search is ignored. To use web search with these providers, usetool_choice to explicitly select it:
Provider Support
Web search is supported across multiple providers:The table above reflects native support only. Through the Exa engine, web search also works on models with no native support, as long as they support function tool calling.
Related Pages
Tool Calling
Define custom function tools
Create Response
Main API endpoint reference