X (Twitter) API Connector for Openclaw

A lightweight Python-based tool for comprehensive X (Twitter) API v2 interactions, including data retrieval and posting.

odrobnik
v1.0.0
Mar 8, 2026
0
891
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install twitter-api-v2

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 twitter-api-v2 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 X (Twitter) API Connector?

This skill provides a robust interface to the X (Twitter) API v2, allowing users and AI agents to programmatically access public and private social data. Built using pure Python standard libraries, it ensures maximum compatibility and zero external dependencies when integrated into Openclaw Skills workflows. Whether you need to analyze market trends, monitor user sentiment, or automate social media posting, this tool streamlines the process through a clean CLI interface and provides essential connectivity for modern AI workflows.

X (Twitter) API Connector Use Cases

  • Researching specific user activity and sentiment for market analysis.
  • Monitoring real-time discussions and brand mentions using advanced search operators within the Openclaw Skills ecosystem.
  • Extracting full conversation threads for deep LLM analysis or archival purposes.
  • Automating the retrieval of bookmarked content for research or personal knowledge management.
  • Managing social presence by posting updates directly through integrated Openclaw Skills commands.

How X (Twitter) API Connector Works

  1. The skill initializes using a bearer token for public data access or OAuth 2.0 for user-specific context.
  2. Users execute commands via a Python CLI to request specific data types like timelines, search results, or user profiles.
  3. The tool communicates with the X API v2 using standard Python libraries to ensure lightweight execution.
  4. Data is parsed and returned in a clean, human-readable format that is also optimized for processing by other Openclaw Skills.
  5. Rate limits and billing deduplication are handled automatically to maintain efficiency and cost-effectiveness.

X (Twitter) API Connector Setup

To get started with this skill in your Openclaw Skills library, follow these steps:

  1. Ensure python3 is installed on your environment.
  2. Obtain your X Developer API credentials (bearer token and optional OAuth 2.0 client ID/secret).
  3. Configure your credentials in the required oauth2.json or environment settings.
  4. For features requiring user context (bookmarks, posting), run the authorization script:
python3 scripts/x.py auth
  1. Verify the installation by fetching a profile:
python3 scripts/x.py user elonmusk

X (Twitter) API Connector Data Schema & Taxonomy

The skill organizes X data into clear, readable structures. Below is the metadata taxonomy used when interacting with this component of Openclaw Skills:

Data Type Attributes Included
User Profile Display Name, ID, Bio, Follower/Following counts, Tweet count, and Profile URL.
Tweet Content text, unique ID, Timestamp, Likes, Retweets, and Replies.
Search Last 7 days of matching tweets, support for advanced operators (from:, to:, filter:).
Metadata Rate limit headers (x-rate-limit-remaining, x-rate-limit-reset) for flow control.

X (Twitter) API Connector Advanced Features

  • Advanced search operator support for granular filtering of verified users, languages, and dates.
  • Built-in 24-hour deduplication logic to help users of Openclaw Skills manage API billing and costs effectively.
  • Batch lookup capabilities to retrieve multiple tweet IDs in a single request, optimizing rate limit usage.
  • Pure standard library implementation ensures zero-dependency deployments and high security.
  • Comprehensive thread extraction that automatically aggregates self-threads from a single author.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*