Retrieving statistics for tweets


I am fairly new to the twitter ads API but I have several months of experience with the rest api. I have seen some prior discussions on trying to get data out of the API (Here for example but found that I could not get any response.

My query looks like stats/accounts/{0}?start_time=2017-02-01T07:00:00Z&end_time=2017-03-01T07:00:00Z&entity=PROMOTED_TWEET&entity_ids=16l2ux&granularity=TOTAL&metric_groups=ENGAGEMENT&placement=ALL_ON_TWITTER where {0} is the account id. The response I get back is null.

I know I have access to this promoted tweet because I ran the promoted tweets query and got back part of the response containing {“line_item_id”:“7qngs”,“id”:“16l2ux”,“entity_status”:“ACTIVE”,“created_at”:“2017-02-17T18:53:54Z”,“updated_at”:“2017-02-18T04:05:26Z”,“approval_status”:“ACCEPTED”,“tweet_id”:“832663515290759169”,“deleted”:false}

What I am trying to do ultimately is retrieve watched, click, view, statistics for each tweet.


Any assistance available on this?


Hey @TGNdata

Can you try making the request again using twurl and let us know the exact request and response bodies?

Let us know.



I was able to fix it in time, thanks for following up. Seems there was something wrong with the proxy I was going through and wasn’t getting back the full error message. The max date range was supposed to be 7 days.