by ythx-101
Fetch X/Twitter tweets, replies, timelines, and articles without login or API keys — field tool for AI agents.
# Add to your Claude Code skills
git clone https://github.com/ythx-101/x-tweet-fetcherGuides for using ai agents skills like x-tweet-fetcher.
Last scanned: 5/12/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-12T06:37:46.239Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": true
}x-tweet-fetcher is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by ythx-101. Fetch X/Twitter tweets, replies, timelines, and articles without login or API keys — field tool for AI agents. It has 884 GitHub stars.
Yes. x-tweet-fetcher passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/ythx-101/x-tweet-fetcher" and add it to your Claude Code skills directory (see the Installation section above). x-tweet-fetcher ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
x-tweet-fetcher is primarily written in Python. It is open-source under ythx-101 on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh x-tweet-fetcher against similar tools.
No comments yet. Be the first to share your thoughts!
Fetch tweets from X/Twitter without authentication. Supports tweet content, reply threads, user timelines, Chinese platforms, and tweet growth tracking. For agent-use stories, failures, and field reports, start from #22 Teahouse / 茶座.
| Feature | Command | Dependencies |
|---|---|---|
| Single tweet | --url <tweet_url> |
None (zero deps) |
| Reply threads | --url <tweet_url> --replies |
Camofox |
| User timeline | --user <username> --limit 300 |
Camofox |
| Chinese platforms | fetch_china.py --url <url> |
Camofox (except WeChat) |
| Google search | camofox_search("query") |
Camofox |
| X-Tracker (growth) | tweet_growth_cli.py --add/--run/--report |
None (zero deps) |
# JSON output
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456"
# Text only (human readable)
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456" --text-only
# Pretty JSON
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456" --pretty
| Content Type | Support |
|---|---|
| Regular tweets | ✅ Full text + stats |
| Long tweets (Twitter Blue) | ✅ Full text |
| X Articles (long-form) | ✅ Complete article text |
| Quoted tweets | ✅ Included |
| Stats (likes/RT/views) | ✅ Included |
| Media URLs | ✅ Images + videos |
⚠️ The following features require Camofox browser service running on
localhost:9377. See Camofox Setup below.
# Fetch tweet + all replies (including nested replies)
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456" --replies
# Text-only mode with replies
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456" --replies --text-only
# Fetch latest tweets from a user (supports pagination, MAX_PAGES=20)
python3 scripts/fetch_tweet.py --user <username> --limit 300
# Auto-detects platform from URL
python3 scripts/fetch_china.py --url "https://weibo.com/..." # Weibo
python3 scripts/fetch_china.py --url "https://bilibili.com/..." # Bilibili
python3 scripts/fetch_china.py --url "https://csdn.net/..." # CSDN
python3 scripts/fetch_china.py --url "https://mp.weixin.qq.com/..." # WeChat (no Camofox needed!)
| Platform | Status | Notes |
|---|---|---|
| WeChat Articles | ✅ | Uses web_fetch directly, no Camofox |
| ✅ | Camofox renders JS | |
| Bilibili | ✅ | Video info + stats |
| CSDN | ✅ | Articles + code blocks |
| Zhihu / Xiaohongshu | ⚠️ | Needs cookie import for login |
# Python
from scripts.camofox_client import camofox_search
results = camofox_search("your search query")
# Returns: [{"title": "...", "url": "...", "snippet": "..."}, ...]
# CLI
python3 scripts/camofox_client.py "your search query"
Uses Camofox browser to search Google directly. No Brave API key needed, no cost.
Camofox is an anti-detection browser service based on Camoufox (a Firefox fork with C++ level fingerprint masking). It bypasses:
Option 1: OpenClaw Plugin
openclaw plugins install @askjo/camofox-browser
Option 2: Manual Install
git clone https://github.com/jo-inc/camofox-browser
cd camofox-browser
npm install && npm start
curl http://localhost:9377/health
# Should return: {"status":"ok"}
# Create tab
POST http://localhost:9377/tabs
Body: {"userId":"test", "sessionKey":"test", "url":"https://example.com"}
# Get page snapshot
GET http://localhost:9377/tabs/<TAB_ID>/snapshot?userId=test
# Close tab
DELETE http://localhost:9377/tabs/<TAB_ID>?userId=test
from scripts.fetch_tweet import fetch_tweet
result = fetch_tweet("https://x.com/user/status/123456")
tweet = result["tweet"]
# Regular tweet
print(tweet["text"])
print(f"Likes: {tweet['likes']}, Views: {tweet['views']}")
# X Article (long-form)
if tweet.get("is_article"):
print(tweet["article"]["title"])
print(tweet["article"]["full_text"])
# Links found in replies
for reply in result.get("replies", []):
for link in reply.get("links", []):
print(link)
{
"url": "https://x.com/user/status/123",
"username": "user",
"tweet_id": "123",
"tweet": {
"text": "Tweet content...",
"author": "Display Name",
"screen_name": "username",
"likes": 100,
"retweets": 50,
"bookmarks": 25,
"views": 10000,
"replies_count": 30,
"created_at": "Mon Jan 01 12:00:00 +0000 2026",
"is_note_tweet": false,
"is_article": true,
"article": {
"title": "Article Title",
"full_text": "Complete article content...",
"word_count": 4847
}
},
"replies": [
{
"author": "@someone",
"text": "Reply text...",
"likes": 5,
"links": ["https://github.com/..."],
"thread_replies": [{"text": "Nested reply..."}]
}
]
}
x-tweet-fetcher/
├── SKILL.md # This file
├── README.md # GitHub page with full docs
├── scripts/
│ ├── fetch_tweet.py # Main fetcher (tweet + replies + timeline)
│ ├── fetch_china.py # Chinese platform fetcher
│ ├── camofox_client.py # Camofox REST API client + camofox_search()
│ └── x-profile-analyzer.py # User profile analysis (AI-powered)
└── CHANGELOG.md
Track your tweets' growth and detect viral moments — inspired by semiconductor ETCH Endpoint Detection.
# Add a tweet to track
python3 scripts/tweet_growth_cli.py --add "https://x.com/user/status/123" "my launch tweet"
# List all tracked tweets
python3 scripts/tweet_growth_cli.py --list
# Run sampling (new tweets <48h, every 15min)
python3 scripts/tweet_growth_cli.py --run --fast
# Run sampling (all tweets, hourly)
python3 scripts/tweet_growth_cli.py --run --normal
# Generate analysis report
python3 scripts/tweet_growth_cli.py --report 123456789
# Report with topic cross-analysis
python3 scripts/tweet_growth_cli.py --report 123456789 --cross
# Dual-frequency sampling
*/15 * * * * python3 tweet_growth_cli.py --run --fast # New tweets (<48h)
0 * * * * python3 tweet_growth_cli.py --run --normal # All tweets (hourly)
| Component | Method | Purpose |
|---|---|---|
| Derivative detection | dV/dt per hour | Spot sudden acceleration |
| Sliding window | 5-sample moving average | Filter noise |
| Multi-signal fusion | views×1 + likes×1 + bookmarks×1.5 + RT×3 | Weighted composite score |
| Burst confirmation | 3 consecutive windows above threshold | Prevent false positives |
| Surge override | Single window +100%/h | Catch massive spikes |
| Saturation | 6 samples < 2%/h growth | Detect long tail |
| Propagation | RT-per-1k-views ratio | Influencer vs algorithm driven |
🎯 Burst detected at 2026-03-14 08:45
- Growth rate: 156%/h
- Composite score: +2847 (views +1200, RT +89, likes +234)
- Propagation: 12.3 RT/1k views (influencer-driven)
Fetch tweets, lists, articles, and WeChat content — with smart backend routing.
Three backends · Auto fallback · Works everywhere (VPS / Mac / Windows / CI / Claude Code / OpenClaw)
Quick Start · Backends · Capabilities · Agent Waystation · Self-hosted Nitter · Claude Code & CC
You: fetch that tweet / list / article for me
AI: I can't access X/Twitter. Please copy-paste the content manually.
You: ...seriously?
X has no free API. Scraping gets you blocked. Browser automation is fragile and won't work in headless environments.
x-tweet-fetcher solves this with smart backend routing: Nitter for zero-dependency speed, Playwright for full-feature coverage, auto fallback between them.
# Auto mode (default) — Nitter first, browser fallback
python3 scripts/fetch_tweet.py --user elonmusk
# Nitter only — zero dependency, no browser
python3 scripts/fetch_tweet.py --user elonmusk --backend nitter
# Browser only — full features (lists, articles)
python3 scripts/fetch_tweet.py --list 1455045069516357634 --backend browser
| Backend | Deps | Speed | Features |
|---|---|---|---|
| nitter | None (stdlib only) | ⚡ Fast | Timeline, search, replies, profile, mentions |
| browser | Playwright/Chromium | 🐢 Slower | Everything above + Lists + Articles + fetch_china |
| auto (default) | Best available | ⚡→🐢 | Tries nitter first, falls back to browser |
OpenClaw users: Playwright + Chromium are built-in.
--backend autojust works — no extra install needed.
| Feature | Backend | Output |
|---|---|---|
| Single tweet | FxTwitter (always) | text, stats, media, quotes |
| Reply comments | nitter / browser | threaded comment list |
| User timeline | nitter / browser | paginated tweet list |
| @mentions monitor | nitter / browser | incremental new mentions |
| Keyword search | nitter / browser | real-time tweet stream |
| X Lists | browser only | list member tweets |
| X Articles | browser only | full long-form content |
| User profile analysis | nitter + LLM | MBTI, Big Five, topic graph |
| WeChat article search | Sogou (direct HTTP) | title, url, author, date |
| WeChat/Weibo/Bilibili | browser only | via fetch_china.py |
| Tweet growth tracker | FxTwitter API | growth curves, burst detection |
For AI Agents: All output is structured JSON. Import as Python modules for direct integration. Exit codes are cron-friendly (
0=nothing new,1=new content).
x-tweet-fetcher is one of the field tools maintained from Agent Waystation — a stopover for AI agents, builders, tools, and field reports.
If you are building an agent that reads X/Twitter, start from the #22 Teahouse / 茶座. It is the active front desk for real usage stories, questions, failures, and agent field notes.
Bring one concrete scene:
From there, tool-specific bugs can move to x-tweet-fetcher issues, and broader agent workflow notes can become Waystation field reports.
Known limitation: the current first-run field report verifies onboarding, CLI help, structured error paths, local Nitter failure handling, and empty local state behavior. It does not prove that public tweet fetching is currently restored end to end. Treat it as an error-path / first-run case study, not a successful fetch recovery announcement.
中文:如果你也在养一个会看 X/Twitter 的 Agent,先来 #22 茶座 坐坐。贴链接、贴推文、贴使用场景、贴翻车现场都可以;茶座会把它分流成工具问题、field report,或者新的 agent 任务。
→ Join #22 Teahouse / 进入 #22 茶座
# Works immediately — no Nitter, no browser needed
python3 scripts/fetch_tweet.py --url https://x.com/elonmusk/status/123456789
# Set your Nitter instance URL (for nitter/auto mode)
export NITTER_URL=http://127.0.0.1:8788
# User timeline
python3 scripts/fetch_tweet.py --user elonmusk --limit 20
# Keyword search — real-time tweets
python3 scripts/nitter_client.py --search "AI agent"
# Tweet replies
python3 scripts/fetch_tweet.py --url https://x.com/elonmusk/status/123456789 --replies
# @mentions monitoring (cron-friendly)
python3 scripts/fetch_tweet.py --monitor @yourusername
# User profile analysis
python3 scripts/x-profile-analyzer.py --user elonmusk --count 100
# X List — requires Playwright
python3 scripts/fetch_tweet.py --list 1455045069516357634 --backend browser
# X Article
python3 scripts/fetch_tweet.py --article https://x.com/user/article/123 --backend browser
# WeChat / Weibo / Bilibili
python3 scripts/fetch_china.py --url "https://mp.weixin.qq.com/s/..."
python3 scripts/sogou_wechat.py --keyword "AI Agent" --limit 5 --json
Since x-tweet-fetcher has zero mandatory dependencies, it works perfectly in constrained environments:
| Environment | nitter mode | browser mode | Notes |
|---|---|---|---|
| Claude Code (CC) | ✅ | ❌ | No browser runtime |
| OpenClaw | ✅ | ✅ | Playwright built-in |
| VPS (headless Linux) | ✅ | ✅* | *needs pip install playwright |
| Mac / Windows | ✅ | ✅* | *needs pip install playwright |
| CI/CD pipelines | ✅ | ⚠️ | Possible but heavy |
| Docker containers | ✅ | ⚠️ | Needs Chromium in image |
| Termux (Android) | ✅ | ❌ | No Chromium |
# In Claude Code (nitter mode, zero deps):
export NITTER_URL=http://your-vps:8788
python3 scripts/fetch_tweet.py --user YuLin807 --limit 10
# In OpenClaw (auto mode, full features):
python3 scripts/fetch_tweet.py --user YuLin807 --limit 10
# → auto-detects Nitter, falls back to Playwright if needed
⚠️ Public Nitter instances are dead or unreliable (as of March 2026). Self-hosting is the only reliable option.
Twitter removed guest API access in 2023. Public Nitter instances get rate-limited because thousands of users share a few accounts. Your own instance = your own rate limits.
# Ubuntu/Debian
sudo apt install -y redis-server libpcre3-dev libsass-dev
# Install Nim
curl https://nim-lang.org/choosenim/init.sh -sSf | sh
export PATH=$HOME/.nimble/bin:$PATH
git clone https://github.com/zedeus/nitter
cd nitter
nimble build -d:release
nimble scss
cp nitter.example.conf nitter.conf
Use a secondary account (not your main).
x.comauth_token and ct0sessions.jsonl:{"kind":"cookie","username":"myaccount","authToken":"YOUR_AUTH_TOKEN","ct0":"YOUR_CT0"}
[Server]
address = "127.0.0.1" # Local only!
port = 8788
[Config]
hmacKey = "$(openssl rand -hex 32)"
[Tokens]
tokenFile = "sessions.jsonl"
sudo systemctl start redis-server
./nitter
# Test
curl http://127.0.0.1:8788/YuLin807
export NITTER_URL=http://127.0.0.1:8788
python3 scripts/nitter_client.py --search "test"
127.0.0.1 only — never expose to public internet ┌─────────────┐
--url │ FxTwitter │ ← Public API, no auth needed
│ (free) │
└──────┬──────┘
│ JSON
┌────────────┴────────────┐
│ --backend auto │
│ ┌───────┐ ┌────────┐ │ ┌──────────┐
--user │ │Nitter │→→│Browser │ │ │ Agent │
--replies │ │(fast) │ │(full) │ │──────▶│ (JSON) │
--monitor │ │ 0 dep │ │Playwrt │ │ │ │
--search │ └───────┘ └────────┘ │ └──────────┘
--list └─────────────────────────┘
--article
┌─────────────┐
sogou_wechat │ Sogou │ ← Direct HTTP, no API key
fetch_china │ (search) │
└─────────────┘
Python 3.7+ (that's it for nitter mode)
| Mode | Extra requirement |
|---|---|
--backend nitter |
Nothing (Python stdlib only) |
--backend browser |
pip install playwright + playwright install chromium |
--backend auto |
Uses whatever is available |