Tutorial: Tweet Scraping, Profile Analysis & Research with Claude
You are my X/Twitter research analyst. I want to use XActions to scrape and analyze tweets, profiles, followers, and trends. Help me extract actionable intelligence from X/Twitter data.
Context
I'm using XActions (https://github.com/nirholas/XActions), an open-source X/Twitter automation toolkit with powerful scraping capabilities. It can scrape profiles, followers, following lists, tweets, search results, hashtags, likes, media, bookmarks, notifications, Spaces, and more — all without the paid Twitter API.
What I Need You To Do
Part 1: Profile Deep Dive
Help me analyze any X/Twitter account in depth:
Use
x_get_profileto pull full profile data:- Display name, username, bio, location, website, join date
- Follower count, following count, tweet count
- Calculate their follower-to-following ratio
- Assess if the account looks legitimate or suspicious
Use
x_get_tweetsto analyze their recent content:- Pull their last 50 tweets
- Identify the topics they talk about most
- Calculate average engagement (likes, retweets, replies per tweet)
- Find their most viral tweet
- Determine posting frequency (tweets per day)
- Identify posting patterns (what time, what days)
Use
x_get_followersandx_get_following** to map their network:- Who are their most prominent followers?
- Who do they follow? (reveals interests and connections)
- Calculate mutual followers between them and me
- Identify potential follow targets from their network
Give me a complete profile report when done.
Part 2: Tweet Search & Analysis
Help me search and analyze tweets on any topic:
Basic search using
x_search_tweets:"Search for tweets about 'AI startups' from the last week"Advanced search operators — teach me all of them:
from:username— tweets from a specific userto:username— replies to a specific user@username— mentions of a user#hashtag— hashtag search"exact phrase"— exact matchmin_faves:100— minimum likesmin_retweets:50— minimum retweetsfilter:links— only tweets with linksfilter:images/filter:videos— media filterslang:en— language filtersince:2025-01-01 until:2025-02-01— date range-filter:replies— exclude replies- Combining operators:
"machine learning" min_faves:50 -filter:replies lang:en
Content analysis — After scraping tweets, analyze:
- Top themes and recurring topics
- Most engaged content (what format gets the most likes?)
- Influential voices on this topic
- Sentiment (positive/negative/neutral)
- Trending subtopics
Part 3: Hashtag Research
Use search to research hashtags:
- Find trending hashtags in my niche using
x_get_trends - Analyze hashtag performance — for each hashtag:
- Volume of tweets
- Average engagement on hashtagged tweets
- Who are the top posters using this hashtag?
- Is this hashtag growing or declining?
- Build a hashtag strategy — recommend:
- 5 high-volume hashtags for reach
- 5 medium-volume for targeted engagement
- 5 niche hashtags where I can be a top voice
Part 4: Competitor Analysis
Help me spy on my competitors using x_competitor_analysis:
Compare multiple accounts — provide handles for comparison:
"Compare these accounts: @competitor1, @competitor2, @competitor3"Analyze each competitor's strategy:
- Content types they post (threads, images, polls, links)
- Posting frequency
- What gets them the most engagement
- Their follower growth patterns
- Who they engage with
Find their viral content using
x_search_tweetswithfrom:competitor:"Find the most liked tweets from @competitor1 this month"Cross-reference follower overlap — which of their followers don't follow me yet? These are prospects.
Part 5: Viral Tweet Discovery
Use the viral tweets scraper capabilities:
Find viral content in any niche:
"Search for tweets about 'productivity tips' with at least 1000 likes" "What are the most retweeted tweets about 'remote work' this week?"Reverse-engineer what makes tweets go viral:
- Length of successful tweets
- Use of emojis, threads, images
- Time of posting
- Hook patterns (first line)
- Call-to-action effectiveness
Build a swipe file — collect the best tweets for inspiration
Part 6: Browser Console Scraping (Advanced)
For power users who want to scrape directly, walk me through the DevTools scripts:
Profile Scraping (scripts/scrapeProfile.js)
- Navigate to any profile
- Run the script to extract full profile data as JSON
Follower/Following Scraping (scripts/scrapeFollowers.js, scripts/scrapeFollowing.js)
- Navigate to followers or following page
- Script scrolls and extracts all users with bios
- Exports to JSON/CSV
Tweet Scraping (scripts/scrapeSearch.js)
- Navigate to search results
- Script scrolls collecting all tweets with metadata
- Exports with engagement stats
Likes Scraping (scripts/scrapeLikes.js)
- Scrape all your liked tweets
- Export for analysis
Media Scraping (scripts/scrapeMedia.js)
- Extract all media (images, videos) from any profile
- Get download URLs
Reply Scraping (scripts/scrapeReplies.js)
- Get all replies to a specific tweet
- Useful for community sentiment analysis
Notification Scraping (scripts/scrapeNotifications.js)
- Export your notifications as structured data
- Categorize by type (likes, follows, mentions, retweets)
Part 7: Thread Unrolling
Use the thread unroller (x_get_tweets or scripts/threadUnroller.js):
- Find a valuable thread: "Search for long threads about 'startup fundraising'"
- Unroll it: Convert the thread to readable text/markdown
- Save formats: JSON, markdown, or plain text
- Use case: Build a knowledge base from the best threads in your niche
Part 8: Video Downloading
Use x_download_video to save videos:
- Find a tweet with a video
- Get download URLs — the tool extracts direct video URLs from X's CDN
- Multiple quality options when available
Part 9: Explore & Trends
Use x_get_explore and x_get_trends for discovery:
- Current trends: "What's trending right now?"
- Filtered trends: "Show me trending topics in Technology"
- Explore categories: trending, news, sports, entertainment
- Using trends for content ideas: Help me find trending topics I can create content about
Part 10: Data Export & Analysis
After scraping, help me make sense of the data:
- Export formats: JSON and CSV supported via CLI (
xactions tweets --format csv) - Analysis suggestions:
- Import CSV into Google Sheets or Excel
- Build engagement charts
- Track competitor metrics over time
- Create content calendars based on viral patterns
- Using the
exportToCSV.jsscript for custom exports
Research Tasks To Try
(Replace with your actual research questions)
- "Analyze @elonmusk's posting pattern this month"
- "Find the top 20 AI influencers under 50K followers"
- "What tweets about 'Web3' got the most engagement this week?"
- "Compare @competitor1 vs @competitor2 — who's growing faster?"
- "Find all threads about 'building a SaaS' with 500+ likes"
- "What are people saying about [my brand]?"
- "Scrape my last 100 notifications and summarize the themes"
Start with Part 1 — ask me which account I want to analyze, and let's dive deep.
⚡ Explore XActions
100% free and open-source. No API keys, no fees, no signup.
Browse All Documentation