Pull tweets, threads, and articles from X/Twitter without login or API keys (advanced features).
node scripts/fx-fetch.mjs "https://x.com/naval/status/1002103360646823936"Zero dependencies. Node 18+. JSON to stdout.
git clone https://github.com/sanjeevneo/xpull.gitNo npm install. Nothing to build.
node scripts/fx-fetch.mjs "https://x.com/elonmusk/status/1585341984679469056"Walks the self-reply chain upward. Same author only.
node scripts/fx-fetch.mjs "https://x.com/naval/status/1002103497725173760" --threadFxTwitter walks threads backward (child → parent). For forward traversal from a root tweet, Grok handles it in one call.
export XAI_API_KEY="xai-..."
node scripts/grok-x-search.mjs thread "https://x.com/naval/status/1002103360646823936"node scripts/grok-x-search.mjs replies "https://x.com/elonmusk/status/1585341984679469056"node scripts/grok-x-search.mjs search "transformer architecture"node scripts/grok-x-search.mjs search "AI safety" --from elonmuskAdd --images or --video to any Grok command to analyse media in posts. Off by default — adds token cost.
node scripts/grok-x-search.mjs search "infographic" --imagesRaw FxTwitter tweet objects as a JSON array:
[
{
"text": "Entering Twitter HQ – let that sink in!",
"author": { "name": "Elon Musk", "screen_name": "elonmusk" },
"created_at": "Wed Oct 26 18:45:58 +0000 2022",
"likes": 1245542,
"retweets": 158453,
"views": 120000000,
"media": { "videos": [{ "url": "...", "thumbnail_url": "..." }] },
"replying_to_status": null
}
]X Articles include full text via article.content.blocks[]. Threads return a chronological array.
fx-fetch.mjs calls the FxTwitter public API — the same backend that powers tweet embeds in Discord and Telegram. Free, unauthenticated, structured JSON. Thread reconstruction follows replying_to_status upward through the self-reply chain until the author changes or the root is reached.
grok-x-search.mjs uses xAI's x_search tool on the Responses API. Server-side query against X's backend — not a scraper, not prompt-based guessing. Handles forward thread traversal, replies, and search.
Requires XAI_API_KEY — set in environment or .env file. Get one at console.x.ai.
| Model | grok-4-1-fast-non-reasoning |
| x_search cost | $5 / 1,000 calls |
| Token cost | $0.20 / $0.50 per M tokens |
| Daily cap | 20 (override: GROK_DAILY_CAP env var) |
State tracked in .grok-state.json. Resets daily.
Available on ClawHub:
clawhub install xpullOr manually — copy into your workspace skills folder and restart the gateway:
cp -r xpull ~/.openclaw/workspace/skills/- FxTwitter is a third-party public API. No SLA, no uptime guarantee.
- Thread walking only goes upward (child → parent). Root → children requires Grok.
- Public tweets only. Protected accounts return 401.
- Some older tweets return 404 — X restricts guest API access to older content.
- Grok features require a paid xAI API key.