Get started
Create an app and make your first request in minutes.
API reference
Explore all available endpoints.
SDKs
Official Python and TypeScript libraries.
What you can build
Posts
Search, retrieve, and publish posts. Access timelines, threads, and quote posts.
Users
Look up users, manage follows, blocks, and mutes.
Spaces
Find live audio conversations and their participants.
Direct Messages
Send and receive private messages.
Lists
Create and manage curated lists of accounts.
Trends
Access trending topics by location.
Pricing
The X API uses pay-per-usage pricing. No subscriptions, no monthly caps—pay only for what you use.Flexible scaling
Start small and grow. Costs scale with your actual usage.
No commitments
No contracts or minimum spend. Stop anytime.
Real-time tracking
Monitor usage and costs live in the Developer Console.
Credit-based
Purchase credits upfront. Deducted as you use the API.
Key features
- Data access
- Real-time streaming
- Search & analytics
Rich data objects
Access detailed, structured data for posts, users, media, and more:- Posts: Full text, metrics, entities, annotations, conversation threads
- Users: Profiles, follower counts, verification status
- Media: Images, videos, GIFs with metadata
- Polls: Options and vote counts
API versions
| Version | Status | Description |
|---|---|---|
| v2 | Current | Modern endpoints, flexible pricing, all new features |
| v1.1 | Legacy | Limited support, some endpoints still available |
| Enterprise | Available | High-volume access with dedicated support |
Quick start
1
Create a developer account
Sign up at console.x.com and create an app.
2
Get your credentials
Generate your Bearer Token for app-only requests.
3
Make a request
Try looking up a user:
Tools & libraries
Python SDK
Official Python library with async support.
TypeScript SDK
Official TypeScript/JavaScript library.
Postman
Interactive API explorer.