OFFICIAL X API ยท AI AGENT READY

OpenClaw X

The safest way to connect AI agents to X/Twitter.
Official API writes. Free cookie reads. One endpoint.

Be first in line for the hosted SaaS version. No spam.

โœ… You're on the list! We'll reach out soon.
openclaw-x-api
# Post a tweet via Official API ๐Ÿ”ต
curl -X POST http://localhost:19816/tweet \
  -H "Content-Type: application/json" \
  -d '{"text": "Hello from OpenClaw X! ๐Ÿฆ…"}'

{"success": true, "channel": "official_api", "data": {"id": "20283..."}}

# Search tweets via Cookie ๐ŸŸ 
curl "http://localhost:19816/search?q=AI&count=5"

{"data": [...], "count": 5, "channel": "cookie"}
WHY OPENCLAW X

Two channels.
Zero compromise.

๐Ÿ”ต
OFFICIAL API

Safe Writes

Post tweets, like, retweet, and bookmark through the official X API with OAuth 1.0a. No risk of account suspension.

๐ŸŸ 
COOKIE

Free Reads

Timeline, search, tweet details, and user profiles through cookies. Unlimited reads at zero cost.

๐Ÿ“‹
DEBUGGING

Channel Logging

Every request logs which channel it uses. Crystal clear debugging with ๐Ÿ”ต and ๐ŸŸ  markers in real time.

ARCHITECTURE

How it works

01

One Endpoint

Your AI agent calls localhost:19816 โ€” a single FastAPI service that handles everything.

02

Smart Routing

Write operations (POST) route to the official X API via tweepy. Read operations (GET) route through cookies via twikit.

03

Transparent

Every response includes a "channel" field and every request gets logged with its routing channel.

ENDPOINTS

Full API Reference

Endpoint Method Description Channel
/health GET Health check + channel status โ€”
/tweet POST Create a tweet ๐Ÿ”ต Official
/tweet/{id}/like POST Like a tweet ๐Ÿ”ต Official
/tweet/{id}/retweet POST Retweet ๐Ÿ”ต Official
/tweet/{id}/bookmark POST Bookmark a tweet ๐Ÿ”ต Official
/timeline GET Home timeline ๐ŸŸ  Cookie
/search?q=... GET Search tweets ๐ŸŸ  Cookie
/tweet/{id} GET Tweet details ๐ŸŸ  Cookie
/user/{username} GET User profile ๐ŸŸ  Cookie
/user/{username}/tweets GET User's tweets ๐ŸŸ  Cookie

Ready to connect your
AI agent to X?

Join the waitlist for the hosted SaaS version โ€” or self-host today.

Join Waitlist View on GitHub