[Possible api bug] Returned replies and retweets are null even though there were some in given timeframe



According to ads analytics best practices: https://dev.twitter.com/ads/analytics/best-practices the data is gathered real-time and should be available within secconds.

I have created a post on 30-05-2016 18:03 and few minutes later another user replied to that tweet and retweeted it.
ads.twitter.com has shown those:

Total engagements	2
Replies	                1
Retweets	        1 

I used twurl to try gathering the same statistics using:
twurl -H ads-api.twitter.com “/1/stats/accounts/18ce54bg7zc?granularity=TOTAL&entity=ORGANIC_TWEET&entity_ids=11111111111111111&start_time=2016-05-28T15:00:00Z&end_time=2016-06-01T16:00:00Z&placement=ALL_ON_TWITTER&metric_groups=ENGAGEMENT”

Which returned null for all values except for impressions (8). Using granularity of HOUR or DAY had similar results(at first I used HOUR aiming just for the last hour, but I thought I might be not getting correct timeframe, so to made sure I used total with start/end time far exceeding the one I was aiming for).

About 18:43, so around 30 minutes after the post was made using exactly the same twurl command returned:


Which included the reply from before, but was still missing replies(how come?).

What is more, now, (18:55) I ran exactly the same twurl again, which returned:


But there were no new retweets since then. Both twitter.com and ads.twitter.com show that there was only single retweet. Obviously the analytics are wrong.

What is going on? How to avoid wrong data? Changing granuality to daily doesn’t help:
twurl -H ads-api.twitter.com “/1/stats/accounts/18ce54bg7zc?granularity=HOUR&entity=ORGANIC_TWEET&entity_ids=111111111111111&start_time=2016-05-30T16:00:00Z&end_time=2016-05-30T17:00:00Z&placement=ALL_ON_TWITTER&metric_groups=ENGAGEMENT”


Still no replies and retweets count is wrong. 16-17 is used instead 18-19 because of timezone difference.


I made some more investigation, which made me almost sure this is some API bug. For example I have analytics for one post created on May 11th, which has ~1500 engagement, 1 reply and 1 retweet. Engagement is reported properly with sum of all hours since it was published being exactly the same as reported trough ads.api.com. Meanwhile retweets and responses are null since the beginning till now.


I also identified this problem.

this request covers the whole lifetime for the tweet.
twurl -H ads-api.twitter.com "/1/stats/accounts/18ce545gmtk?entity=ORGANIC_TWEET&entity_ids=737260702881157120&start_time=2016-05-30T02:00:00Z&end_time=2016-06-05T02:00:00Z&metric_groups=ENGAGEMENT&granularity=TOTAL&placement=ALL_ON_TWITTER"
the response states that there are only 2 replies and but 5 likes

the twitter analytics UI in contrast says that there are 4 replies and 4 likes


Thanks for reporting these issues. I could repro the gap in ORGANIC_TWEET data and will follow up to see what’s going on.


Any news on the issue yet?


Hi, I checked and the same results are actually given via v0 version of the API as well (e.g. with a query like twurl -H ads-api.twitter.com ‘/0/stats/accounts/18ce545gmtk/organic_tweets/?granularity=TOTAL&start_time=2016-05-30T02:00:00Z&end_time=2016-06-05T02:00:00Z&tweet_ids=:tweet_id’)

We have a guess that the difference is because 2 of the replies are from when the tweet was promoted and the analytics.twitter.com is counting those as part of the organic data (whereas Ads API separates them) - I will have to do investigation to confirm whether this is really what’s happening so for the meantime I would ask to repro the stats calls upon a tweet that has definitely never been promoted and check to see if you see the same difference or not.


I don’t think this is related to promotion, because at least my tweet that is mentioned above was never promoted.


Maybe some of the differences have to do with analytics not being “final” for the last 24 hours?

I’m talking about this from the documentation:
As soon as stats are available, you are able to retrieve them. The feedback on stats is real-time. These early results are estimates, the stats are finalized after 24 hours, except for spend metrics.”

By the way, is the above true both for organic tweet and promoted tweet?


The wrong data is still returned after 24h for my posts and they are not promoted.


Unfortunately we have not had a chance to do a deeper dive into this issue, but one thing to note is that the same numbers are returned from v0 so it isn’t a specific problem with v1 and can basically confirm that it is a bug we will have to investigate further. I would be curious to know if it happens across other tweets or only is this single repro (since I haven’t heard this reported from other sources).