AI Agents Can Finally Fetch Tweets Without Login! This OpenClaw Skill Makes It Zero-Config
Source: Dev.to
AI agents can now fetch tweets without any API keys, logins, or cookies. The x‑tweet‑fetcher OpenClaw skill provides a zero‑configuration, JSON‑first interface that works across Twitter (X), WeChat, and other Chinese platforms, making it ideal for agents and cron‑based automation.
Overview
- Stars: 343 | License: MIT | Free
- Supports: Twitter/X, WeChat, Weibo, Bilibili, CSDN, and more.
- No authentication required – just a single command returns structured JSON.
Features
- Fetch single tweets, long‑form X Articles, quoted tweets, and full metrics (likes, retweets, views).
- Retrieve replies (threaded) and user timelines (up to 200 tweets).
- Access X Lists and monitor @mentions (cron‑friendly).
- Search WeChat articles via Sogou, discover tweets with DuckDuckGo + Camofox fallback.
- Unified JSON output across all platforms.
- Anti‑bot protection using the Camofox headless browser (fingerprint spoofing).
Installation
# Clone the repository
git clone https://github.com/ythx-101/x-tweet-fetcher.git
cd x-tweet-fetcher
# Run a single‑use command (no extra setup needed)
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456"
OpenClaw plugin (optional)
openclaw plugins install @askjo/camofox-browser
Standalone Camofox browser (if you prefer a local server)
git clone https://github.com/jo-inc/camofox-browser
cd camofox-browser && npm install && npm start # listens on port 9377
Usage
Fetch a single tweet
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456"
Output (formatted JSON):
{
"text": "Tweet content...",
"likes": 91,
"retweets": 23,
"views": 14468,
"media": ["https://image.url/..."],
"quoted_tweet": { /* … */ }
}
Include replies (thread)
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456" --replies
User timeline (limit results)
python3 scripts/fetch_tweet.py --user elonmusk --limit 50
X Lists
python3 scripts/fetch_tweet.py --list "https://x.com/i/lists/123456"
Monitor @mentions (cron‑friendly)
python3 scripts/fetch_tweet.py --monitor @username
Exit codes
0– No new content1– New content found2– Error
Search WeChat articles (Sogou)
python3 scripts/sogou_wechat.py --keyword "AI Agent" --limit 10 --json
Returned fields: title, url, author, date.
Discover tweets (DuckDuckGo + Camofox fallback)
python3 scripts/x_discover.py --keywords "AI Agent,LLM tools" --limit 5 --json
Fetch Chinese platforms (Weibo, Bilibili, CSDN, WeChat)
python3 scripts/fetch_china.py --url "https://weibo.com/..."
The script auto‑detects the platform and returns a unified JSON structure.
Python API
from scripts.fetch_tweet import fetch_tweet
from scripts.sogou_wechat import sogou_wechat_search
from scripts.x_discover import discover_tweets
# Fetch a tweet
tweet = fetch_tweet("https://x.com/user/status/123456")
print(tweet["text"])
# Search WeChat articles
articles = sogou_wechat_search("AI Agent", max_results=10)
# Discover tweets for keywords
results = discover_tweets(["AI Agent"], max_results=5)
Automation (Cron examples)
# Check @mentions every 30 minutes
*/30 * * * * python3 scripts/fetch_tweet.py --monitor @username || notify-send "New mentions!"
# Discover new tweets daily at 09:00
0 9 * * * python3 scripts/x_discover.py --keywords "AI Agent" --json >> ~/discoveries.jsonl
The exit‑code design (0/1/2) makes it trivial to integrate with monitoring tools.
Comparison Table
| Tool | Login Required | API Key Required | Platforms | Price |
|---|---|---|---|---|
| Twitter API | ✅ | ✅ | Twitter only | $100+/mo |
| xfetch | ✅ (Cookie) | ❌ | Twitter only | Free |
| x‑tweet‑fetcher | ❌ | ❌ | Twitter, WeChat, Weibo, Bilibili, CSDN, etc. | Free |
Core Advantages
- Zero config: No API keys, logins, or cookies.
- Agent‑friendly: Pure JSON output; importable Python modules.
- Cron‑friendly: Simple exit‑code semantics for automation.
- Multi‑platform: One tool covers major Western and Chinese social networks.
- Anti‑bot: Camofox provides robust fingerprint spoofing to bypass Cloudflare, Google, etc.
Changelog
- v1.6.2 (2026‑03‑04) – Extract
tweet_idfrom Nitter; supplement view counts via FxTwitter API. - v1.6.1 (2026‑03‑04) – Fixed list parsing; added
retweeted_byandquoted_tweetfields. - v1.6.0 (2026‑03‑04) – Added X Lists fetching; ongoing maintenance.
Repository
- GitHub:
- Stars: 343 | Forks: 27
With x‑tweet‑fetcher, AI agents can retrieve tweets and related content instantly, without the overhead of API subscriptions, manual logins, or fragile scrapers. 🚀