Twitter/X Skill

Search and retrieve content from Twitter/X.

by ReScienceLab·Apache-2.0 license·GitHub ↗

★ 1,826 Stars on the repo·Checked

npx degit ReScienceLab/opc-skills/skills/twitter#main ~/.claude/skills/twitter

SKILL.md · 2.7 KB · installs the whole folder to ~/.claude/skills/twitter

Files of Twitter/X Skill

Files 1 file
Show the full text100 lines

Twitter/X Skill

Get user profiles, tweets, replies, followers/following, communities, spaces, and trends from Twitter/X via twitterapi.io.

Prerequisites

Set API key in ~/.zshrc:

export TWITTERAPI_API_KEY="your_api_key"

Quick Check:

cd <skill_directory>
python3 scripts/get_user_info.py elonmusk

Commands

All commands run from the skill directory.

User Endpoints
python3 scripts/get_user_info.py USERNAME
python3 scripts/get_user_about.py USERNAME
python3 scripts/batch_get_users.py USER_ID1,USER_ID2
python3 scripts/get_user_tweets.py USERNAME --limit 20
python3 scripts/get_user_mentions.py USERNAME --limit 20
python3 scripts/get_followers.py USERNAME --limit 100
python3 scripts/get_following.py USERNAME --limit 100
python3 scripts/get_verified_followers.py USERNAME --limit 20
python3 scripts/check_relationship.py USER1 USER2
python3 scripts/search_users.py "query" --limit 20
Tweet Endpoints
python3 scripts/get_tweet.py TWEET_ID [TWEET_ID2...]
python3 scripts/search_tweets.py "query" --type Latest --limit 20
python3 scripts/get_tweet_replies.py TWEET_ID --limit 20
python3 scripts/get_tweet_quotes.py TWEET_ID --limit 20
python3 scripts/get_tweet_retweeters.py TWEET_ID --limit 50
python3 scripts/get_tweet_thread.py TWEET_ID
python3 scripts/get_article.py TWEET_ID
List Endpoints
python3 scripts/get_list_followers.py LIST_ID --limit 20
python3 scripts/get_list_members.py LIST_ID --limit 20
Community Endpoints
python3 scripts/get_community.py COMMUNITY_ID
python3 scripts/get_community_members.py COMMUNITY_ID --limit 20
python3 scripts/get_community_moderators.py COMMUNITY_ID
python3 scripts/get_community_tweets.py COMMUNITY_ID --limit 20
python3 scripts/search_community_tweets.py "query" --limit 20
Other Endpoints
python3 scripts/get_space.py SPACE_ID
python3 scripts/get_trends.py --woeid 1  # Worldwide

Search Query Syntax

# Basic search
python3 scripts/search_tweets.py "AI agent"

# From specific user
python3 scripts/search_tweets.py "from:elonmusk"

# Date range
python3 scripts/search_tweets.py "AI since:2024-01-01 until:2024-12-31"

# Exclude retweets
python3 scripts/search_tweets.py "AI -filter:retweets"

# With media
python3 scripts/search_tweets.py "AI filter:media"

# Minimum engagement
python3 scripts/search_tweets.py "AI min_faves:1000"

API: twitterapi.io

1---
2name: twitter
3description: Search and retrieve content from Twitter/X. Get user info, tweets, replies, followers, communities, spaces, and trends via twitterapi.io. Use when user mentions Twitter, X, or tweets.
4---
5 
6# Twitter/X Skill
7 
8Get user profiles, tweets, replies, followers/following, communities, spaces, and trends from Twitter/X via twitterapi.io.
9 
10## Prerequisites
11 
12Set API key in `~/.zshrc`:
13```bash
14export TWITTERAPI_API_KEY="your_api_key"
15```
16 
17**Quick Check**:
18```bash
19cd <skill_directory>
20python3 scripts/get_user_info.py elonmusk
21```
22 
23## Commands
24 
25All commands run from the skill directory.
26 
27### User Endpoints
28```bash
29python3 scripts/get_user_info.py USERNAME
30python3 scripts/get_user_about.py USERNAME
31python3 scripts/batch_get_users.py USER_ID1,USER_ID2
32python3 scripts/get_user_tweets.py USERNAME --limit 20
33python3 scripts/get_user_mentions.py USERNAME --limit 20
34python3 scripts/get_followers.py USERNAME --limit 100
35python3 scripts/get_following.py USERNAME --limit 100
36python3 scripts/get_verified_followers.py USERNAME --limit 20
37python3 scripts/check_relationship.py USER1 USER2
38python3 scripts/search_users.py "query" --limit 20
39```
40 
41### Tweet Endpoints
42```bash
43python3 scripts/get_tweet.py TWEET_ID [TWEET_ID2...]
44python3 scripts/search_tweets.py "query" --type Latest --limit 20
45python3 scripts/get_tweet_replies.py TWEET_ID --limit 20
46python3 scripts/get_tweet_quotes.py TWEET_ID --limit 20
47python3 scripts/get_tweet_retweeters.py TWEET_ID --limit 50
48python3 scripts/get_tweet_thread.py TWEET_ID
49python3 scripts/get_article.py TWEET_ID
50```
51 
52### List Endpoints
53```bash
54python3 scripts/get_list_followers.py LIST_ID --limit 20
55python3 scripts/get_list_members.py LIST_ID --limit 20
56```
57 
58### Community Endpoints
59```bash
60python3 scripts/get_community.py COMMUNITY_ID
61python3 scripts/get_community_members.py COMMUNITY_ID --limit 20
62python3 scripts/get_community_moderators.py COMMUNITY_ID
63python3 scripts/get_community_tweets.py COMMUNITY_ID --limit 20
64python3 scripts/search_community_tweets.py "query" --limit 20
65```
66 
67### Other Endpoints
68```bash
69python3 scripts/get_space.py SPACE_ID
70python3 scripts/get_trends.py --woeid 1 # Worldwide
71```
72 
73## Search Query Syntax
74 
75```bash
76# Basic search
77python3 scripts/search_tweets.py "AI agent"
78 
79# From specific user
80python3 scripts/search_tweets.py "from:elonmusk"
81 
82# Date range
83python3 scripts/search_tweets.py "AI since:2024-01-01 until:2024-12-31"
84 
85# Exclude retweets
86python3 scripts/search_tweets.py "AI -filter:retweets"
87 
88# With media
89python3 scripts/search_tweets.py "AI filter:media"
90 
91# Minimum engagement
92python3 scripts/search_tweets.py "AI min_faves:1000"
93```
94 
95## API: twitterapi.io
96- Base URL: https://api.twitterapi.io/twitter
97- Auth: X-API-Key header
98- Pricing: ~$0.15-0.18/1k requests
99- Docs: https://docs.twitterapi.io/
100 

Discussion

Alternatives

Also in Posting & schedulingSee all 401 in Marketing →
Linkedin comment drafterDraft a LinkedIn comment on someone else's post from its URL, or reshare (repost) it to your feed with optional commentary. Use when the user pastes a post URL and asks to comment, engage, be first commenter, or repost with their thoughts. Produces 1-3 variants in the user's voice, picks a reaction, and publishes via Publora on approval. Not for replying to existing comments (use linkedin-reply-handler).Marketing · MITLinkedin content plannerGenerate a 7-day LinkedIn content plan from a theme, audience, and pillars. Produces per-day post pillar, format, hook type, CTA, posting time, daily comment targets, and a weekly inbound-readiness check. Use when the user wants to plan a week or month of content, not draft a single post (use linkedin-post-writer).Marketing · MITLinkedin employee advocacyStand up and run a LinkedIn employee advocacy program for a marketing or sales team. Covers 14-day launch playbook, brand-guideline governance, per-post time budget, cadence benchmarks, and team ROI (reach, engagement, pipeline). Triggers on "employee advocacy", "get the team posting", "scale LinkedIn across team", "advocacy ROI". Not for planning one person's own calendar (use linkedin-content-planner).Marketing · MITInstagram Audience InsightsRead your Instagram niche and profile from real data via Apify, no login. Scan a hashtag for the posts traveling now (likes, comments, owner) to see the format and hook that works. Pull profile stats for any handle, yours or a competitor's: followers, posts, bio, category. Instagram hides who liked or commented on other accounts, so this is discovery plus profiles, not engagers. Triggers on "what works in my niche", "scan the hashtag", "competitor stats". Not for writing captions (use ig-caption-writer).Marketing · MIT