TwtAPI Twitter/X Data Skill for Openclaw

A high-performance gateway for AI agents to access real-time Twitter/X data including tweets, user profiles, and global trends via structured JSON.

tonygjj
v1.2.0
Mar 26, 2026
0
819
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install twtapi

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 twtapi 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 TwtAPI Twitter/X Data Skill?

TwtAPI is a specialized data connector designed to bridge the gap between AI agents and the Twitter/X ecosystem. By utilizing a hosted public skill gateway, it allows developers to empower their agents with the ability to scrape, search, and analyze live social media data without the complexity of managing OAuth flows or scraping logic. This skill is a cornerstone of the Openclaw Skills library, providing a reliable pipeline for social intelligence.

The skill transforms raw social interactions into clean, structured JSON format, making it ideal for LLM processing. Whether you are building a sentiment analysis bot, a news aggregator, or a market research agent, TwtAPI ensures that your agent remains updated with the latest conversations on the platform while maintaining high delivery standards and developer-friendly integration.

TwtAPI Twitter/X Data Skill Use Cases

  • Real-time brand monitoring and sentiment analysis across Twitter/X.
  • Automating market research by fetching trending topics and hashtag performance.
  • Building AI-driven news feeds that track specific accounts or keywords.
  • Mapping social graphs by inspecting follower and following relationships.
  • Enhancing customer support agents with the ability to look up user profiles and recent tweet history.

How TwtAPI Twitter/X Data Skill Works

  1. The user installs the skill via the Openclaw Skills manager to register the twtapi binary.
  2. An API request is initiated through the CLI or an AI agent calling the underlying Python script.
  3. The skill sends the request to the TwtAPI hosted gateway using a secure TWTAPI_SKILL_KEY.
  4. The gateway interfaces with Twitter/X to retrieve live data based on the provided search query or user ID.
  5. The response is returned as a structured JSON object, including pagination cursors and metadata, for the agent to parse and display.

TwtAPI Twitter/X Data Skill Setup

Prerequisites

  • Python 3 installed on your system.
  • A TwtAPI account and a valid Skill Key.

Installation

First, install the skill using the Openclaw Skills package manager:

clawhub install twtapi

Configuration

Set your environment variable to authenticate with the gateway:

export TWTAPI_SKILL_KEY="tsk-your-skill-key"

To verify that your setup is working correctly, run the following command to list available tools:

python3 scripts/twtapi.py tools

TwtAPI Twitter/X Data Skill Data Schema & Taxonomy

The skill returns standardized JSON objects representing various Twitter entities. Below are the primary data structures provided by Openclaw Skills via TwtAPI:

Data Type Key Fields Description
Tweet id_str, full_text, created_at, favorite_count Core tweet content and engagement metrics.
User rest_id, screen_name, description, followers_count Full profile details for a specific Twitter handle.
Search items, next_cursor A collection of tweets matching a query with pagination support.
Trends name, query, tweet_volume Current top trending topics for a specific region.

TwtAPI Twitter/X Data Skill Advanced Features

  • Granular Search Syntax: Supports advanced operators like from:handle, lang:en, and date ranges directly in the CLI.
  • Pagination Handling: Uses a cursor-based system to fetch deep history across timelines and follower lists.
  • Custom Gateway Overrides: Allows power users to set TWTAPI_SKILL_BASE_URL for self-hosted or private proxy deployments.
  • OpenClaw Native Integration: Seamlessly integrates into ~/.openclaw/openclaw.json for persistent agent configuration.
  • Comprehensive Metadata Access: Provides raw JSON access to metrics like reply counts, retweet counts, and media entity URLs.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins python3
Github Stars: 0
forks: 0

Featured*