The X API is X's official interface for reading and writing posts, users and events. X describes it as "programmatic access to X's public conversation". Since 6/2/2026 it is pay-per-use: you buy credits and pay $0.005 per post read, $0.010 per user read and per-event charges for webhooks. X's pricing page lists no free tier. Every number on this page was read on docs.x.com on 22/11/2026 and links to its source.
What is the X API?
The X API lets your code do what the X app does: read posts, look up users, follow conversations, post, send DMs and receive events. X lists v2 REST endpoints for posts, users, Spaces, lists, DMs and trends (X API introduction). Requests go to api.x.com/2/, as in X's own examples.
| Part | What it does | Typical use |
|---|---|---|
| REST endpoints | Ask for posts, users, followers, lists, trends | Lookups, search, history, dashboards |
| Filtered stream | A persistent connection that sends posts matching your rules | Keyword or account feeds |
| Activity API (XAA) | Webhook or stream of events: posts, deletes, profile updates, follows, DMs | Watching specific accounts |
| Write endpoints | Create posts, send DMs, manage lists and bookmarks | Publishing tools, bots |
X API or Twitter API? The same thing. Twitter was renamed X in 2023 and the developer platform moved to docs.x.com and console.x.com. Most people still search for "Twitter API".
How much does the X API cost in 2026?
You buy credits up front and each request or event is deducted. X says there are no subscriptions and you pay only for what you use. Reads are charged per resource returned. Prices below are from docs.x.com pricing, checked on 22/11/2026. X notes prices can change.
Reads
| Operation | Price | Unit | Source |
|---|---|---|---|
| Posts: Read | $0.005 | per post returned | docs.x.com |
| User: Read | $0.010 | per user returned | docs.x.com |
| Following/Followers: Read | $0.010 | per account returned | docs.x.com |
| DM Event: Read | $0.010 | per event | docs.x.com |
| List, Space, Community, Note: Read | $0.005 | per resource | docs.x.com |
| Profile Update: Read | $0.005 | per resource | docs.x.com |
| Like, Mute, Block: Read | $0.001 | per resource | docs.x.com |
| Owned reads (your own posts, mentions, bookmarks, followers, lists) | $0.001 | per resource | docs.x.com |
Writes
| Operation | Price | Unit | Source |
|---|---|---|---|
| Post: Create | $0.015 | per request | docs.x.com |
| Post: Create (with URL) | $0.200 | per request | docs.x.com |
| Post: Create (summoned) | $0.010 | per request | docs.x.com |
| DM Interaction: Create | $0.015 | per request | docs.x.com |
| Trends | $0.010 | per request | docs.x.com |
| Counts: Recent / All | $0.005 / $0.010 | per request | docs.x.com |
Webhook and Activity API events
| Event | Price per event | Public or private | Source |
|---|---|---|---|
post.create | $0.005 | Public | pricing, XAA |
post.delete | "Not billed" (pricing page); "billed as a Post" (XAA introduction) | Public | pricing, XAA |
profile.update.* (9 types: bio, picture, banner, name, handle, location, URL, verified and affiliate badges) | $0.005 | Public | pricing, XAA |
follow.follow, follow.unfollow | $0.010 | Not in X's public list | pricing |
dm.received, chat.received | $0.010 | Private (user consent) | pricing |
spaces.start, spaces.end, news.new | $0.005 | pricing |
Events are billed once each, deduplicated within the same 24-hour UTC window. The two X pages disagree on whether post.delete is billed; we report both.
Is there a free X API tier?
No. The pricing page lists pay-per-use and Enterprise only. The free money on offer is promotional (source):
- $20 credit when you save your first eligible payment card and complete your first credit purchase.
- First auto-recharge matched up to $50.
- xAI credit back on cumulative spend per billing cycle: 0% up to $199, 10% from $200, 15% from $500, 20% from $1,000. Your xAI team must be linked to your X developer account.
How do I get an X API key?
Six steps, from X's getting access page and its pricing page:
- Sign in at console.x.com with your X account.
- Accept the Developer Agreement and Policy.
- Describe your use of the API in the profile form.
- Create a New App with a name, description and use case.
- Save your credentials now. The console shows the API key and secret, bearer token, access token and secret, and client ID and secret once. If you lose them you must regenerate, which invalidates the old ones.
- Buy credits before making paid calls, and set a spending limit and auto-recharge if you want them.
What happened to Basic, Pro and Enterprise?
X's pricing page now lists pay-per-use and Enterprise only (checked 22/11/2026). Enterprise is the route above 3 million post reads a month. When pay-per-use launched, X said Basic and Pro remained available. X's developer forum has since posted that legacy Basic and legacy Pro plans are moving to pay-per-use.
X API change log 2026
| Date | Change | Effect |
|---|---|---|
| 6/2/2026 | Pay-per-use launch | Credit-based billing, new Developer Console; Basic and Pro still available at launch |
| 23/2/2026 | Limits on programmatic replies | On self-serve tiers, replies only where the original author summoned the replier |
| 16/4/2026 | Pricing update | Owned reads $0.001, post creation $0.015, posts with a URL $0.20; following, likes and quote posts via the API removed from self-serve tiers |
| 4/5/2026 | Search moved to a new index | New precision operators; no retweets in keyword search results |
| 4/6/2026 | Activity API post events | post.create and post.delete events, subscribed by user ID |
| 2/10/2026 | Free credit incentives | One-time credits for saving a card and matching the first auto-recharge |
| 19/11/2026 | Wider reply and mention coverage | Activity API reply and mention events cover deeper threads and more cases |
Source: X API changelog, read 22/11/2026.
What does it cost to monitor accounts in real time on the X API?
Most guides price posting. If you want to watch accounts, the Activity API is the official route: subscribe to each account and pay $0.005 per post.create event. Worked examples, posts only:
| Accounts | 7 posts a day each | 20 posts a day each | Flat third-party stream (Xanguard) |
|---|---|---|---|
| 10 | 2,100 events, about $10.50 | 6,000 events, about $30 | $49 |
| 100 | 21,000 events, about $105 | 60,000 events, about $300 | $299 (125 handles) |
| 1,000 | 210,000 events, about $1,050 | 600,000 events, about $3,000 | $1,125 |
Per 30-day month. Add $0.010 per follow or unfollow event and $0.005 per profile update. Self-serve Activity API access is capped at 1,500 subscriptions (75,000 on Enterprise), and posts from protected accounts are not delivered (source). For accounts that post a few times a day, X's per-event price is lower than a flat stream. For busy accounts, or when you want deletes, follows and profile changes included in one price, a flat stream costs less. Full comparison: X API alternatives by price per handle.
X API rate limits and caps
| Endpoint | Per app | Per user |
|---|---|---|
GET /2/users/:id/tweets (user timeline) | 10,000 / 15 min | 900 / 15 min |
GET /2/tweets/search/recent | 450 / 15 min | 300 / 15 min |
GET /2/users/by/username/:username | 300 / 15 min | 900 / 15 min |
GET /2/users/:id/following | 300 / 15 min | 300 / 15 min |
POST /2/tweets | 10,000 / 24 h | 100 / 15 min |
GET /2/tweets/search/stream (filtered stream connect) | 50 / 15 min | n/a |
Over a limit you get HTTP 429 with error code 88; the x-rate-limit-remaining and x-rate-limit-reset headers tell you when to retry (rate limits). On top of rate limits, pay-per-use is capped at 3 million post reads per monthly billing cycle (pricing).
Filtered stream vs Activity API vs polling: which to use
| Filtered stream | Activity API | Polling REST endpoints | |
|---|---|---|---|
| You subscribe to | Up to 1,000 rules (1,024 characters each) | User IDs and event types; 1,500 subscriptions self-serve | Nothing; you ask on a schedule |
| Delivery | Persistent HTTP stream (keep-alive every 20 s) or webhook | Webhook or persistent HTTP stream | Your own requests |
| Stated latency | About 4 to 5 s P99 | Not stated | Your polling interval |
| Deletes, profile changes | No | Yes | Only by re-checking |
| Billing | $0.005 per post read | Per event | Per resource returned |
| Best for | Keywords and hashtags across all of X | Watching specific accounts | History and lookups |
Sources: filtered stream, Activity API, pricing, read 22/11/2026.
When you don't need an X API key
If all you want is a live feed from a list of accounts, a third-party stream gives you its own key and bills per account per month. Options and prices: X API alternatives compared. If you are replacing filtered stream from: rules: filtered stream alternative. If you need deletion events: deleted tweet detection API. Per-account cost on the official API in more depth: X API cost 2026.
Frequently Asked Questions
No. X's pricing page lists pay-per-use credits and Enterprise, with no free tier (checked 22/11/2026). New accounts can earn a one-time $20 credit for saving an eligible payment card and making a first credit purchase, and X matches the first auto-recharge up to $50.
There is no monthly fee. You pay per item: $0.005 per post read, $0.010 per user read, $0.015 per post created and $0.200 per post with a URL, deducted from credits you buy up front. Your monthly bill is whatever you use (docs.x.com pricing, checked 22/11/2026).
Yes. X launched pay-per-use on 6/2/2026. You buy credits up front and each request or event is deducted. You can set a spending limit per billing cycle and an auto-recharge threshold.
Yes. Twitter was renamed X in 2023 and its developer platform followed. The documentation now lives at docs.x.com and the console at console.x.com. People still search for 'Twitter API'; it is the same product.
Sign in at console.x.com with your X account, accept the Developer Agreement and Policy, describe how you will use the API, then create a New App. The console shows your API key and secret, bearer token, access token and secret, and client ID and secret once, so save them straight away. Buy credits before making paid calls.
X's getting-access page does not mention payment for creating an app. To make paid calls you need credits bought up front. The pricing page ties its free $20 credit to saving an eligible payment card, and auto-recharge needs a saved default payment method.
X's pricing page no longer lists Basic or Pro (checked 22/11/2026). When pay-per-use launched on 6/2/2026, X said Basic and Pro remained available; X's developer forum has since announced that legacy Basic and Pro plans are moving to pay-per-use.
Pay-per-use is capped at 3 million post reads per monthly billing cycle. X's pricing page says higher volume needs an Enterprise plan. Separately, if you set a spending limit, requests are blocked once you reach it until the next cycle.
Yes, per event. On X's pricing page, Activity API post.create and profile.update events cost $0.005, follow and unfollow events $0.010, and DM or chat received events $0.010. Several events, including post.delete, are listed as not billed. Events are deduplicated within the same 24-hour UTC window.
Yes. The Activity API has a public post.delete event, added on 4/6/2026, delivered by webhook or persistent stream. The pricing page lists it as not billed, while the Activity API introduction says each delivered post event is billed as a post. Enterprise customers also get delete events in the compliance stream.
Yes, through third-party streams that give you their own key, such as Xanguard, TweetStream or twitterapi.io. They are billed per tracked account per month rather than per post. Our X API alternatives page compares them by price per handle, events and latency.