New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Search and retrieve content from Twitter/X

Twitter/X Skill

by ReScienceLab · Apache-2.0 license · ★ 1,826 on GitHub

Twitter/X Skill cover

Search and retrieve content from Twitter/X. Get user info, tweets, replies, followers, communities, spaces, and trends via twitterapi.io.

---
name: twitter
description: 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.
---

# 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`:
```bash
export TWITTERAPI_API_KEY="your_api_key"
```

**Quick Check**:
```bash

Overview

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

Manual install (npx, ZIP)
Claude Codenpx skills add ReScienceLab/opc-skills --skill twitter -g -a claude-code
Claude Code (degit)npx degit ReScienceLab/opc-skills/skills/twitter#main ~/.claude/skills/twitter
Claude.ai / desktopZip the folder and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md2.7 KB
Read SKILL.md here
ReScienceLab/main1 file shown
SKILL.md
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 
View all files on GitHub →

Details

License
Apache-2.0
Stars on the repo
★ 1,826
Checked
Source
ReScienceLab/opc-skills ↗
Creator
ReScienceLab · 1 listing
View creator

Similar skills

See all →
SkillResearch what people actually say about any topicSTEP 0: STALE-CLONE SELF-CHECK — RUN BEFORE READING BELOWmvanhorn/last30days-skill · by mvanhornResearch what people actually say about any topic in the last 30 days. Pulls posts and engagement from Reddit, X, YouTube, TikTok, Hacker News, Polymarket, GitHub, and the web. Includes a doctor health check to diagnose broken or missing sources.★ 63.5k GitHub starsSkillScrapes social platforms, business dataApifydanielmiessler/LifeOS · by danielmiesslerScrapes social platforms, business data, and e-commerce via Apify actors — Instagram, LinkedIn, TikTok, YouTube, Facebook, Google Maps, Amazon, and web crawls — filtering in code. USE WHEN scrape Instagram, scrape LinkedIn, scrape TikTok, scrape YouTube, scrape Facebook, Google Maps leads, Amazon reviews, business intelligence, multi-platform social listening, competitive analysis, lead generation, social monitoring, Apify actors, web crawl, extract contacts. NOT FOR X/Twitter account operations like posting, threads, or bookmarks (those need a dedicated X API client), 4-tier progressive scraping with proxy escalation (use BrightData), or real-Chrome bot bypass and computer use (use Interceptor).★ 19.3k GitHub starsSkill微信公众号长文增长闭环 ——tsingyuai/growth-lab · by tsingyuai微信公众号长文增长闭环 —— 从读者问题与复刻锚选题、写出可验证的公众号长文、预览与合规检查、同步微信草稿、三重确认下受控发布,到回收阅读与转化数据并复盘。用户要求写公众号、把内容改成公众号、同步或发布微信草稿、查看公众号数据或复盘时使用。★ 2k GitHub starsSkillSays 'YouTube script', 'video script'🎬 YouTube Script: Writing retention-optimized video script...cwinvestments/memstack · by cwinvestmentsUse this skill when the user says 'YouTube script', 'video script', 'write script for YouTube', 'YouTube video outline', or is creating scripted content for a YouTube video with hooks, chapters, and CTAs. Do NOT use for TikTok/Reels short-form scripts or webinar presentations.★ 423 GitHub starsSkillAgent Reach — 互联网能力路由器Ootto-AI/claude-content-skills · by Ootto-AIMUST USE when user wants to 调研/research/搜索/search/查/找/look up anything on the internet — e.g. 全网调研 X / 帮我调研一下 X / 查一下 X / 搜搜 X / 看看大家怎么评价 X / X 上有什么讨论 / research this topic。 Also MUST USE when user mentions any platform or shares any URL/链接: 小红书/xiaohongshu/xhs, Twitter/推特/X, B站/bilibili, Reddit, V2EX, LinkedIn/领英/招聘/求职/jobs, YouTube, GitHub code search, 小宇宙播客, 雪球/股票行情, RSS feeds, or any web URL. 13 platforms, multi-backend routing (OpenCLI / per-platform CLIs / APIs). Zero config for 6 channels. Run `agent-reach doctor --json` to see which backend serves each platform right now. NOT for: 写报告/数据分析/翻译等内容加工(本 skill 只负责从互联网获取内容); 发帖/评论/点赞等写操作;已有专门 skill 的平台(先用专门 skill)。 【路由方式】SKILL.md 包含路由表和常用命令,复杂场景需按需阅读对应分类的 references/*.md。 分类:search / social (小红书/推特/B站/V2EX/Reddit) / career(LinkedIn) / dev(github) / web(网页/文章/RSS) / video(YouTube/B站/播客)。★ 139 GitHub starsSkillRead your Instagram niche and profile from real dataInstagram Audience Insightssergebulaev/instagram-skills · by sergebulaevRead 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).★ 138 GitHub stars