DEV Community

Garyvov
Garyvov

Posted on

AI Agents Can Finally Fetch Tweets Without Login! This OpenClaw Skill Makes It Zero-Config

AI Agents Can Finally Fetch Tweets Without Login! This OpenClaw Skill Makes It Zero-Config

343 stars, updated 2 days ago, supports Twitter + WeChat + Chinese platforms, completely free.

How would you make an AI Agent read tweets?

Apply for Twitter API? $100+/month. Use scrapers? Get banned instantly. Copy-paste manually? Then why have an AI?

x-tweet-fetcher solves this: An OpenClaw skill that fetches tweets with zero configuration.

No API key, no login, no cookies. One command, JSON output, ready for agents.


What It Does

Basic Features (Zero Dependencies)

# Fetch a single tweet
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456"

# Output
{
  "text": "Tweet content...",
  "likes": 91,
  "retweets": 23,
  "views": 14468,
  "media": ["image URLs"],
  "quoted_tweet": {...}
}
Enter fullscreen mode Exit fullscreen mode

Supports:

  • Regular tweets (full text + metrics)
  • Long tweets (Twitter Blue)
  • X Articles (long-form)
  • Quoted tweets
  • Metrics (likes/retweets/views)

Advanced Features (Requires Camofox)

# Replies (threaded)
python3 scripts/fetch_tweet.py --url "URL" --replies

# User timeline (up to 200 tweets)
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
Enter fullscreen mode Exit fullscreen mode

Exit codes:

  • 0 = No new content
  • 1 = New content found
  • 2 = Error

Perfect for Cron automation.


Beyond Twitter

WeChat Official Account Search

python3 scripts/sogou_wechat.py --keyword "AI Agent" --limit 10 --json
Enter fullscreen mode Exit fullscreen mode

Output: title, URL, author, date. No API key needed, uses Sogou search.

Tweet Discovery

python3 scripts/x_discover.py --keywords "AI Agent,LLM tools" --limit 5 --json
Enter fullscreen mode Exit fullscreen mode

DuckDuckGo + Camofox Google fallback.

Chinese Platforms

python3 scripts/fetch_china.py --url "Weibo/Bilibili/CSDN/WeChat link"
Enter fullscreen mode Exit fullscreen mode

Auto-detects platform, unified JSON output.


Python Module Import

from scripts.fetch_tweet import fetch_tweet

# Fetch tweet
tweet = fetch_tweet("https://x.com/user/status/123456")
print(tweet["text"])

# Search WeChat articles
from scripts.sogou_wechat import sogou_wechat_search
articles = sogou_wechat_search("AI Agent", max_results=10)

# Discover tweets
from scripts.x_discover import discover_tweets
result = discover_tweets(["AI Agent"], max_results=5)
Enter fullscreen mode Exit fullscreen mode

Direct agent integration, no wrapper needed.


Cron Automation

# Check @mentions every 30 minutes
*/30 * * * * python3 fetch_tweet.py --monitor @username || notify-send "New mentions!"

# Discover new tweets daily at 9 AM
0 9 * * * python3 x_discover.py --keywords "AI Agent" --json >> ~/discoveries.jsonl
Enter fullscreen mode Exit fullscreen mode

Exit code 0/1/2 design, perfect for automation.


Technical Details

Basic Tweets

FxTwitter public API: No authentication, direct HTTP requests, structured JSON response.

Advanced Features

Camofox headless browser:

  • Based on Camoufox (Firefox fork)
  • C++-level fingerprint spoofing
  • Bypasses Google, Cloudflare, anti-bot detection

Nitter parsing: Extracts tweet content, FxTwitter API supplements view counts.

WeChat Search

Sogou search: Direct HTTP, no browser needed, returns title, URL, author, date.


Installation

Basic Features (Zero Dependencies)

git clone https://github.com/ythx-101/x-tweet-fetcher.git
python3 scripts/fetch_tweet.py --url "URL"
Enter fullscreen mode Exit fullscreen mode

Done.

Advanced Features (Requires Camofox)

# Option 1: OpenClaw plugin
openclaw plugins install @askjo/camofox-browser

# Option 2: Standalone
git clone https://github.com/jo-inc/camofox-browser
cd camofox-browser && npm install && npm start  # Port 9377
Enter fullscreen mode Exit fullscreen mode

Why Choose It

Tool Login Required API Key Required Platforms Price
Twitter API Twitter only $100+/month
xfetch ✅ (Cookie) Twitter only Free
x-tweet-fetcher Twitter+WeChat+Chinese Free

Core advantages:

  • Zero config (no API key, login, or cookies)
  • Agent-friendly (JSON output, Python modules)
  • Cron-friendly (exit code design)
  • Multi-platform (Twitter + WeChat + Weibo + Bilibili + CSDN)
  • Anti-bot (Camofox fingerprint spoofing)

Use Cases

1. AI Agent Data Collection

from scripts.fetch_tweet import fetch_tweet

# Agent auto-fetches tweets
tweet = fetch_tweet(url)
agent.process(tweet["text"])
Enter fullscreen mode Exit fullscreen mode

No manual intervention.

2. Content Monitoring

# Cron scheduled monitoring
*/30 * * * * python3 fetch_tweet.py --monitor @competitor
Enter fullscreen mode Exit fullscreen mode

Instant notification on new mentions.

3. Competitor Analysis

# Fetch competitor timeline
python3 scripts/fetch_tweet.py --user competitor --limit 100
Enter fullscreen mode Exit fullscreen mode

Analyze content strategy.

4. Content Creation

# Discover trending topics
python3 scripts/x_discover.py --keywords "AI,LLM" --limit 20
Enter fullscreen mode Exit fullscreen mode

Collect material.

5. Academic Research

# Batch fetch tweet data
tweets = [fetch_tweet(url) for url in urls]
analyze(tweets)
Enter fullscreen mode Exit fullscreen mode

For research analysis.


Recent Updates

v1.6.2 (2026-03-04, 2 days ago):

  • Extract tweet_id from Nitter
  • Supplement view counts via FxTwitter API

v1.6.1 (2026-03-04, 3 days ago):

  • Lists parsing fix
  • Added retweeted_by and quoted_tweet fields

v1.6.0 (2026-03-04):

  • X Lists fetching

Actively maintained, continuously updated.


Open Source


Summary

AI agents fetching tweets no longer need to apply for API ($100+/month), manually login (cookies expire), or write scrapers (get banned).

Use x-tweet-fetcher: zero config, zero cost, zero maintenance.

git clone https://github.com/ythx-101/x-tweet-fetcher.git
python3 scripts/fetch_tweet.py --url "URL"
Enter fullscreen mode Exit fullscreen mode

Twitter + WeChat + Chinese platforms, one tool does it all.

Top comments (0)