Fetch tweets, comments, timelines, and articles from X/Twitter β without login or API keys.
Zero config Β· Agent-first JSON output Β· Cron-friendly exit codes Β· WeChat + X in one tool
Quick Start Β· Capabilities Β· Cron Integration Β· How It Works
You: fetch that tweet 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.
x-tweet-fetcher solves this: one command β structured JSON, ready for your agent to consume. No API keys, no login, no cookies.
| Feature | Zero Deps | With Camofox | Output |
|---|---|---|---|
| Single tweet | β | β | text, stats, media, quotes |
| Reply comments | β | β | threaded comment tree |
| User timeline | β | β | paginated tweet list (up to 200) |
| X Articles (long-form) | β | β | full article text |
| X Lists | β | β | paginated tweet list |
| @mentions monitor | β | β | incremental new mentions |
| WeChat article search | β | β | title, url, author, date |
| Tweet discovery | β | optional | keyword search results |
| Google search | β | β | zero API key alternative |
| Chinese platforms | partial | β | Weibo/Bilibili/CSDN/WeChat |
| User profile analysis | β | β + LLM | MBTI, Big Five, topic graph |
| X-Tracker (growth) | β | β | burst detection, propagation analysis |
| Paper Recommend | β | β | related papers via Semantic Scholar |
| Author Finder | β | β | arxiv paper β author Twitter handles |
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).
git clone https://github.com/ythx-101/x-tweet-fetcher.git
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456"
# Done. JSON output with text, likes, retweets, views, media URLs.from scripts.fetch_tweet import fetch_tweet
# Fetch a tweet β structured data
tweet = fetch_tweet("https://x.com/user/status/123456")
# {"text": "...", "likes": 91, "retweets": 23, "views": 14468, ...}
# Search WeChat articles (no API key)
from scripts.sogou_wechat import sogou_wechat_search
articles = sogou_wechat_search("AI Agent", max_results=10)
# Discover tweets by keyword
from scripts.x_discover import discover_tweets
result = discover_tweets(["AI Agent", "automation"], max_results=5)
# Google search via Camofox (no API key)
from scripts.camofox_client import camofox_search
results = camofox_search("fetch tweets without API key")# Single tweet (JSON)
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123"
# Human-readable output
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123" --text-only
# Reply comments (requires Camofox)
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123" --replies
# User timeline (up to 200 tweets, auto-pagination)
python3 scripts/fetch_tweet.py --user elonmusk --limit 50
# X Lists
python3 scripts/fetch_tweet.py --list "https://x.com/i/lists/123456"
# X Articles (long-form)
python3 scripts/fetch_tweet.py --article "https://x.com/i/article/123"
# Monitor @mentions (cron-friendly)
python3 scripts/fetch_tweet.py --monitor @username
# WeChat article search
python3 scripts/sogou_wechat.py --keyword "AI Agent" --limit 10 --json
# Discover tweets by keyword
python3 scripts/x_discover.py --keywords "AI Agent,LLM tools" --limit 5 --json
# Chinese platforms (auto-detect: Weibo/Bilibili/CSDN/WeChat)
python3 scripts/fetch_china.py --url "https://mp.weixin.qq.com/s/..."
# Google search (zero API key)
python3 scripts/camofox_client.py "OpenClaw AI agent"
# User profile analysis
python3 scripts/x-profile-analyzer.py --user elonmusk --count 100
# ββ X-Tracker: Tweet Growth Monitoring ββ
# 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 --crossAll monitoring scripts use exit codes for automation:
| Exit Code | Meaning |
|---|---|
0 |
No new content |
1 |
New content found |
2 |
Error |
# Check mentions every 30 min
*/30 * * * * python3 fetch_tweet.py --monitor @username || notify-send "New mentions!"
# Discover tweets daily
0 9 * * * python3 x_discover.py --keywords "AI Agent" --cache ~/.cache/discover.json --json >> ~/discoveries.jsonl
# X-Tracker: 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)Track your tweets' growth and detect viral moments β inspired by semiconductor ETCH Endpoint Detection.
New tweet posted
β
βΌ
Fast sampling (every 15min for 48h)
β
βββ dV/dt spike? ββββββββ Candidate burst
β β
β 3 consecutive? ββ β
BURST CONFIRMED
β β
β RT/view ratio ββ Influencer vs Algorithm
β
βΌ
Normal sampling (hourly)
β
βββ 6Γ growth < 2%/h ββ Long tail
| 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 |
ββββββββββββββββββββββββββββββββββββββββββββββββββ
ζ¨ζε’ιΏζ₯εοΌmy launch tweet
ID: 2024390277386076183
ββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ ζ΄δ½ε’ιΏ ββ
ζ΅θ§οΌ 4,560 β 11,245 (+146.6%)
ηΉθ΅οΌ 40 β 73 (+82.5%)
ζΆθοΌ 35 β 88 (+151.4%)
ββ ηηΉζΆι΄ηͺε£ ββ
εΌε§οΌ2026-02-20 12:00
η»ζοΌ2026-02-21 08:00
ζη»οΌ20.0h
ζ°ε’ζ΅θ§οΌ+4,898
ε³°εΌε’ιοΌ103%/h
ββ δΌ ζζ¨‘εΌ ββ
ζ··εδΌ ζοΌεΉ³ε 0.53β° RT/ε欑ζ΅θ§οΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββ
All thresholds in scripts/growth_config.py:
ETCH_SPIKE_RATE = 0.30 # 30%/h triggers candidate
ETCH_CONFIRM_COUNT = 3 # 3 consecutive = confirmed
WEIGHT_BOOKMARKS = 1.5 # Bookmarks weighted 1.5x
WEIGHT_RETWEETS = 3.0 # Retweets weighted 3xRequired for: comments, timelines, mentions, Google search, non-WeChat Chinese platforms.
# 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 9377Camofox is built on Camoufox β a Firefox fork with C++ level fingerprint spoofing. Bypasses Google, Cloudflare, and most anti-bot detection.
βββββββββββββββ
--url β FxTwitter β β Public API, no auth
β (free) β
ββββββββ¬βββββββ
β JSON
ββββββββββββ ββββββββ΄βββββββ ββββββββββββ
β --repliesβ β β β Agent β
β --user ββββββββΆβ Camofox ββββββββΆβ (JSON) β
β --monitorβ β (browser) β β β
β --list β βββββββββββββββ ββββββββββββ
ββββββββββββ
βββββββββββββββ
--keyword β DuckDuckGo β β No API key
sogou_wechat β Sogou β
βββββββββββββββ
- Basic tweets: FxTwitter public API (no auth)
- Comments/Timeline/Mentions: Camofox headless Firefox + Nitter parsing
- Views supplement: FxTwitter API auto-fills view counts missing from Nitter
- WeChat search: Sogou search (direct HTTP, no browser)
- Tweet discovery: DuckDuckGo with Camofox Google fallback
- Chinese platforms: Direct HTTP for WeChat; Camofox for others
Found a paper on X? Get related papers and author Twitter handles in one command.
# From a tweet containing a paper link
python3 scripts/paper_recommend.py --tweet "https://x.com/someone/status/123"
# From ArXiv
python3 scripts/paper_recommend.py --arxiv 1706.03762
# From GitHub repo
python3 scripts/paper_recommend.py --github "https://github.com/org/repo"
# From paper title
python3 scripts/paper_recommend.py --title "Attention Is All You Need"
# Chinese output
python3 scripts/paper_recommend.py --arxiv 1706.03762 --zh
# JSON output
python3 scripts/paper_recommend.py --arxiv 1706.03762 --jsonOutput: Top-N related papers with title, authors, citation count, abstract, and links β ranked by citations across references, cited-by, and same-author papers.
# Find paper authors' Twitter/X handles
python3 scripts/arxiv_author_finder.py --arxiv 1706.03762
# With verbose output
python3 scripts/arxiv_author_finder.py --arxiv "https://arxiv.org/abs/2603.10165" --verbose4-layer cascade: ArXiv API β GitHub profiles β Scholars dataset β Search engines.
| API | Purpose | Key Required? |
|---|---|---|
| ArXiv | Paper metadata | β |
| Semantic Scholar | Citations, recommendations | β (optional key for higher rate limits) |
| GitHub REST | Author Twitter lookup | β (optional token for higher rate limits) |
Optional environment variables for better performance:
export S2_API_KEY="your-key" # https://semanticscholar.org/product/api
export GITHUB_TOKEN="your-token" # https://github.com/settings/tokens| Required | Optional | |
|---|---|---|
| Runtime | Python 3.7+ | β |
| Basic tweets | Nothing else | β |
| Advanced features | Camofox | duckduckgo-search (pip) |
| Profile analysis | Camofox + LLM API key | β |
Issues and PRs welcome! Especially:
- π Parsing edge cases (new Nitter layouts, X Article formats)
- π New platform support (Threads, Mastodon, etc.)
- π Performance improvements for large-scale fetching
Built for AI agents. Used by OpenClaw π¦
GitHub Β· Issues Β· OpenClaw Q&A