Inconsistent results for statuses/user_timeline

Occasionally, statuses/user_timeline will return only a single tweet, and rarely will return only an empty list. This seems to only happen during off-peak hours (it’s happening currently at 10am EDT), and I’ve only observed it happening with Donald Trump’s timeline, although I haven’t extensively tested that aspect.
I’ve switched to the streaming filter API for now, and that works, but I would prefer to use the timeline if possible.

Thanks so much for reaching out here. Can you provide a few examples of Tweets this has happened with? Also do you have a code sample you can send along as well?
Thanks again!

GET statuses/user_timeline by default does not return retweets. So if the user you are getting tweets from had 10 retweets and the response will be empty.
If you want more results you can

  • Increase the count of tweets to you want returned
  • set include_rts=true
  • use max_id to paginate and get older tweets

I’ve just been using Postman to test this issue, but GETting with a user_id of 25073877 (Donald Trump’s id) will occasionally only return the latest tweet (id 1164914963766546435 at the moment). The rest of the time (other than the rare instances where it returns an empty list), it will return the expected result, his 20 latest tweets.

I get the result I expect (the 20 latest tweets) about half the time, it’s just that it will sometimes return a single tweet, even when the requests are made within seconds of each other.

This sounds like an eventual consistency or datacenter clustering issue. If you’re making requests within seconds of one another on a very fast basis, there’s a chance that the requests may be interrupting one another, or hitting different nodes on the backend that are not currently synchronised and return limited data.

Sending requests that fast is not my normal usage, the script I was using this in was sending a request every minute and encountering the same issue. Synchronization doesn’t seem like it could be the cause either, as it’s always either the last tweet, or no tweets at all.
I think it may be important to reiterate that I’m only able to reproduce this issue on Donald Trump’s account, for whatever reason. I’ve tested 5 other high activity accounts, at different times of the day, and have always received the expected response.

So you’ve confirmed that this is happening on a well known, popular and high traffic account, I would again suggest that under the standard API the infrastructure and cluster is probably not built to support high volume (whether your app or others) queries. The Twitter standard API is unfortunately not able to provide any assurance of response. We recognise that this may be frustrating.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.