x-api

Solid

X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.

AI & Automation 196,640 stars 30253 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# X API Programmatic interaction with X (Twitter) for posting, reading, searching, and analytics. ## When to Activate - User wants to post tweets or threads programmatically - Reading timeline, mentions, or user data from X - Searching X for content, trends, or conversations - Building X integrations or bots - Analytics and engagement tracking - User says "post to X", "tweet", "X API", or "Twitter API" ## Authentication ### OAuth 2.0 Bearer Token (App-Only) Best for: read-heavy operations, search, public data. ```bash # Environment setup export X_BEARER_TOKEN="your-bearer-token" ``` ```python import os import requests bearer = os.environ["X_BEARER_TOKEN"] headers = {"Authorization": f"Bearer {bearer}"} # Search recent tweets resp = requests.get( "https://api.x.com/2/tweets/search/recent", headers=headers, params={"query": "claude code", "max_results": 10} ) tweets = resp.json() ``` ### OAuth 1.0a (User Context) Required for: posting tweets, managing account, DMs, and any write flow. ```bash # Environment setup — source before use export X_CONSUMER_KEY="your-consumer-key" export X_CONSUMER_SECRET="your-consumer-secret" export X_ACCESS_TOKEN="your-access-token" export X_ACCESS_TOKEN_SECRET="your-access-token-secret" ``` Legacy aliases such as `X_API_KEY`, `X_API_SECRET`, and `X_ACCESS_SECRET` may exist in older setups. Prefer the `X_CONSUMER_*` and `X_ACCESS_TOKEN_SECRET` names when documenting or wiring new flows. ```python import os from requests_oa...

Details

Author
affaan-m
Repository
affaan-m/everything-claude-code
Created
4 months ago
Last Updated
2 days ago
Language
JavaScript
License
MIT

Integrates with

Related Skills