x_search
Search X (Twitter) for posts, discussions, and trends using xAI's Grok API with web search. Apply time filters (day, week, month) and set result count up to 20.
Instructions
Search X (Twitter) for posts, discussions, and trends using xAI's Grok API with web search. Requires XAI_API_KEY. Cost: ~$0.05/call (web_search $0.005 × 8-9 calls + tokens).
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": "x_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query for X/Twitter | |
| recency | No | Time filter for results | week |
| per_page | No | Number of results to return |