Documentation Index
Fetch the complete documentation index at: https://concentrate.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
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.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "web_search" |
search_context_size | string | No | Amount of search context: "low", "medium", or "high". Defaults to provider behavior |
filters | object | No | Filter search results by domain |
user_location | object | No | Approximate user location for localized results |
search_context_size, filters, and user_location are not supported by Google Vertex AI (Gemini) or Mistral models. These parameters are silently ignored for those providers.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.
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:| Provider | Supported | Notes |
|---|---|---|
| OpenAI | Yes | GPT-4o, GPT-4.1, GPT-5 family |
| Anthropic | Yes | Claude Sonnet, Opus, Haiku models |
| xAI | Yes | Grok-4 family |
| Google Vertex AI | Yes | Gemini models. No search_context_size/filters support. Cannot combine with function tools |
| Mistral | Yes | Mistral Small, Medium, Magistral. No search_context_size/filters support. Cannot combine with function tools |
Related Pages
Tool Calling
Define custom function tools
Create Response
Main API endpoint reference