xfetch for Openclaw

A cookie-based command-line interface for scraping and retrieving comprehensive data from X/Twitter without requiring API keys.

feiskyer
v1.0.0
Mar 6, 2026
1
1.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install xfetch

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install xfetch using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is xfetch?

xfetch is a specialized data retrieval tool designed to interface directly with X/Twitter using browser cookies for authentication. This approach bypasses the need for official API keys, providing developers and AI agents with a flexible way to access tweets, user profiles, search results, and even private data like bookmarks and direct messages. As a featured utility within the Openclaw Skills ecosystem, it enables seamless social media data integration for automated workflows.

The tool is built for efficiency, offering multiple output formats such as JSON, CSV, and SQLite. Whether you are building a research pipeline, archiving personal data, or monitoring social trends, xfetch provides the technical infrastructure to turn X/Twitter into a queryable data source.

xfetch Use Cases

  • Extracting full conversation threads and X Articles for content analysis.
  • Automated scraping of user profiles and follower lists for lead generation or social mapping.
  • Monitoring specific search queries or hashtags with advanced filtering operators.
  • Exporting bookmarked tweets or liked content into SQLite databases for long-term storage.
  • Retrieving account-specific data like notifications and DMs for personal productivity dashboards.

How xfetch Works

  1. The tool authenticates by extracting active session cookies (auth_token and ct0) from installed browsers like Chrome, Firefox, or Safari.
  2. Commands are issued via the CLI to target specific endpoints such as user timelines, search indices, or individual tweet IDs.
  3. xfetch manages the underlying HTTP requests, mimicking browser-like behavior to retrieve raw data.
  4. For large requests, the tool handles pagination and rate-limit jitter to ensure continuous data flow.
  5. The retrieved data is processed and formatted according to user specifications (JSON, CSV, etc.) for immediate consumption or piping to other tools.

xfetch Setup

To get started with xfetch within your Openclaw Skills environment, check your authentication status first:

xfetch auth check

If you are not authenticated, extract cookies from your local browser:

xfetch auth extract --browser chrome

You can also set tokens manually if you have extracted them from your browser's network tab:

xfetch auth set --auth-token YOUR_TOKEN --ct0 YOUR_CT0_TOKEN

xfetch Data Schema & Taxonomy

xfetch supports various structured output schemas to fit different developer needs:

Format Usage Description
JSON Default Pretty-printed standard JSON objects.
JSONL Streaming Newline-delimited JSON for handling massive datasets without memory overflow.
CSV Tabular Flattened data structure ideal for Excel or Google Sheets.
SQLite Database Directly populates a local .db file for relational queries.

Metadata typically includes tweet IDs, full text, timestamps, author details, reply counts, and media URLs.

xfetch Advanced Features

  • Direct SQLite Export: Use the --format sqlite --db filename.db flags to build local databases automatically.
  • Query ID Refreshing: Use xfetch query-ids --refresh to sync with X's rotating frontend IDs and maintain uptime.
  • Proxy Support: Rotate requests through proxies using the --proxy or --proxy-file flags to scale scraping efforts.
  • Pagination Control: Use --all or --max-pages to navigate through thousands of results across timelines or search queries.
  • Thread Reconstruction: Fetch entire conversation trees from a single tweet URL using the thread command.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*