What you can do
| Capability | Description |
|---|---|
| Read posts | Search, look up, and stream posts in real-time |
| Publish content | Create posts, replies, and threads |
| Manage users | Look up users, manage follows, blocks, and mutes |
| Analyze data | Access metrics, trends, and engagement analytics |
| Build integrations | Send DMs, manage lists, and interact with Spaces |
API versions
- X API v2 (Recommended)
- X API v1.1 (Legacy)
- Enterprise
The current version of the X API with modern features and flexible pricing.Why use v2:
- Pay-per-usage pricing—no monthly caps
- Modern JSON response format
- Flexible fields and expansions
- Advanced features: annotations, conversation tracking, edit history
- All new endpoints and features
- Sign up at console.x.com
- Create an app and get credentials
- Make your first request
Available resources
The X API provides access to these resource types:Posts
Search, retrieve, create, and delete posts. Access timelines, threads, and quote posts.
Users
Look up profiles, manage relationships, and access follower data.
Spaces
Discover live audio conversations and participants.
Direct Messages
Send and receive private messages between users.
Lists
Create and manage curated lists of accounts.
Trends
Access trending topics by location.
v2 highlights
Fields and expansions
Fields and expansions
Request only the data you need. Use Learn more about fields →
fields parameters to select specific attributes and expansions to include related objects.Post annotations
Post annotations
Posts include semantic annotations identifying people, places, products, and topics. Filter streams and searches by topic.Learn more about annotations →
Engagement metrics
Engagement metrics
Access public metrics (likes, reposts, replies) and private metrics (impressions, clicks) for your own posts.Learn more about metrics →
Conversation tracking
Conversation tracking
Reconstruct entire conversation threads using
conversation_id. Track replies across the full thread.Learn more about conversation tracking →Edit history
Edit history
Access the edit history of posts, including all previous versions and edit metadata.Learn more about edit posts →
Pricing
X API v2 uses pay-per-usage pricing:| Benefit | Description |
|---|---|
| No subscriptions | Pay only for what you use |
| No caps | Use as much as you need |
| Credit-based | Purchase credits, deducted per request |
| Real-time tracking | Monitor usage in the Developer Console |
| Deduplication | Same resource requested twice in 24 hours is only charged once |