X Research But Cheaper
by @minilozio
X/Twitter research skill powered by TwitterAPI.io. Agentic search, profile analysis, thread reading, watchlists, and sourced briefings. Use when asked to sea...
clawhub install x-research-but-cheaperπ About This Skill
name: x-research description: > X/Twitter research skill powered by TwitterAPI.io. Agentic search, profile analysis, thread reading, watchlists, and sourced briefings. Use when asked to search X/Twitter, check what people are saying about a topic, monitor accounts, or research crypto/tech narratives on X. metadata: { "openclaw": { "emoji": "π¦", "requires": { "bins": ["node", "npx"] }, "primaryEnv": "TWITTERAPI_KEY", "envHint": "Get your API key from https://twitterapi.io β pay-per-use, no subscription needed" }, "clawhub": { "category": "research", "tags": ["twitter", "x", "research", "search", "social-media"], "website": "https://twitterapi.io" } }
X Research
General-purpose X/Twitter research agent powered by TwitterAPI.io. Search, filter, monitor β all from the terminal. No X Developer Portal account needed.
For API details: read references/twitterapi-io.md.
Why TwitterAPI.io?
| | X API Official | TwitterAPI.io | |---|---|---| | Cost | $100+/mo (Basic plan) | ~$0.15/1k tweets (pay-per-use) | | Setup | Developer Portal application | Just an API key | | Rate limit | 10 req/15min | 200 QPS | | Archive | 7 days (recent) | Full archive |
Setup
1. Get a TwitterAPI.io key from twitterapi.io
2. Set the env var:
export TWITTERAPI_KEY="your-key-here"
Or add to your .env file.3. Node.js 18+ required (for native fetch). No npm install needed β zero dependencies.
CLI Tool
All commands run from the scripts directory:
cd /scripts
Search
npx tsx x-search.ts search "" [options]
Options:
--sort likes|retweets|impressions|recent β sort order (default: likes)--since 1h|3h|12h|1d|7d β time filter--min-likes N β filter minimum likes--min-impressions N β filter minimum views--pages N β pages to fetch, 1-5 (default: 1)--limit N β max results to display (default: 15)--quick β fast mode: 1 page, max 10 results, noise filter, 1hr cache--from β shorthand for from:username in query--quality β filter low-engagement tweets (β₯10 likes)--no-replies β exclude replies--save β save results to file--type Top|Latest β search mode (default: Latest; Top returns algorithmic ranking)--json β raw JSON output--markdown β markdown formatted outputAuto-adds -is:retweet unless query already includes it. Cost estimate shown after each search.
Examples:
npx tsx x-search.ts search "AI agents Base chain" --sort likes --limit 10
npx tsx x-search.ts search "BNKR" --quick
npx tsx x-search.ts search "from:frankdegods" --sort recent
npx tsx x-search.ts search "(opus OR claude) trading" --pages 2 --save
npx tsx x-search.ts search "$SOL memecoin" --min-likes 50 --since 1d
Search operators (passed through to X):
| Operator | Example | Notes |
|----------|---------|-------|
| keyword | bun 2.0 | Implicit AND |
| OR | bun OR deno | Must be uppercase |
| - | -is:retweet | Negation |
| () | (fast OR perf) | Grouping |
| from: | from:elonmusk | Posts by user |
| to: | to:elonmusk | Replies to user |
| # | #buildinpublic | Hashtag |
| $ | $AAPL | Cashtag |
| lang: | lang:en | Language filter |
| is:retweet | -is:retweet | Filter retweets |
| is:reply | -is:reply | Filter replies |
| has:media | has:media | Contains media |
| has:links | has:links | Contains links |
| min_faves: | min_faves:100 | Min likes (native) |
Profile
npx tsx x-search.ts profile [--count N] [--replies] [--json]
Fetches user info and recent tweets. Excludes replies by default.
Single Tweet
npx tsx x-search.ts tweet [--json]
Thread
npx tsx x-search.ts thread
Fetches root tweet, author thread continuations, and replies in chronological order.
Replies
npx tsx x-search.ts replies [--sort likes|recent] [--limit N]
Get replies to a specific tweet, sorted by engagement.
Quote Tweets
npx tsx x-search.ts quotes [--sort likes|recent] [--limit N]
See who quoted a tweet and what they said.
Mentions
npx tsx x-search.ts mentions [--since 1d|7d] [--sort recent|likes] [--limit N]
Get tweets that mention a user. Great for tracking what people are saying about someone.
Followers / Following
npx tsx x-search.ts followers [--limit N]
npx tsx x-search.ts following [--limit N]
List a user's followers or who they follow. Shows name, follower count, and bio snippet.
Search Users
npx tsx x-search.ts users "" [--limit N]
Search for user accounts by keyword.
Trending
npx tsx x-search.ts trending [--woeid N] [--count N]
Get trending topics. Default: worldwide (woeid=1). Common WOEIDs: US=23424977, UK=23424975, Italy=23424853.
Community
npx tsx x-search.ts community # Community info
npx tsx x-search.ts community tweets # Community tweets
Research X Communities by ID.
Watchlist
npx tsx x-search.ts watchlist # Show all
npx tsx x-search.ts watchlist add [note] # Add account
npx tsx x-search.ts watchlist remove # Remove account
npx tsx x-search.ts watchlist check # Check recent from all
Watchlist stored in data/watchlist.json. Use for periodic monitoring β check if key accounts posted anything notable.
Cache
npx tsx x-search.ts cache clear # Clear all cached results
Default 15-minute TTL. Quick mode uses 1-hour TTL. Avoids repeat API charges.
Research Loop (Agentic)
When doing deep research (not just a quick search), follow this loop:
1. Decompose the Question into Queries
Turn the research question into 3-5 keyword queries:
from: specific known experts(broken OR bug OR issue)(shipped OR love OR fast)has:links for resource-rich tweets-airdrop -giveaway -whitelist if needed2. Search and Extract
Run each query via CLI. After each, assess:
from: specifically?thread command?3. Follow Threads
When a tweet has high engagement or is a thread starter:
npx tsx x-search.ts thread
4. Synthesize
Group findings by theme, not by query:
### [Theme/Finding Title][1-2 sentence summary]
@username: "[key quote]" (β₯ N, π N) Tweet
@username2: "[another perspective]" (β₯ N, π N) Tweet
5. Save
Use --save flag or --markdown for research docs.
Refinement Heuristics
--no-replies, use --sort likes, narrow keywordsOR, remove restrictive operators-airdrop -giveaway -whitelist to queryfrom: or --min-likes 50has:linksHeartbeat Integration
On heartbeat, run watchlist check to see if key accounts posted anything notable. Flag only if genuinely interesting/actionable.
Cost
TwitterAPI.io pay-per-use pricing:
File Structure
skills/x-research/
βββ SKILL.md # This file
βββ package.json # Zero dependencies
βββ scripts/
β βββ x-search.ts # CLI entry point
β βββ lib/
β βββ api.ts # TwitterAPI.io wrapper
β βββ cache.ts # File-based cache (15min/1hr TTL)
β βββ format.ts # Terminal + markdown formatters
βββ data/
β βββ watchlist.json # Accounts to monitor
β βββ cache/ # Auto-managed
βββ references/
βββ twitterapi-io.md # API endpoint reference
Requirements
fetch)βοΈ Configuration
1. Get a TwitterAPI.io key from twitterapi.io
2. Set the env var:
export TWITTERAPI_KEY="your-key-here"
Or add to your .env file.3. Node.js 18+ required (for native fetch). No npm install needed β zero dependencies.