← 返回 Skills 市场
bowen-dotcom

X/Twitter All-in-One: 30+ APIs, OAuth Post, One Key

作者 bowen-dotcom · GitHub ↗ · v1.0.6 · MIT-0
cross-platform ✓ 安全检测通过
1516
总下载
1
收藏
1
当前安装
7
版本数
在 OpenClaw 中安装
/install aisa-twitter-skill
功能描述
Searches and reads X (Twitter): profiles, timelines, mentions, followers, tweet search, trends, lists, communities, and Spaces. Publishes posts after the use...
使用说明 (SKILL.md)

\r \r

OpenClaw Twitter 🐦\r

\r Twitter/X data access and automation for autonomous agents. Powered by AIsa.\r \r One API key. Full Twitter intelligence.\r \r

What Can You Do?\r

\r

Monitor Influencers\r

"Get Elon Musk's latest tweets and notify me of any AI-related posts"\r
```\r
\r
### Track Trends\r
```text\r
"What's trending on Twitter worldwide right now?"\r
```\r
\r
### Social Listening\r
```text\r
"Search for tweets mentioning our product and analyze sentiment"\r
```\r
\r
### Competitor Intel\r
```text\r
"Monitor @anthropic and @GoogleAI - alert me on new announcements"\r
```\r
\r
## Posting Workflows\r
\r
This file does not define publishing logic.\r
\r
If the user asks to send, publish, or reply, or quote on X/Twitter, handle that workflow with `./references/post_twitter.md`.\r
\r
## Quick Start\r
\r
```bash\r
export AISA_API_KEY="your-key"\r
```\r
\r
## Core Capabilities\r
\r
### Read Operations (No Login Required)\r
\r
#### User Endpoints\r
\r
```bash\r
# Get user info\r
curl "https://api.aisa.one/apis/v1/twitter/user/info?userName=elonmusk" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get user profile about (account country, verification, username changes)\r
curl "https://api.aisa.one/apis/v1/twitter/user_about?userName=elonmusk" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Batch get user info by IDs\r
curl "https://api.aisa.one/apis/v1/twitter/user/batch_info_by_ids?userIds=44196397,123456" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get user's latest tweets\r
curl "https://api.aisa.one/apis/v1/twitter/user/last_tweets?userName=elonmusk" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get user mentions\r
curl "https://api.aisa.one/apis/v1/twitter/user/mentions?userName=elonmusk" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get user followers\r
curl "https://api.aisa.one/apis/v1/twitter/user/followers?userName=elonmusk" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get user followings\r
curl "https://api.aisa.one/apis/v1/twitter/user/followings?userName=elonmusk" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get user verified followers (requires user_id, not userName)\r
curl "https://api.aisa.one/apis/v1/twitter/user/verifiedFollowers?user_id=44196397" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Check follow relationship between two users\r
curl "https://api.aisa.one/apis/v1/twitter/user/check_follow_relationship?source_user_name=elonmusk&target_user_name=BillGates" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Search users by keyword\r
curl "https://api.aisa.one/apis/v1/twitter/user/search?query=AI+researcher" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
```\r
\r
#### Tweet Endpoints\r
\r
```bash\r
# Advanced tweet search (queryType is required: Latest or Top)\r
curl "https://api.aisa.one/apis/v1/twitter/tweet/advanced_search?query=AI+agents&queryType=Latest" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Search top tweets\r
curl "https://api.aisa.one/apis/v1/twitter/tweet/advanced_search?query=AI+agents&queryType=Top" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get tweets by IDs (comma-separated)\r
curl "https://api.aisa.one/apis/v1/twitter/tweets?tweet_ids=1895096451033985024" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get tweet replies\r
curl "https://api.aisa.one/apis/v1/twitter/tweet/replies?tweetId=1895096451033985024" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get tweet quotes\r
curl "https://api.aisa.one/apis/v1/twitter/tweet/quotes?tweetId=1895096451033985024" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get tweet retweeters\r
curl "https://api.aisa.one/apis/v1/twitter/tweet/retweeters?tweetId=1895096451033985024" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get tweet thread context (full conversation thread)\r
curl "https://api.aisa.one/apis/v1/twitter/tweet/thread_context?tweetId=1895096451033985024" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get article by tweet ID\r
curl "https://api.aisa.one/apis/v1/twitter/article?tweet_id=1895096451033985024" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
```\r
\r
#### Trends, Lists, Communities & Spaces\r
\r
```bash\r
# Get trending topics (worldwide)\r
curl "https://api.aisa.one/apis/v1/twitter/trends?woeid=1" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get list members\r
curl "https://api.aisa.one/apis/v1/twitter/list/members?list_id=1585430245762441216" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get list followers\r
curl "https://api.aisa.one/apis/v1/twitter/list/followers?list_id=1585430245762441216" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get community info\r
curl "https://api.aisa.one/apis/v1/twitter/community/info?community_id=1708485837274263614" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get community members\r
curl "https://api.aisa.one/apis/v1/twitter/community/members?community_id=1708485837274263614" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get community moderators\r
curl "https://api.aisa.one/apis/v1/twitter/community/moderators?community_id=1708485837274263614" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get community tweets\r
curl "https://api.aisa.one/apis/v1/twitter/community/tweets?community_id=1708485837274263614" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Search tweets from all communities\r
curl "https://api.aisa.one/apis/v1/twitter/community/get_tweets_from_all_community?query=AI" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
\r
# Get Space detail\r
curl "https://api.aisa.one/apis/v1/twitter/spaces/detail?space_id=1dRJZlbLkjexB" \\r
  -H "Authorization: Bearer $AISA_API_KEY"\r
```\r
\r
## Python Client\r
\r
```bash\r
# User operations\r
python3 {baseDir}/scripts/twitter_client.py user-info --username elonmusk\r
python3 {baseDir}/scripts/twitter_client.py user-about --username elonmusk\r
python3 {baseDir}/scripts/twitter_client.py tweets --username elonmusk\r
python3 {baseDir}/scripts/twitter_client.py mentions --username elonmusk\r
python3 {baseDir}/scripts/twitter_client.py followers --username elonmusk\r
python3 {baseDir}/scripts/twitter_client.py followings --username elonmusk\r
python3 {baseDir}/scripts/twitter_client.py verified-followers --user-id 44196397\r
python3 {baseDir}/scripts/twitter_client.py check-follow --source elonmusk --target BillGates\r
\r
# Search & discovery\r
python3 {baseDir}/scripts/twitter_client.py search --query "AI agents"\r
python3 {baseDir}/scripts/twitter_client.py search --query "AI agents" --type Top\r
python3 {baseDir}/scripts/twitter_client.py user-search --query "AI researcher"\r
python3 {baseDir}/scripts/twitter_client.py trends --woeid 1\r
\r
# Tweet operations\r
python3 {baseDir}/scripts/twitter_client.py detail --tweet-ids 1895096451033985024\r
python3 {baseDir}/scripts/twitter_client.py replies --tweet-id 1895096451033985024\r
python3 {baseDir}/scripts/twitter_client.py quotes --tweet-id 1895096451033985024\r
python3 {baseDir}/scripts/twitter_client.py retweeters --tweet-id 1895096451033985024\r
python3 {baseDir}/scripts/twitter_client.py thread --tweet-id 1895096451033985024\r
\r
# List operations\r
python3 {baseDir}/scripts/twitter_client.py list-members --list-id 1585430245762441216\r
python3 {baseDir}/scripts/twitter_client.py list-followers --list-id 1585430245762441216\r
\r
# Community operations\r
python3 {baseDir}/scripts/twitter_client.py community-info --community-id 1708485837274263614\r
python3 {baseDir}/scripts/twitter_client.py community-members --community-id 1708485837274263614\r
python3 {baseDir}/scripts/twitter_client.py community-tweets --community-id 1708485837274263614\r
python3 {baseDir}/scripts/twitter_client.py community-search --query "AI"\r
```\r
\r
## API Endpoints Reference\r
\r
### Read Endpoints (GET)\r
\r
| Endpoint | Description | Key Params |\r
|----------|-------------|------------|\r
| `/twitter/user/info` | Get user profile | `userName` |\r
| `/twitter/user_about` | Get user profile about | `userName` |\r
| `/twitter/user/batch_info_by_ids` | Batch get users by IDs | `userIds` |\r
| `/twitter/user/last_tweets` | Get user's recent tweets | `userName`, `cursor` |\r
| `/twitter/user/mentions` | Get user mentions | `userName`, `cursor` |\r
| `/twitter/user/followers` | Get user followers | `userName`, `cursor` |\r
| `/twitter/user/followings` | Get user followings | `userName`, `cursor` |\r
| `/twitter/user/verifiedFollowers` | Get verified followers | `user_id`, `cursor` |\r
| `/twitter/user/check_follow_relationship` | Check follow relationship | `source_user_name`, `target_user_name` |\r
| `/twitter/user/search` | Search users by keyword | `query`, `cursor` |\r
| `/twitter/tweet/advanced_search` | Advanced tweet search | `query`, `queryType` (Latest/Top), `cursor` |\r
| `/twitter/tweets` | Get tweets by IDs | `tweet_ids` (comma-separated) |\r
| `/twitter/tweet/replies` | Get tweet replies | `tweetId`, `cursor` |\r
| `/twitter/tweet/quotes` | Get tweet quotes | `tweetId`, `cursor` |\r
| `/twitter/tweet/retweeters` | Get tweet retweeters | `tweetId`, `cursor` |\r
| `/twitter/tweet/thread_context` | Get tweet thread context | `tweetId`, `cursor` |\r
| `/twitter/article` | Get article by tweet | `tweet_id` |\r
| `/twitter/trends` | Get trending topics | `woeid` (1=worldwide) |\r
| `/twitter/list/members` | Get list members | `list_id`, `cursor` |\r
| `/twitter/list/followers` | Get list followers | `list_id`, `cursor` |\r
| `/twitter/community/info` | Get community info | `community_id` |\r
| `/twitter/community/members` | Get community members | `community_id`, `cursor` |\r
| `/twitter/community/moderators` | Get community moderators | `community_id`, `cursor` |\r
| `/twitter/community/tweets` | Get community tweets | `community_id`, `cursor` |\r
| `/twitter/community/get_tweets_from_all_community` | Search all community tweets | `query`, `cursor` |\r
| `/twitter/spaces/detail` | Get Space detail | `space_id` |\r
\r
## Pricing\r
\r
| API | Cost |\r
|-----|------|\r
| Twitter read query | ~$0.0004 |\r
\r
Every response includes `usage.cost` and `usage.credits_remaining`.\r
\r
## Get Started\r
\r
1. Sign up at [aisa.one](https://aisa.one)\r
2. Get your API key\r
3. Add credits (pay-as-you-go)\r
4. Set environment variable: `export AISA_API_KEY="your-key"`\r
\r
## Full API Reference\r
\r
See [API Reference](https://docs.aisa.one/reference/) for complete endpoint documentation.\r
安全使用建议
This skill appears internally consistent: it uses a single AISA_API_KEY to call api.aisa.one for reading Twitter/X data and for OAuth-based posting. Before installing, verify you trust the aisa.one / api.aisa.one service because any media files or post content will be uploaded to that relay for publishing. Check the scope and revocation process for the AISA_API_KEY you provide, avoid using sensitive or private files, and review the README/references for authorization flow details. If you need to limit autonomous use, consider controlling whether the agent can invoke the skill automatically in your environment (the skill is user-invocable and may be called by agents by default).
功能分析
Type: OpenClaw Skill Name: aisa-twitter-skill Version: 1.0.6 The skill bundle provides a functional interface for interacting with Twitter/X via the AIsa API (api.aisa.one). It includes a standard read-only client (twitter_client.py) and an OAuth-based posting client (twitter_oauth_client.py) that supports text splitting and media uploads. While the posting script has the capability to read local files via the --media-file argument, this behavior is explicitly documented for the purpose of uploading user-provided attachments to Twitter, and the instructions in SKILL.md and post_twitter.md contain appropriate guardrails against password solicitation and unauthorized data access.
能力评估
Purpose & Capability
Name/description claim read/search/post capabilities on X/Twitter. The packaged Python clients and SKILL.md consistently call https://api.aisa.one endpoints and implement read APIs and an OAuth posting relay, so required binaries (python3, curl) and the single AISA_API_KEY credential are appropriate for the declared functionality.
Instruction Scope
Runtime instructions and references direct the agent to call the AIsa API and, for posting, to read local workspace media files and upload them to the relay. This is within the posting purpose, but it means user media and post content are transmitted to a remote service (api.aisa.one). The oauth client can also open the browser for authorization and reads optional env vars (e.g., TWITTER_RELAY_BASE_URL) not listed in requires.env.
Install Mechanism
No install spec (instruction-only) and included scripts are local Python files — nothing is downloaded at install time. This is a low-risk install mechanism; no external installers or arbitrary URL downloads are used.
Credentials
The skill only requires AISA_API_KEY (declared as primaryEnv), which matches the code that uses a Bearer key for api.aisa.one. The oauth client reads optional environment values (TWITTER_RELAY_BASE_URL, TWITTER_RELAY_TIMEOUT) that are reasonable defaults but are not strictly required; no unrelated secrets are requested.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or system settings. It runs on demand (user-invocable) and can be invoked autonomously per platform defaults; that is normal and not by itself a red flag.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install aisa-twitter-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /aisa-twitter-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.6
- Separated posting logic and documentation into dedicated files: added references/post_twitter.md and scripts/twitter_oauth_client.py. - Updated SKILL.md to remove posting instructions and workflows, directing posting actions to the new reference. - Improved file organization for clarity between read and post operations. - Added mention of the new Python client script for OAuth-based posting.
v1.0.5
- Updated POST endpoints for posting and authorization to require Authorization header in addition to aisa_api_key in the body. - Posting endpoint now supports `type` (quote or reply), `quote_tweet_id`, and `in_reply_to_tweet_id` for advanced posting/chaining. - Documentation clarifies to default to `--type quote` for publishing, and that `--type reply` should be used only when an explicit reply chain is requested. - Expanded example curl commands to reflect new required headers and posting parameters. - No functional changes; documentation updates only.
v1.0.4
- Updated POST endpoints for posting and authorization to require Authorization header in addition to aisa_api_key in the body. - Posting endpoint now supports `type` (quote or reply), `quote_tweet_id`, and `in_reply_to_tweet_id` for advanced posting/chaining. - Documentation clarifies to default to `--type quote` for publishing, and that `--type reply` should be used only when an explicit reply chain is requested. - Expanded example curl commands to reflect new required headers and posting parameters. - No functional changes; documentation updates only.
v1.0.3
Version 1.0.3 - No code or file changes detected in this release. - Documentation in SKILL.md adjusted for clarity and formatting only; core functionality and API details remain unchanged.
v1.0.2
**Major change: Posting now uses OAuth instead of requiring Twitter passwords or proxies.** - Updated description to clarify that posting is via OAuth in the browser, not with account passwords or login cookies. - Removed all instructions and examples for password/cookie/proxy login flows. - Added documentation for new OAuth-based `/auth_twitter` and `/post_twitter` endpoints for publishing. - Refined usage guidance for agents to prioritize OAuth relay for posting, never requesting user passwords. - Streamlined skill scope: search, trends, social listening, profile/tweet/list/community/Space data, plus OAuth-secured posting.
v1.0.1
Major update: Greatly expanded Twitter/X API support with new endpoints and updated write operations. - Added many new endpoints for user, tweet, list, community, and audio space data, including user_about, batch_info_by_ids, mentions, verified followers, tweet replies/quotes/thread context, and more. - Updated write operations: now require login_cookies from a new login endpoint and mandate a proxy for all write actions. - Refreshed all API examples to reflect new endpoints and required parameters. - Included support for advanced features like uploading media, replying to tweets, and managing tweet interactions (like/unlike) via new endpoints. - Documentation reorganized for clarity, grouping endpoints by type (User, Tweet, Trends/Lists/Communities/Spaces, Write). - Expanded quick start and usage instructions with the latest API flows.
v1.0.0
Search X (Twitter) in real time, extract relevant posts, and publish tweets/replies instantly. Perfect for social listening, engagement, and rapid content operations. Monitor trends, competitors, and automate interactions.
元数据
Slug aisa-twitter-skill
版本 1.0.6
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 7
常见问题

X/Twitter All-in-One: 30+ APIs, OAuth Post, One Key 是什么?

Searches and reads X (Twitter): profiles, timelines, mentions, followers, tweet search, trends, lists, communities, and Spaces. Publishes posts after the use... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1516 次。

如何安装 X/Twitter All-in-One: 30+ APIs, OAuth Post, One Key?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install aisa-twitter-skill」即可一键安装,无需额外配置。

X/Twitter All-in-One: 30+ APIs, OAuth Post, One Key 是免费的吗?

是的,X/Twitter All-in-One: 30+ APIs, OAuth Post, One Key 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

X/Twitter All-in-One: 30+ APIs, OAuth Post, One Key 支持哪些平台?

X/Twitter All-in-One: 30+ APIs, OAuth Post, One Key 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 X/Twitter All-in-One: 30+ APIs, OAuth Post, One Key?

由 bowen-dotcom(@bowen-dotcom)开发并维护,当前版本 v1.0.6。

💬 留言讨论