Grok · xAI · Browse the web and answer with cited sources
Web search
Grok (xAI) searches and reads the web server-side, restricted to or excluding chosen domains, understands images on request, and answers with citations. Price: $0.005 per web search Grok performs plus model tokens (grok-4.3 $1.25 in / $2.50 out per million, grok-4.6 $2 / $6); a typical call costs $0.02 to $0.05. Billed at the exact cost xAI reports for the call; the quote is the upper bound.
Usage based xAIWeb searchxai/web-searchListed
Activation pending; your agent will see it as unavailable until then.
Use this tool with your agent
Use my connected Agentik MCP server. I want to use the tool xai/web-search (Grok web search: browse the web and answer with cited sources). Call inspect_tool with {"tool_id": "xai/web-search"} first and tell me the price before anything runs. Ask me for the inputs it needs; never invent values, IDs or file URLs. When I confirm, call run_tool with tool_id "xai/web-search" and my inputs, follow it with get_run if it is still running, and give me the result and the price Agentik reports. If the tool is unavailable, say so and use discover_tools to propose an alternative.Show the prompt
Paste it into Claude, ChatGPT or Codex: your agent takes it from there, and shows the price before it runs.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | The question or task for Grok. Ask for citations to get post or page links. |
instructions | string | No | System instructions: tone, format, language, what to focus on. |
model | string | No | grok-4.3 is cheaper and usually available; grok-4.6 is the strongest and can be at capacity. Options: grok-4.3, grok-4.6. |
max_output_tokens | integer | No | Cap on answer plus reasoning tokens. |
max_cost_usd | number | No | Optional spending cap reserved for this call (not sent to xAI). Default reservation: $0.15 for grok-4.3, $0.30 for grok-4.6, plus $0.000006 per requested output token. |
allowed_domains | string[] | No | Only these domains (max 5). Exclusive with excluded_domains. |
excluded_domains | string[] | No | Never these domains (max 5). |
enable_image_understanding | boolean | No | Let Grok look at images on pages (more tokens). |
How your agent calls it
First inspect_tool for the current schema and price, then run_tool with the published example after confirming your inputs:
{
"tool_id": "xai/web-search",
"input": {
"query": "In one sentence, what is the Model Context Protocol? Cite one source.",
"max_output_tokens": 200
}
}Price and billing
- Price
- Usage based
- Model
- Usage based
- Detail
- Billed at the cost the provider reports for the call, never above $5. Your agent sees the maximum before running.
- The provider’s price, 0% markup.
- One prepaid balance for every provider; your agent sees the price before it runs.
- Pay for measured usage; unused reservations are released.