Maintained by an agent
This repo is autopatched by an OpenClaw agent when x.com drifts. Patch versions are machine-authored parser fixes; minor and major bumps stay human.
Search X and fetch data through your logged-in Chrome tab. Localhost API, no copied cookies, no API keys.
In March 2026, x.com stopped shipping the ondemand.s.<hash>.js file that most
Python-side X scrapers parsed to generate the client transaction id required for authenticated GraphQL calls.
The libraries aren't abandoned and the authors aren't at fault. The token-derivation pipeline they depended on no longer exists in the wire protocol. Reproducing it server-side means emulating a moving target.
x-bridge takes the other path. If the real browser already has the token, let the real browser do the request. A CDP-injected bridge script listens to the fetches x.com is making anyway, forwards their responses to a local Node service, and exits the auth-replication arms race entirely.
Use the Chrome session signed into X and keep /home?bridge=1 open there.
The service installs fetch/XHR interceptors in the page through Chrome DevTools Protocol, then captures X GraphQL responses locally.
When you call /search or /replies/{id}, the bridge drives the tab, waits for captured responses, and returns normalized tweet objects.
$ curl -s 'http://127.0.0.1:19816/search?q=postgres&count=2' | jq . [ { "id": "1781...", "text": "The planner now folds SRFs in the target list when...", "created_at": "Fri Apr 17 09:12:04 +0000 2026", "user": { "screen_name": "bug_finderrr", "name": "Sudharsan" }, "favorite_count": 142, "reply_count": 8, "retweet_count": 31, "url": "<x_status_url>" } ]
$ git clone https://github.com/Bug-Finderr/x-bridge $ cd x-bridge/service $ npm start
# Start Chrome with remote debugging on 127.0.0.1:18800. # Sign into X, then open: https://x.com/home?bridge=1
Optional: set XBRIDGE_START_SCRIPT if the service should run your browser launcher before bridge checks.
This repo is autopatched by an OpenClaw agent when x.com drifts. Patch versions are machine-authored parser fixes; minor and major bumps stay human.