Finds trending Twitter topics and conversations for content ideation using apidojo's Twitter scrapers on Apify. Triggers when the user asks to: find trending topics on Twitter for content, discover what is being discussed in a niche on X right now, identify Twitter conversations to join with content, find trending hashtags in an industry on Twitter, research what topics are generating engagement in a space on X, discover viral tweet themes for blog or video content, or find what your target audience is talking about on Twitter this week. Returns trending topics, tweet volume signals, top engagement posts, and content angle suggestions. Ideal for content marketers, social media managers, newsletter writers, and real-time content teams.
Coding
X (Twitter) Hot Topics
Try itFetch trending topics from X (Twitter). Analyze user interests from natural language, retrieve top hot topics per domain, and summarize background, key opinions, and controversies.
What it does
Fetch trending topics from X (Twitter). Analyze user interests from natural language, retrieve top hot topics per domain, and summarize background, key opinions, and controversies.
The skill document
X (Twitter) Hot Topics Fetcher
Fetch real-time trending topics from X, filter by user interest domains, and analyze the background, popular opinions, and key controversies of each topic.
Prerequisites
Dependencies
- Python 3.7+
- tweepy library
Both are handled automatically: the scripts/x_hots entrypoint wrapper creates an isolated virtualenv at /.venv on first run and installs requirements.txt (which pins tweepy) into it. No manual pip install is needed. Override the venv location with SKILL_VENV_DIR=.
Environment Variables
Only the Bearer Token is required. The script uses app-only (OAuth 2.0) auth, which is sufficient for the search_recent_tweets endpoint and has broader search access than OAuth 1.0a user credentials — so the consumer key/secret and access token/secret are not needed.
export X_BEARER_TOKEN="***"
Obtain this credential from the X Developer Portal.
Note: The Free tier API has limitations:
- Can only search tweets from the last 7 days
- Rate limited to 10 requests per 15 minutes for search endpoints
When to Use
When the user wants to know what's trending on X/Twitter, or asks about hot topics, public opinion, or viral discussions.
Workflow
Step 1: Analyze User Interest Domains
Extract interest domains from the user's natural language input. Common domains include:
- International Politics: politics, geopolitics, diplomacy, sanctions, war, NATO, UN
- Economy & Finance: economy, stock market, tariff, trade, inflation, crypto, bitcoin
- Technology: AI, LLM, GPT, tech, chip, semiconductor, Apple, Google, Microsoft
- Sports: football, World Cup, NBA, Olympics, FIFA
- Entertainment: movie, music, celebrity, Netflix, Disney
- Society: climate, health, education, protest, human rights
Analysis Rules:
- If the user explicitly mentions a domain (e.g., "what's hot in tech?"), use that domain's keywords directly
- If the user mentions a specific topic (e.g., "what's happening with AI?"), use that topic as the keyword
- If no specific domain can be identified, use the generic hot topics query (see "Generic Query" below)
- Select 2-3 core keywords per domain to avoid excessive queries
Step 2: Run the Script to Fetch Hot Tweets
scripts/x_hots ''
Parameters:
json_queries: JSON array of search keywords- Each keyword returns up to 10 related hot tweets
Examples:
# Tech + Economy domains
scripts/x_hots '["AI", "LLM", "stock market", "tariff"]'
# International politics
scripts/x_hots '["geopolitics", "diplomacy", "sanctions"]'
# Generic hot topics (when no domain can be identified)
scripts/x_hots '["trending", "breaking", "viral"]'
Output Format:
{
"success": true,
"timestamp": "2026-07-09T03:58:00Z",
"queries": ["AI", "LLM"],
"results": {
"AI": {
"success": true,
"count": 10,
"tweets": [
{
"id": "1234567890",
"text": "Tweet content...",
"created_at": "2026-07-09T03:50:00Z",
"metrics": {"like_count": 100, "retweet_count": 50},
"url": "https://twitter.com/twitter/status/1234567890"
}
]
}
}
}
Step 3: Analyze and Present Results
For each domain/keyword, analyze the returned tweets and extract:
- Background: The origin of the hot topic, timeline, key people/organizations involved
- Popular Opinions: What are the mainstream views? Core arguments from supporters and opponents
- Key Controversies: What is the focal point of the debate? Where do different stances diverge?
Presentation Format:
## 🔥 [Domain Name] Hot Topics
### Topic 1: [Topic Title]
**📌 Background**
[Brief description of the event origin, timeline, key figures/organizations]
**💬 Popular Opinions**
- Supporters: [core argument]
- Opponents: [core argument]
- Neutral: [objective analysis]
**⚔️ Key Controversies**
[Focal point of the debate, divergence between different stances]
---
### Topic 2: [Topic Title]
...
Generic Query (When No Domain Can Be Identified)
When the user's input cannot be mapped to a specific domain (e.g., "what's hot on X?"), use the following strategy:
-
Run the script with generic hot topic queries:
scripts/x_hots '["trending", "breaking", "viral", "news"]' -
Identify the Top 10 highest-engagement topics from the returned tweets (based on likes, retweets, replies)
-
Present them ranked by engagement, with a brief background for each topic
Examples
Example 1: User Mentions a Specific Domain
User input: "What's hot in tech?"
Analysis: Domain = Tech, Keywords = ["AI", "LLM", "tech"]
Execute:
scripts/x_hots '["AI", "LLM", "tech"]'
Example 2: User Mentions a Specific Topic
User input: "What's happening with tariff policy?"
Analysis: Topic = Tariff, Keywords = ["tariff", "trade war", "tariff policy"]
Execute:
scripts/x_hots '["tariff", "trade war", "tariff policy"]'
Example 3: No Domain Can Be Identified
User input: "What's hot on X?"
Analysis: No specific domain identified, use generic query
Execute:
scripts/x_hots '["trending", "breaking", "viral", "news"]'
Notes
- API Limits: Free-tier API can only search tweets from the last 7 days
- Language Filter: Defaults to English tweets (
lang:en); modify the script for other languages - Deduplication: Script already filters out retweets (
-is:retweet), only returns original tweets - Engagement Ranking: Popularity is judged by likes, retweets, and replies combined
- Timeliness: Results are sorted by relevancy, prioritizing popular/high-engagement tweets
Error Handling
API Authentication Failure
{"success": false, "error": "Missing environment variable: X_BEARER_TOKEN"}
Fix: Ensure the Bearer Token environment variable is set in your shell profile (e.g. ~/.zshrc):
export X_BEARER_TOKEN="***"
Obtain the credential from the X Developer Portal.
No Results Found
{"results": {"AI": {"success": true, "count": 0, "tweets": []}}}
Action: Inform the user that there are no hot topics in this domain currently; suggest trying different keywords
Rate Limit Exceeded
{"success": false, "error": "429 Too Many Requests"}
Action: Wait 15 minutes before retrying, or reduce the number of query keywords
Related skills
Identifies and tracks thought leaders and key voices in any industry on Twitter/X using apidojo's scrapers. Triggers when the user asks to: find the top voices in an industry on Twitter, identify thought leaders in a niche, discover who has the most influence in a topic area on X, find experts tweeting about a subject, build a list of influencers to engage with on Twitter, track who is gaining followers fastest in a category, or identify key opinion leaders in a field for PR or partnership outreach. Returns name, handle, follower count, engagement rate, bio keywords, and recent top tweets. Ideal for PR teams, community managers, and B2B content marketers.
Monitors trending topics and conversations in a specific niche on Twitter using apidojo's Twitter Search scraper. Triggers when the user asks to: monitor trending topics in a niche on Twitter, track what's being discussed in an industry on X right now, find emerging conversations in a sector on Twitter, see what topics are trending in a specific community, track real-time buzz around a business topic on Twitter, or identify breaking trends before they hit mainstream media. Returns trending topics, tweet velocity, engagement signals, and top voices in the trend. Ideal for social media managers, PR teams, and real-time content strategists.
Extracts and analyzes tweet history from competitor or brand Twitter profiles using apidojo's Twitter Profile Scraper on Apify. Triggers when the user asks to: get all tweets from a competitor's Twitter account, analyze what a company posts on Twitter, audit a brand's tweet history, track what topics a competitor covers on X, compare Twitter content strategy between brands, extract posts from a company's Twitter timeline, or monitor a competitor's messaging and announcements on Twitter. Returns tweet text, engagement metrics (likes, retweets, replies, views), and author data. Ideal for competitive intelligence teams, PR analysts, and brand strategists.
Analyzes public sentiment on Twitter/X for any topic, brand, or event using apidojo's Tweet scrapers on Apify. Triggers when the user asks to: analyze Twitter sentiment about a topic, measure public opinion on Twitter, see if sentiment is positive or negative about a brand or issue on X, analyze the emotional tone of tweets about an event, research how Twitter reacts to a news story, measure brand or product sentiment from tweets, or compare sentiment between two competing topics or brands on Twitter. Returns sentiment classification, top positive and negative tweets, volume over time, and key themes. Ideal for PR teams, market researchers, political analysts, and social listening platforms.
Run sentiment, trend, and influencer analysis across major social platforms via the Verosight API.