A developer going by aquarius-wing on GitHub has released "Grok Scraper," an OpenClaw skill that uses Playwright browser automation to query xAI's Grok AI model through the X.com web interface, without requiring an X API key or separate developer billing account. The tool is designed for X Premium subscribers who already receive free Grok access as part of their subscription, letting them automate queries by driving a real Chromium browser session rather than paying per-token API costs. It installs directly into the OpenClaw agent skill framework by cloning the repository into ~/.openclaw/skills/, making it composable with other OpenClaw-based workflows.
The implementation navigates to x.com/i/grok, submits a prompt, waits for the streaming response to complete, then extracts the reply from the DOM and converts it to Markdown using the Turndown library. Custom conversion rules were necessary because Grok renders headings as display:block spans and bold text as hashed utility classes rather than semantic HTML elements. The most fragile part of the stack is X's CSS-in-JS pipeline, which regenerates hashed class names on every front-end deploy. The author mitigates this by centralizing all selectors in a single SELECTORS constant and shipping an npm run inspect script that re-discovers updated class names when selectors break, though some maintenance effort remains unavoidable.
Getting started requires a GUI-based browser login — meaning headless cloud servers, VPS instances without a display, and CI/CD environments like GitHub Actions won't work. Session expiry from CAPTCHA or 2FA re-challenges means manual intervention. The project explicitly acknowledges it violates X's Terms of Service; the author frames personal, low-frequency use as an acceptable risk. Cron scheduling (every six hours, for example), automatic retry on Grok service errors, and a flag-file notification system for session expiry are all supported.
The honest use case is narrow: someone with an X Premium subscription who wants to automate occasional Grok queries without paying API bills. At higher volume or in any shared environment, the selector fragility and ToS exposure aren't theoretical risks — they're the most likely outcomes. Source code is at github.com/aquarius-wing/grok-scraper.