Our agency was paying $200 a month for X's official API just to schedule and post tweets. That's nearly $2,400 a year for what is essentially a POST request. At some point we looked at each other and asked why we were still funding this nonsense.
So we built a FastAPI backend that talks directly to X's internal GraphQL API - the same one your browser uses when you hit 'Tweet'. It uses session cookies instead of API keys, spoofs browser-level TLS fingerprinting with curl_cffi, and scrapes X's JavaScript bundles on startup to keep up with their query IDs and feature flags. Deploy it on Render or Railway, point your n8n webhook at it, and you're posting tweets for the cost of a residential proxy.
We've been running this internally and decided to open-source it: [link]
I want to be upfront about the tradeoffs because this is not plug-and-play. Sessions can expire. Datacenter IPs get blocked almost immediately - you'll need residential proxies. X updates their TLS fingerprinting checks periodically, which means the hardcoded browser version in the code needs bumping when that happens. And if you're hammering it with more than 50 tweets a day, you will get your account locked. This is a tool you maintain alongside your workflows, not a set-it-and-forget-it solution.
The repo includes a health check endpoint you can ping every 14 minutes to keep your container alive, a debug endpoint showing raw X responses, and an IP check endpoint to verify your proxy is working. Environment setup is straightforward if you've deployed Python apps before.
The hardest part isn't the code itself. It's understanding why things break. If you don't know what a JA3 fingerprint is or why your session token expired after changing networks, you're going to have a rough time debugging. That's the gap with this whole automation approach - the people who can run it don't need much help, and the people who want it usually need more support than a README can provide.
If anyone has questions about the setup or runs into issues deploying it, happy to help in the comments. And if you just want someone to handle this kind of infra, my agency does that too - but genuinely, the repo should be enough for most technical folks here.