# Send X Twitter to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "x-twitter-api",
    "name": "X Twitter",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/Zaaachary/x-twitter-api",
    "canonicalUrl": "https://clawhub.ai/Zaaachary/x-twitter-api",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/x-twitter-api",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=x-twitter-api",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "scripts/get_article.py",
      "scripts/get_trends.py",
      "scripts/search_tweets.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "x-twitter-api",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-11T05:35:29.248Z",
      "expiresAt": "2026-05-18T05:35:29.248Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=x-twitter-api",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=x-twitter-api",
        "contentDisposition": "attachment; filename=\"x-twitter-api-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "x-twitter-api"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/x-twitter-api"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/x-twitter-api",
    "downloadUrl": "https://openagent3.xyz/downloads/x-twitter-api",
    "agentUrl": "https://openagent3.xyz/skills/x-twitter-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/x-twitter-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/x-twitter-api/agent.md"
  }
}
```
## Documentation

### X (Twitter) API

Search tweets, retrieve article content, and fetch trending topics from X (Twitter).

### Features

Search Tweets: Search recent tweets (last 7 days) with advanced query operators
Get Article Content: Retrieve tweet and article details by URL or ID
Trending Topics: Fetch trending topics (requires Basic tier or higher)
User Info: Get user profile and tweet history

### Setup

# Set environment variable
export X_BEARER_TOKEN="your_bearer_token_here"

# Or temporarily for this session
X_BEARER_TOKEN="your_token" python3 scripts/search_tweets.py

Get API Token:

Visit https://developer.x.com
Create a project and app
Generate Bearer Token in "Keys and Tokens" tab
Set the environment variable

### Search Tweets

# Basic search
python3 scripts/search_tweets.py --query "AI OR 人工智能"

# Advanced search (Chinese original tweets only)
python3 scripts/search_tweets.py --query "AI -is:retweet lang:zh" --count 10

# Search by user
python3 scripts/search_tweets.py --query "from:elonmusk" --count 5

# Search hashtags
python3 scripts/search_tweets.py --query "#Crypto OR #Blockchain"

Query Operators:

-is:retweet - Original tweets only
lang:zh - Chinese language
from:username - Tweets from specific user
has:links - Tweets with links
is:verified - Verified users only

### Get Article/Tweet Content

# By URL (article or tweet)
python3 scripts/get_article.py --url "https://x.com/username/article/123456789"

# By Tweet ID
python3 scripts/get_article.py --id "123456789"

### Get Trending Topics

# Global trends
python3 scripts/get_trends.py

# Trends by WOEID (Yahoo Where On Earth ID)
python3 scripts/get_trends.py --woeid 1  # Global
python3 scripts/get_trends.py --woeid 23424977  # USA

### API Limits

TierCostTweets/MonthNotesFree$05001 request/day, testing onlyBasic$200500,000Minimum production tierPro$5,0002,000,000+Real-time streaming

Free tier restrictions:

500 tweets/month (~16-17/day)
1 request/day per endpoint
No publishing/liking
Suitable for development testing only

### Output Formats

JSON: Structured data with all fields
Pretty: Human-readable formatted text
Save: Optional file export (JSON/Markdown)

### Error Handling

The scripts automatically handle:

Rate limiting (429 errors)
Invalid tokens (401 errors)
Network errors with retry logic
Missing required parameters

### Example 1: Search AI tweets

python3 scripts/search_tweets.py --query "AI OR 人工智能 -is:retweet" --count 5 --output pretty

### Example 2: Monitor specific user

python3 scripts/search_tweets.py --query "from:username" --count 10 --save output.json

### Example 3: Get article and analyze

python3 scripts/get_article.py --url "https://x.com/user/article/id" --output markdown --save article.md
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: Zaaachary
- Version: 1.0.1
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-11T05:35:29.248Z
- Expires at: 2026-05-18T05:35:29.248Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/x-twitter-api)
- [Send to Agent page](https://openagent3.xyz/skills/x-twitter-api/agent)
- [JSON manifest](https://openagent3.xyz/skills/x-twitter-api/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/x-twitter-api/agent.md)
- [Download page](https://openagent3.xyz/downloads/x-twitter-api)