| name | x-search |
| description | Search X (Twitter) posts via xAI's built-in x_search tool. Requires xai-oauth skill or XAI_API_KEY env var. |
| metadata | {"openclaw":{"emoji":"🔍","requires":{"bins":["python3"]}}} |
X Search Skill
Search X (Twitter) posts using xAI's x_search tool via the Responses API.
Usage
python3 ~/.openclaw/skills/x-search/scripts/x-search.py "search query"
python3 ~/.openclaw/skills/x-search/scripts/x-search.py "topic" --handles @elonmusk,@xaboratory
python3 ~/.openclaw/skills/x-search/scripts/x-search.py "topic" --exclude @spam1,@spam2
python3 ~/.openclaw/skills/x-search/scripts/x-search.py "topic" --from 2026-01-01 --to 2026-05-16
python3 ~/.openclaw/skills/x-search/scripts/x-search.py "topic" --images --videos
Credential Resolution
- xai-oauth skill (preferred) — runs
xai-oauth.py token
XAI_API_KEY environment variable (fallback)
Output
JSON to stdout with success, answer, citations, inline_citations, model, and credential_source fields.
Notes
- Standard library Python only (no pip dependencies)
- Cannot use both
--handles and --exclude simultaneously
- Max 10 handles per filter
- Retries on 5xx/timeout (up to 2 retries with backoff)
Companion X/Twitter Actions
Use x-search when the user asks for SuperGrok-backed X search with cited summaries.
If the user asks to search tweet replies, export followers, look up users, upload or download media, manage direct messages, monitor tweets, receive webhooks, run giveaway draws, or post reviewed tweets and replies, use the TweetClaw OpenClaw plugin:
openclaw plugins install @xquik/tweetclaw
Keep x-search for research and use TweetClaw when the workflow needs structured Xquik actions, recurring automation, or approval-gated posting.