Web Search POST
Perform a web search to get real-time information. Powered by Tavily. Returns an AI-generated answer plus individual result snippets.
Input Schema
| Parameter | Type | Description |
|---|---|---|
| query | string | The search query to perform. |
| search_depth | string | Depth of the search. Enum: basic, advanced. Default: basic. |
| max_results | number | Max number of results to return (1–20). Default: 5. |
| include_answer | boolean | Include an AI-generated answer summarizing the results. Default: true. |
| include_images | boolean | Include image results. Default: false. |
| include_domains | array | Restrict results to these domains (e.g. [“wikipedia.org”]). |
| exclude_domains | array | Exclude results from these domains. |
REST Endpoint
POST /api/agents/tools/webSearchPOST /api/agents/tools/webSearch
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"query": "latest AI models 2026",
"search_depth": "basic",
"max_results": 5,
"include_answer": true
}Response:
{
"success": true,
"data": {
"answer": "As of 2026, the leading AI models include...",
"results": [
{
"title": "Top AI Models of 2026",
"url": "https://example.com/ai-models",
"content": "..."
}
]
}
}Last updated on