Grok · xAI · What X says, with cited posts
X search
Grok (xAI) searches X (Twitter) posts server-side, filters by accounts and dates, understands images and videos on request, and answers with citations of the posts. Price: $0.005 per X 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 xAISocialxai/x-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/x-search (Grok X search: what X (Twitter) says, with cited posts). Call inspect_tool with {"tool_id": "xai/x-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/x-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_x_handles | string[] | No | Only posts from these accounts (without @). Exclusive with excluded_x_handles. Name the account in the query too, or Grok may skip the search. |
excluded_x_handles | string[] | No | Never posts from these accounts (without @). |
from_date | string | No | Earliest post date, YYYY-MM-DD. |
to_date | string | No | Latest post date, YYYY-MM-DD. |
enable_image_understanding | boolean | No | Let Grok look at images in posts (more tokens). |
enable_video_understanding | boolean | No | Let Grok watch videos in posts (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/x-search",
"input": {
"query": "In one sentence, what did the xai account post most recently? Cite the post.",
"allowed_x_handles": [
"xai"
],
"max_output_tokens": 300
}
}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.