X API
$0.005/post read
Pay per use with prepaid credits. $0.015 per post created. No minimum spend.
No
OAuth 2.0
Bearer Token from the developer console for app-only requests. Posting and user-context calls need user authorisation.
Posts and post search
User profiles and lookups
Followers and bookmarks (own account)
Post creation
Pricing checked on 23 Oct 2026 · Pricing page · Docs · Sign up
Description
The X API gives access to posts, users and related data on X, and lets an app create posts. Pricing is pay per use: you buy credits up front and each call draws them down.
In a marketing workflow it fits brand and keyword monitoring, user lookups and scheduled posting. Because cost scales with every post returned, an agent should limit how many posts it requests.
It suits teams that need X data at small to medium volume. Heavy readers should price it first, as reads are billed per post and there is a cap on volume before Enterprise.
Key endpoints
GET /2/tweets/search/recent: recent posts matching a queryGET /2/users/by/username/{username}: look up a user by handleGET /2/users/{id}/tweets: posts by a userPOST /2/tweets: create a post
Example request
curl "https://api.x.com/2/users/by/username/xdevelopers" -H "Authorization: Bearer YOUR_BEARER_TOKEN"
Tech details
- API style
- REST
- Base URL
- https://api.x.com
- Rate limits
- Not confirmed: the pricing page does not list rate limits. See docs.
- Official SDKs
- Python, TypeScript (official)
Use Cases
Posts and post search
User profiles and lookups
Followers and bookmarks (own account)
Post creation
Editor’s note What our review found
Editorial research, reviewed 23 Oct 2026. We read X's pricing page and API introduction. We did not run live calls. This listing is not an endorsement.
Cost: the page describes pay per use with no contracts, subscriptions or minimum spend. Credits are bought up front. We saw no free tier on the page, and it does not list rate limits. New paying users can earn $20 of free credits after saving a card and making a first purchase. You can set a spending limit and auto-recharge.
Credentials and data: you create an app in the developer console and get keys and tokens. Store them in environment variables or a secret manager, never in code or plain-text files. Posting needs user authorisation. Your queries go to X. Posts and user data you receive can include personal information.
Good to know: the page lists $0.005 per post read, $0.015 per post created, $0.200 to create a post containing a URL, $0.010 per user returned, and $0.001 per resource for reading your own data. Pay-per-use is capped at 3 million post reads per billing cycle. Repeat requests for the same resource within a 24-hour UTC window are not charged again. Rates can change, so check the page.