x-search
Search X posts in real-time to track trends, filter by users, and retrieve summarized social media insights with citations.
Search X posts in real-time to track trends, filter by users, and retrieve summarized social media insights with citations.
Manually tracking X trends wastes time and often misses the critical context you need for decision-making. This skill connects to the xAI Grok API to search posts, filter by specific handles, and deliver summarized results with citations directly to you. It is ideal for marketers and researchers requiring real-time social media intelligence without leaving your OpenClaw workflow.
复制以下提示词,粘贴到 OpenClaw 中即可自动安装:
请根据 https://clawshelf.com/api/skills/jaaneek-x-search/install 的说明,下载并安装此技能到本地 ~/.openclaw/skills/ 目录。
包含文件
---
name: x-search
description: Search X (Twitter) posts using the xAI API. Use when the user wants to find tweets, search X/Twitter, look up what people are saying on X, or find social media posts about a topic.
homepage: https://docs.x.ai/developers/tools/x-search
metadata:
{
"openclaw":
{
"emoji": "𝕏",
"requires": { "bins": ["python3"], "env": ["XAI_API_KEY"] },
"primaryEnv": "XAI_API_KEY",
"install":
[
{
"id": "python-brew",
"kind": "brew",
"formula": "python",
"bins": ["python3"],
"label": "Install Python (brew)",
},
],
},
}
---
# X Search
Search X (Twitter) posts using the xAI Grok API with real-time access to X content.
## Setup
1. Get your API key: https://console.x.ai
2. Set environment variable:
```bash
export XAI_API_KEY="xai-your-key-here"
```
3. Or set `skills."x-search".apiKey` / `skills."x-search".env.XAI_API_KEY` in `~/.openclaw/openclaw.json`
## Usage
```bash
python3 {baseDir}/scripts/search.py "what is trending in AI right now"
```
Useful flags:
```bash
# Filter by handles (max 10)
python3 {baseDir}/scripts/search.py --handles jaaneek,OpenClaw "latest posts"
# Exclude handles (max 10)
python3 {baseDir}/scripts/search.py --exclude spambot,crypto_shill "trending AI"
# Date range (YYYY-MM-DD)
python3 {baseDir}/scripts/search.py --from 2026-03-01 --to 2026-03-20 "xAI grok updates"
# Enable image/video understanding in posts
python3 {baseDir}/scripts/search.py --images --video "product demos"
```
## Notes
- Uses the xAI Responses API with `x_search` tool (Grok performs the search and summarizes results)
- Cannot use `--handles` and `--exclude` at the same time
- Results include citations with links to original X posts
- Present results in a readable format with post content, authors, and citations
暂无评价,成为第一个评价者吧。
100% 原生支持 OpenClaw / Claude 等任何 AI 助手