X
SKILL.md
X API Skill
Product summary
The X API is a REST and streaming API for accessing X's global data—posts, users, trends, spaces, direct messages, and more. Agents use it to search posts, manage user relationships, stream real-time data, and analyze engagement metrics. The API uses OAuth 1.0a/2.0 or Bearer Token authentication, returns JSON responses, and enforces per-endpoint rate limits. Key files: Developer Console (console.x.com) for credentials, API endpoints at api.x.com/2/, and official SDKs (Python XDK, TypeScript XDK) for faster development. See the primary docs site for comprehensive reference.
When to use
Reach for this skill when:
- Searching or analyzing posts: Find posts by keyword, hashtag, user, or date range using the Search Posts endpoints
- Managing user data: Look up users, get followers/following, manage mutes/blocks, or retrieve user timelines
- Streaming real-time data: Set up filtered streams with rules to receive posts matching criteria as they're published
- Building user-facing features: Authenticate users with OAuth, manage bookmarks, likes, reposts, or direct messages
- Monitoring engagement: Retrieve post analytics, trends, or community notes
- Integrating X data: Embed posts, timelines, or buttons on websites; fetch data for analysis or reporting
- Handling authentication: Generate credentials, refresh tokens, or implement OAuth flows for user-context requests