Recieve real-time updates to user timeline


Is it possible to use the twitter api to recieve real-time updates of a user timeline? If so, what would be the best way?

Sorry if this isn’t the correct subforum.


Sure, best one to use is with the follow parameter


A couple of follow up questions:

  1. Will this really send updates when the user’s timeline updates due to a tweet from another user he is following?
  2. Is there any limit to the amount of users you can apply this to?
  3. Is it free?


Oh, i thought you meant user timeline as in 1 specific user’s tweets like a streaming equivalent of , not tweets by anyone a specific user is following like

In both cases though, the filter endpoint is what you’ll need - it’s free and there’s a 5000 id limit on the number of users you can track, and you can keep open 1 such connection. You can get user ids of accounts someone is following with


Thanks, I’ll give it a try!

Btw, I was looking into webhooks( earlier. Do you know if I can get updates when a user’s timeline is updated (due to his friend’s tweets) from that? I thought so at first but I’m unsure now.


Not for any tweet, but partially yes: here’s stuff you get from Activities API - so whenever a someone Retweets, Replies, @mentions, QuoteTweets you, you’ll be able to get those messages, but not when anyone you follow makes any kind of tweet - just one that includes you.


What you’re describing and requesting is real-time updates to what we call a user’s “home timeline” i.e. all of the Tweets the user would see if they opened and looked at the stuff flowing in from the people they follow. This is no available in the API, but you can approximate it. You can also poll the RESTful home_timeline endpoint, but this is not realtime.


Thanks Igor! you saved me a lot of time. I’ll look into the filter realtime feature :slight_smile:


Ok thanks! Yeah I have tried polling it but I’d prefer realtime.