How do I stream tweets in real time?
Last updated July 25, 2026
Real-time tweet streaming through X's filtered stream is now an enterprise feature, so most developers poll instead. On TwitterAPIs you call the search or timeline endpoint on a short interval, for example every 30 seconds, at $0.0008 per call and about 20 tweets each, which is $0.04 per 1,000 tweets. Polling every 30 seconds runs roughly 2,880 calls a day.
Every rate here is the pricing TwitterAPIs publishes, $0.0008 per call and $0.04 per 1,000 tweets (source: twitterapis.com/pricing).
Can I get a real-time tweet stream without enterprise access?
X's filtered stream delivers matching posts over a persistent connection, but that firehose now sits behind the Pro and Enterprise tiers, which start in the thousands of dollars a month. For most projects the practical answer is polling: you call a hosted search or timeline endpoint on a short interval and treat each new batch as your stream. On TwitterAPIs that is $0.0008 per call, so a near-real-time feed costs a few dollars a day rather than an enterprise contract.
How does polling approximate a real-time stream?
You pick an interval, say 30 seconds, and on each tick you call the search or user timeline endpoint and read the newest posts. Anything published since your last poll is new, so the effect is a rolling feed with at most a 30-second delay. Each call returns about 20 tweets as parsed JSON, and because the response shape never changes, your consumer code stays identical whether you poll once a minute or four times a minute.
What does continuous polling cost?
The math is predictable because the rate is flat. Polling every 30 seconds is 2,880 calls a day, or about $2.30 at $0.0008 per call; every 10 seconds is 8,640 calls, about $6.90 a day. Measured per tweet it is still $0.04 per 1,000. There is no monthly minimum, so a feed you run for a week costs the same per call as one you run for a year, and the $0.50 signup credit covers the first day or two of testing.
How do I avoid duplicate tweets while polling?
Track the highest tweet id you have already seen and use it as a floor on the next poll, so each tick only processes posts newer than that id. This since-id pattern means you never pay for or reprocess the same tweet twice, which keeps a continuous feed both clean and cheap. Because ids are returned in every JSON response, the bookkeeping is a single variable your consumer updates after each $0.0008 call.
When do I actually need a true firehose?
A persistent filtered stream earns its enterprise price only at very high volume or sub-second latency, for example trading signals or global trend detection across millions of posts a minute. For monitoring a brand, a set of accounts, or a keyword, a 10-to-30-second poll at $0.04 per 1,000 tweets captures effectively the same posts at a tiny fraction of the cost, with no long-term contract to sign.
Real-time tweet options, compared
| Approach | Cost | Latency | Contract | Setup |
|---|---|---|---|---|
| TwitterAPIs polling (30s) | About $2.30/day | Up to 30 seconds | None, pay per call | One bearer token |
| X filtered stream | Pro tier, thousands/mo | Sub-second | Monthly commitment | Developer account and review |
| Scraping loop (snscrape) | $0 | Varies | None | Breaks on layout change |
| twitterapi.io stream | $0.15 per 1,000 | Near real time | None | API key |
The filtered stream endpoints deliver Tweets to you in real time.
Questions and answers
- Does TwitterAPIs offer a persistent streaming connection?
- No, and for most use cases it does not need to. Instead of a persistent socket you poll the search or timeline endpoint on a short interval at $0.0008 per call. A 30-second poll gives a rolling feed with at most a 30-second delay, which matches how most monitoring is built.
- How much does near-real-time polling cost per day?
- Polling every 30 seconds is 2,880 calls a day, about $2.30 at $0.0008 per call. Every 10 seconds is 8,640 calls, about $6.90 a day. Per tweet it stays $0.04 per 1,000, with no monthly minimum.
- Why is X's real-time stream so expensive?
- X moved the filtered stream firehose behind its Pro and Enterprise tiers, which start in the thousands of dollars a month. Polling a hosted endpoint at $0.04 per 1,000 tweets is the affordable alternative for anyone who does not need a true firehose.
- How do I stop processing the same tweet twice?
- Store the highest tweet id you have seen and pass it as a floor on the next poll, so each tick only returns newer posts. This since-id pattern means you never reprocess or pay for a duplicate, and the id is in every JSON response.
- When is a real firehose actually worth it?
- Only at very high volume or sub-second latency, such as trading signals across millions of posts a minute. For brand, account, or keyword monitoring, a 10-to-30-second poll captures the same posts at a fraction of the enterprise cost.
Keep reading
Start with $0.50 in free credits
No credit card. Roughly 12,500 tweets to test every endpoint.