X Search技能使用说明
2026-03-28
新闻来源:网淘吧
围观:23
电脑广告
手机广告
X搜索
使用xAI Grok API搜索X(Twitter)帖子,实时访问X内容。
设置
- 获取您的API密钥:https://console.x.ai
- 设置环境变量:
export XAI_API_KEY="xai-your-key-here" - 或者设置
skills."x-search".apiKey/skills."x-search".env.XAI_API_KEY在~/.openclaw/openclaw.json
使用
python3 {baseDir}/scripts/search.py "what is trending in AI right now"
有用标志:
# 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"
注意事项
- 使用xAI Responses API的
x_search工具(Grok执行搜索并总结结果) - 不能同时使用
--handles和--exclude结果包含引用,附有原始X帖子的链接 - Results include citations with links to original X posts
- 以可读格式呈现结果,包含帖子内容、作者和引用信息
文章底部电脑广告
手机广告位-内容正文底部


微信扫一扫,打赏作者吧~