search_x_posts
Find and analyze real-time public X posts, threads, and sentiment by keyword, handle, and date via Grok to investigate current discussions.
Instructions
Search real-time public posts, threads, and sentiment on X (Twitter) via Grok.
Args: query: Topic, keywords, or question to investigate on X. model: Optional xAI model ID (defaults to XAI_DEFAULT_MODEL / grok-4.3). allowed_x_handles: Only search posts from these X handles (max 20, with or without '@'). excluded_x_handles: Ignore posts from these X handles (max 20, mutually exclusive with allowed_x_handles). from_date: Start date in YYYY-MM-DD format (00:00 UTC). to_date: End date in YYYY-MM-DD format (exclusive, 00:00 UTC). enable_image_understanding: Allow Grok to inspect images attached to X posts. enable_video_understanding: Allow Grok to inspect videos attached to X posts.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "search_x_posts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| query | Yes | ||
| to_date | No | ||
| from_date | No | ||
| allowed_x_handles | No | ||
| excluded_x_handles | No | ||
| enable_image_understanding | No | ||
| enable_video_understanding | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |