Web search lets LLMs access real-time information from the internet when generating responses. Instead of relying solely on training data, the model can search the web to ground its answers with up-to-date facts, links, and sources.Documentation Index
Fetch the complete documentation index at: https://www.edenai.co/docs/llms.txt
Use this file to discover all available pages before exploring further.
How It Works
Enable web search by addingweb_search_options to your chat completion request. When enabled, the model will:
- Analyze the user’s query to determine if web search is needed.
- Search the web for relevant, current information.
- Generate a response grounded in the search results, often including source citations.
Basic Example
Supported Models
Not all models support web search. Use the List LLM Models endpoint to find models wherecapabilities.web_search is true.
Parameters
| Parameter | Type | Description |
|---|---|---|
web_search_options | object | Options for web search integration. Omit to disable web search. |
web_search_options.search_context_size | string | Amount of context retrieved from the web. Options: "low", "medium", "high". Default: "medium" |
With System Messages
Combine web search with system messages to control how the model uses search results:When to Use Web Search
Web search is useful when the user’s question involves:- Current events — news, stock prices, weather, sports scores
- Recent releases — software versions, product launches, research papers
- Factual lookups — statistics, regulations, schedules that change over time
- Verification — checking claims against live sources
Next Steps
Topic Extraction
Extract structured topics from text with Expert Models