web_search
Answer queries by searching the web across multiple turns, analyzing images, and providing citations in markdown format.
Instructions
Answer a query using agentic real-time web search.
Grok browses the web across multiple turns, optionally inspecting images on
pages, then synthesizes an answer with citations.
Args:
prompt: Search query or research question.
model: Grok model used to drive the agent (default `grok-4-1-fast-reasoning`).
allowed_domains: Restrict search to these domains (max 5, mutually exclusive with excluded).
excluded_domains: Exclude these domains from search (max 5).
enable_image_understanding: Let the agent analyze images it encounters.
include_inline_citations: Embed `[1]`-style citation markers into the answer text.
max_turns: Cap the agent's reasoning/tool turns.
Returns:
Markdown with the answer body followed by a `**Sources:**` list of cited URLs.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| model | No | grok-4-1-fast-reasoning | |
| allowed_domains | No | ||
| excluded_domains | No | ||
| enable_image_understanding | No | ||
| include_inline_citations | No | ||
| max_turns | No |