twitterwebapi for Openclaw

A powerful API tool to search Twitter timelines and retrieve detailed tweet statistics, author information, and interaction data.

kyriswu
v1.0.0
May 31, 2026
0
561
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install twitterwebapi

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 twitterwebapi 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 twitterwebapi?

The twitterwebapi skill is a developer-focused integration designed for Openclaw Skills to seamlessly connect AI agents with real-time Twitter data. It wraps official and curated API endpoints behind a clean CLI script, allowing agents to fetch extensive details about specific tweets or execute keyword searches across the platform. This skill eliminates the complexity of OAuth and custom HTTP client boilerplate by exposing highly structured interfaces to your AI tools.

By leveraging this tool within the broader catalog of Openclaw Skills, developers can build agents capable of monitoring social trends, analyzing audience engagement, and automating market research. The tool offers a flexible access model supporting both free, rate-limited public tiers and high-performance paid subscriptions through direct API key management.

twitterwebapi Use Cases

  • Retrieving full tweet contents, including author profiles, posting timestamps, and interaction statistics (likes, retweets, replies).
  • Executing advanced keyword searches to track specific trends, hashtags, or brand mentions across X/Twitter.
  • Conducting sentiment analysis and audience interaction audits by extracting clean social data structures.
  • Automating social media data harvesting using Python script interfaces rather than manual browser automation.
  • Troubleshooting and debugging API requests with comprehensive local error diagnostics.

How twitterwebapi Works

  1. Triggering: The agent or user invokes the tool with specific parameters (either detail mode with a tweet_id or search mode with a keyword).
  2. Authentication check: The system resolves credentials by looking for an environment variable AZT_API_KEY, checking command-line parameters, or defaulting to a public free-tier endpoint.
  3. Request Execution: The Python helper script (scripts/twitter_api.py) sends a secure POST request to the corresponding Coze JS API gateway.
  4. Data Aggregation: The backend fetches real-time tweet details or search timelines and formats the raw JSON payload.
  5. Response Delivery: The script returns structured Markdown to the caller, highlighting successful fields or giving structured error troubleshooting recommendations if rate limits or authentication failed.

twitterwebapi Setup

Prerequisites

Make sure your environment has Python 3 installed.

API Key Configuration (Optional)

You can access the free tier by default, or provide an API key from https://devtool.uk/plugin for high-frequency workflows.

# Option 1: Set as an environment variable
export AZT_API_KEY="your_api_key_here"

# Option 2: Provide directly in the execution command
python3 scripts/twitter_api.py search --keyword "Openclaw Skills" --azt_api_key your_api_key_here

CLI Commands

# Fetch details of a specific tweet
python3 scripts/twitter_api.py detail --tweet_id 1234567890

# Search timeline with search options
python3 scripts/twitter_api.py search --keyword "artificial intelligence" --search_type Top

# Paginate search results using cursors
python3 scripts/twitter_api.py search --keyword "technology" --cursor XYZ789

# Output raw JSON directly to stdout
python3 scripts/twitter_api.py search --keyword "OpenAI" --json

twitterwebapi Data Schema & Taxonomy

The skill operates on structured inputs and returns standardized JSON outputs, which are then rendered into user-friendly Markdown. Here is the taxonomy of the input data schema:

Input Parameters

Parameter Required Default Description
mode Yes - Mode of operation: detail or search.
tweet_id Conditional - The unique identifier of the tweet (required when mode=detail).
keyword Conditional - The search term or phrase (required when mode=search).
search_type No Top The target search section (used in search mode).
cursor No - Pagination cursor for navigating subsequent search pages.
azt_api_key No - Optional premium authorization key.

Output Format

Successful requests produce Markdown-formatted blocks encapsulating the primary data points:

  • API Metadata: Confirms the endpoint used and credential source.
  • Tweet Details: Returns text body, publishing date, and engagement metrics (replies, retweets, likes).
  • Search Timeline: Compiles an ordered list of matched tweets with author details, text snippets, and permalinks.

twitterwebapi Advanced Features

  • Dual Authorization Fallbacks: Intelligent key resolution that seamlessly moves between environmental variables, parameter flags, and public sandbox access.
  • Direct JSON Serialization: Supply the --json flag to receive clean, raw payloads suitable for pipeline integration or downstream database storage.
  • Granular Search Filters: Leverage search modes like Top and cursor-based pagination parameters to navigate high-volume Twitter conversations programmatically.
  • Actionable Diagnostics: Structured error codes (e.g., status 200 vs -1) accompanied by interactive instructions to troubleshoot expired tokens or credit exhaustion.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*