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 a
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 a
Real data. Real impact.
Growing
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
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.
API Key Required: Users must configure their Twitter API key from https://twitterapi.io
The API key can be provided in three ways:
TWITTER_API_KEY in your ~/.bashrc or ~/.zshrc
echo 'export TWITTER_API_KEY="your_key_here"' >> ~/.bashrc source ~/.bashrc
--api-key YOUR_KEY with the wrapper scriptThe 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
# 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"
# 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"
# Full JSON with all tweets scripts/twitter_search.py "$API_KEY" "AI" --format jsonSummary with statistics (default)
scripts/twitter_search.py "$API_KEY" "AI" --format summary
--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)Clarify the analysis goal:
Use Twitter Advanced Search syntax:
| Syntax | Example | Description |
|---|---|---|
| | Single keyword |
| | Exact phrase |
| | Either term |
| | From specific user |
| | Reply to user |
| | After date |
| | Before date |
| | Language code |
| | Hashtag |
| | Tweets with links |
| | Minimum retweets |
Execute the search script:
scripts/twitter_search.py "$API_KEY" "YOUR_QUERY" --max-results 1000 --query-type Top
Important: Default is 1000 tweets maximum. The script automatically:
After fetching data, produce a comprehensive professional report with:
Executive Summary (2-3 sentences)
Data Overview
Key Metrics
Top Content Analysis
Influencer Analysis
Trend Insights (based on data patterns)
Key Takeaways
Actionable Recommendations
Present the report in clear markdown with:
[@username](https://x.com/username/status/tweet_id))Always include clickable links to tweets:
| Author | Tweet | URL | |--------|-------|-----| | @user | Summary of tweet content | [View](https://x.com/user/status/123456) |
Or inline format:
- **@username**: Tweet summary - [View Tweet](https://x.com/username/status/123456)
"AI" OR "artificial intelligence" lang:en min_retweets:50
from:competitor1 OR from:competitor2 since:2024-01-01
#ProductName OR "Product Name" lang:en filter:verified
#BrandName OR "Brand Name" lang:en --query-type Latest
#Topic lang:en min_retweets:100 min_faves:500
"brand name" OR #BrandName lang:en --max-results 1000
Convenience wrapper that handles environment variable loading and dependency checks:
TWITTER_API_KEY from ~/.bashrc or ~/.zshrcUsage:
./scripts/run_search.sh <query> [options]
Options:
--api-key KEY: Override environment variable API key--max-results N: Maximum tweets to fetch (default: 1000)--query-type Latest|Top: Sort order (default: Top)--format json|summary: Output format (default: json)Executable Python script that:
Usage:
scripts/twitter_search.py <api_key> <query> [options]
Comprehensive API documentation including:
Read this when: Building complex queries or understanding data structure.
If the script fails:
No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.