X (Twitter) API
CLI tool for authenticated X (Twitter) API requests. Post tweets, reply, quote, search, read posts, manage followers, send DMs, and upload media.
Tags: twitter, x, social-media, api, posting
Category: Social Media
Use Cases
- Automated posting — schedule and publish tweets from your AI workflow
- Mention monitoring — track replies and mentions, draft responses
- Research and analysis — search tweets on topics for market research
- Thread publishing — write and post multi-tweet threads
- Engagement automation — like, reply, and retweet based on criteria
- Content repurposing — turn blog posts or notes into tweet threads
Tips
- Run `xurl auth status` to verify credentials are configured before any operations
- Use `xurl search` for research and trend monitoring — powerful for content strategy
- Register multiple apps for different accounts and switch between them
- Pair with cron for scheduled posting — draft tweets and queue them for optimal times
- Use `xurl thread` to post multi-tweet threads in a single command
- Always verify tweet content before posting — the skill confirms but double-check anyway
Known Issues & Gotchas
- NEVER use --verbose/-v in agent sessions — it exposes auth tokens in output
- Credential file ~/.xurl must be set up manually by the user, never by the AI agent
- X API v2 has strict rate limits — 1500 tweets/month on free tier, 100 reads per 15 min
- OAuth 2.0 tokens expire — re-auth with `xurl auth oauth2` when you get 401 errors
- Free tier X API is severely limited — most useful features require Basic ($100/mo) or Pro ($5000/mo)
- Media uploads require separate API calls before attaching to tweets — not a single command
Alternatives
- Postiz Agent
- bird (community skill)
- x-research-skill
- Typefully API
Community Feedback
Excited to push xurl 1.0.3 — our official X API CLI tool optimized for agents. Action chaining, reusable skills.
— X (Twitter) - @chrisparkX
Built a CLI for X (twitter). Just wanted to share this with you in case you might find it useful. The agent integration is what makes it special.
— Reddit r/GrowthHacking
A complete guide to every OpenClaw skill that posts to Twitter/X. Installation, configuration, security warnings about malicious skills.
— OpenTweet Blog
Use bird to read/search X and post tweets/replies. Quick start with bird whoami. There are multiple Twitter skills but xurl is the official one.
— Reddit r/myclaw
Configuration Examples
Initial authentication
# Check if credentials exist
xurl auth status
# Set up OAuth 2.0 (do this manually, NOT in agent session)
xurl auth oauth2
# Verify identity
xurl whoamiCommon operations
# Post a tweet
xurl post "Hello from my AI agent!"
# Search tweets
xurl search "openclaw" --limit 10
# Read a user's timeline
xurl timeline @username --limit 5
# Post a thread
xurl thread "First tweet" "Second tweet" "Final tweet"Raw API access
# Any v2 endpoint
xurl raw GET /2/users/me
# With query parameters
xurl raw GET /2/tweets/search/recent --query "AI agents" --max_results 10Installation
brew install xdevplatform/tap/xurlSource: bundled