🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

X Search 1.0.0

by @github2cao

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 med...

Versionv1.0.0
πŸ’‘ Examples

python3 {baseDir}/scripts/search.py "what is trending in AI right now"

Useful flags:

# 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"

βš™οΈ Configuration

1. Get your API key: https://console.x.ai 2. Set environment variable:

   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

πŸ“‹ Tips & Best Practices

  • 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
  • View on ClawHub
    TERMINAL
    clawhub install x-search1

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’