ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

twitter-search

Advanced Twitter search and social media data analysis. Fetches tweets by keywords using Twitter API, processes up to 1000 results, and generates professional data analysis reports with insights and actionable recommendations. Use when user requests Twitter/X social media search, social media trend analysis, tweet data mining, social listening, influencer identification, topic sentiment analysis from tweets, or any task involving gathering and analyzing Twitter data for insights.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/flyfoxci/twitter-search-skill
Or

Twitter Search and Analysis

Overview

Search Twitter for keywords using advanced search syntax, fetch up to 1000 relevant tweets, and analyze the data to produce professional reports with insights, statistics, and actionable recommendations.

Prerequisites

API Key Required: Users must configure their Twitter API key from https://twitterapi.io

The API key can be provided in three ways:

  1. Environment variable (recommended): Set TWITTER_API_KEY in your ~/.bashrc or ~/.zshrc
    echo 'export TWITTER_API_KEY="your_key_here"' >> ~/.bashrc
    source ~/.bashrc
    
  2. As an argument: Use --api-key YOUR_KEY with the wrapper script
  3. Passed directly: As first argument to the Python script

Quick Start

Using the Wrapper Script (Recommended)

The wrapper script automatically handles environment variable loading and dependency checks:

# Basic search (uses TWITTER_API_KEY from shell config)
./scripts/run_search.sh "AI"

# With custom API key
./scripts/run_search.sh "AI" --api-key YOUR_KEY

# With options
./scripts/run_search.sh "\"Claude AI\"" --max-results 100 --format summary

# Advanced query
./scripts/run_search.sh "from:elonmusk since:2024-01-01" --query-type Latest

Direct Python Script Usage

# Search for a keyword
scripts/twitter_search.py "$API_KEY" "AI"

# Search with multiple keywords
scripts/twitter_search.py "$API_KEY" "\"ChatGPT\" OR \"Claude AI\""

# Search from specific user
scripts/twitter_search.py "$API_KEY" "from:elonmusk"

# Search with date range
scripts/twitter_search.py "$API_KEY" "Bitcoin since:2024-01-01"

Advanced Queries

# Complex query: AI tweets from verified users, English only
scripts/twitter_search.py "$API_KEY" "AI OR \"machine learning\" lang:en filter:verified"

# Recent crypto tweets with minimum engagement
scripts/twitter_search.py "$API_KEY" "Bitcoin min_retweets:10 lang:en"

# From specific influencers
scripts/twitter_search.py "$API_KEY" "from:elonmusk OR from:VitalikButerin since:2024-01-01"

Output Format

# Full JSON with all tweets
scripts/twitter_search.py "$API_KEY" "AI" --format json

# Summary with statistics (default)
scripts/twitter_search.py "$API_KEY" "AI" --format summary

Options

  • --max-results N: Maximum tweets to fetch (default: 1000)
  • --query-type Latest|Top: Sort order (default: Top for relevance)
  • --format json|summary: Output format (default: summary)

Workflow

1. Understand User Requirements

Clarify the analysis goal:

  • What topic/keyword to search?
  • Date range preference?
  • Specific users to include/exclude?
  • Language preference?
  • Type of insights needed (trends, sentiment, influencers)?

2. Build the Search Query

Use Twitter Advanced Search syntax:

Metadata

Author@flyfoxci
Stars2387
Views1
Updated2026-03-09
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-flyfoxci-twitter-search-skill": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.