4.9 KiB
4.9 KiB
name, description
| name | description |
|---|---|
| x-via-kimi | Access X (Twitter) content through Kimi AI using web search or browser automation. No X API key needed - Kimi can search and summarize X posts in real-time. |
X via Kimi - No API Key Needed
Access X (Twitter) content through Kimi AI without needing X API access.
Why This Works
Kimi has real-time web search capabilities and can access X content directly:
- ✅ No X API key required
- ✅ No X API costs ($200-5000/month)
- ✅ Real-time access to public posts
- ✅ Can search by user, hashtag, topic
- ✅ Summarizes and analyzes content
Method 1: Kimi API (Recommended)
Step 1: Get Kimi API Key
- Go to https://platform.moonshot.cn/console/api-keys
- Create a new API key
- Free credits: 15 CNY (~$2) for testing
Step 2: Query X Content
export KIMI_API_KEY="your-api-key"
curl https://api.moonshot.cn/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $KIMI_API_KEY" \
-d '{
"model": "kimi-k2.5",
"messages": [
{
"role": "user",
"content": "Search X (Twitter) for recent posts from @alexmikhalev in the last 30 days. List the main topics they discussed and any interesting insights they shared."
}
],
"tools": [{
"type": "builtin_function",
"function": {
"name": "web_search"
}
}]
}'
Example Queries
Get posts from specific user:
Search X for posts by @alexmikhalev from the last 30 days.
What topics did they discuss? What links did they share?
Find trending topics:
What are the trending topics on X (Twitter) in AI/ML space
from the last 7 days? Who are the key voices?
Research specific topic:
Search X for discussions about "knowledge graphs" and "AI agents"
from the last 30 days. Summarize the key insights and debates.
Method 2: Kimi.com Web Interface
Using Browser Relay
-
Open Chrome with Kimi:
google-chrome "https://kimi.com" & -
Attach Browser Relay:
- Click OpenClaw Browser Relay extension icon
- Wait for
cdpReady: true
-
Query X through Kimi:
// Type query browser action=act profile=chrome targetId=<id> request={ "kind": "evaluate", "fn": "(() => { const ed = document.querySelector('textarea'); if(ed) { ed.focus(); ed.value = 'Search X for @alexmikhalev posts from last 30 days'; return 'ok'; } return 'not found'; })()" } // Submit browser action=act profile=chrome targetId=<id> request={"kind":"press","key":"Enter"}
Method 3: Kimi Claw (Native Integration)
If you have access to Kimi Claw (https://kimi.com/bot):
- Go to https://kimi.com/bot
- Ask directly: "Search X for posts from @alexmikhalev last 30 days"
- Kimi Claw has built-in web search and X access
Cost Comparison
| Method | Cost | Setup | Reliability |
|---|---|---|---|
| X API v2 | $200-5000/mo | Developer account | High |
| xAI Grok API | $0-10/mo | API key | High |
| Kimi API | ~$0.01/query | API key | Medium |
| Kimi Browser | Free | Chrome + relay | Medium |
| Kimi Claw | Free | Web access | High |
Limitations
- Public posts only - Can't access private accounts
- Search-dependent - Relies on X's search indexing
- Rate limits - Kimi API has usage limits
- Not real-time - Slight delay vs direct API
Recommended Approach
For your use case (fetching posts from people you follow):
Option A: Kimi API (Best Balance)
- Cost: ~$5-10/month for regular use
- Setup: Simple API key
- Reliability: Good
Option B: Kimi Claw (If Available)
- Cost: Free
- Setup: None (web-based)
- Reliability: Best
Option C: Grok API (Alternative)
- Cost: $0 (with free credits)
- Setup: xAI account
- Reliability: Good
Quick Start Script
#!/bin/bash
# x-via-kimi.sh - Search X through Kimi
KIMI_API_KEY="${KIMI_API_KEY:-}"
USER="${1:-alexmikhalev}"
DAYS="${2:-30}"
if [ -z "$KIMI_API_KEY" ]; then
echo "Error: Set KIMI_API_KEY environment variable"
exit 1
fi
curl -s https://api.moonshot.cn/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $KIMI_API_KEY" \
-d "{
\"model\": \"kimi-k2.5\",
\"messages\": [{
\"role\": \"user\",
\"content\": \"Search X (Twitter) for posts from @$USER in the last $DAYS days. Summarize the main topics, insights, and any shared links.\"
}]
}" | jq -r '.choices[0].message.content'
Usage:
chmod +x x-via-kimi.sh
KIMI_API_KEY="your-key" ./x-via-kimi.sh alexmikhalev 30
Next Steps
- Get Kimi API key: https://platform.moonshot.cn/console/api-keys
- Test query: Try searching for your X handle
- Automate: Set up cron job for daily/weekly digest
Want me to:
- Create a skill for automated X research via Kimi?
- Set up a cron job for daily X digest?
- Create a comparison of all X access methods?