organic_tweets "DAY" granularity returning no data


#1

We’ve noticed that in the past few weeks we’re not getting any data when calling the organic_tweets endpoint (everything is returning 0), however, we’ve found that if we run the same query with “HOUR” granularity instead of “DAY” we get data.

For Example:

API Call:

https://ads-api.twitter.com/0/stats/accounts/ACCOUNT_ID/organic_tweets
Params:
tweet_ids: TWEET_ID
metrics: organic_tweet_impressions
start_time: 2015-04-25T07:00:00Z
end_time: 2015-04-27T07:00:00Z
with_deleted: true
granularity: DAY

Response:

{
  "data_type": "stats",
  "data": [
    {
      "start_time": "2015-04-25T07:00:00Z",
      "organic_tweet_impressions": [
        0,
        0
      ],
      "end_time": "2015-04-27T07:00:00Z",
      "id": "TWEET_ID",
      "granularity": "DAY"
    }
  ],
  "request": {
    "params": {
      "start_time": "2015-04-25T07:00:00Z",
      "end_time": "2015-04-27T07:00:00Z",
      "tweet_ids": [
        TWEET_ID
      ],
      "account_id": "ACCOUNT_ID",
      "granularity": "DAY",
      "metrics": [
        "organic_tweet_impressions"
      ]
    }
  }
}

The same call with: “granularity: HOUR”:

{
  "data_type": "stats",
  "data": [
    {
      "start_time": "2015-04-25T07:00:00Z",
      "organic_tweet_impressions": [
        6,
        3,
        0,
        2,
        2,
        4,
        2,
        1,
        2,
        3,
        3,
        2,
        2,
        0,
        0,
        0,
        0,
        0,
        1,
        1,
        0,
        0,
        1,
        2,
        2,
        3,
        1,
        4,
        2,
        0,
        2,
        3,
        1,
        2,
        2,
        2,
        1,
        1,
        0,
        1,
        0,
        1,
        0,
        0,
        0,
        6,
        2,
        3
      ],
      "end_time": "2015-04-27T07:00:00Z",
      "id": "TWEET_ID",
      "granularity": "HOUR"
    }
  ],
  "request": {
    "params": {
      "start_time": "2015-04-25T07:00:00Z",
      "end_time": "2015-04-27T07:00:00Z",
      "tweet_ids": [
        TWEET_ID
      ],
      "account_id": "ACCOUNT_ID",
      "granularity": "HOUR",
      "metrics": [
        "organic_tweet_impressions"
      ]
    }
  }
}

As you can see, these are the exact same date ranges, one returning data and the other doesn’t.

Thanks


#2

Thanks for reporting this! This is due to a known issue in the system, and we’ll put a fix in for this soon. I’ll update this thread when that goes through.

In the meantime, an easy workaround is to retrieve the same data with “HOUR” granularity as you’re doing now, and aggregate those results.


#3