Twitter Ads api returns empty data


#1

For the period of May 1st to May 10th the Twitter Ads Console is showing impressions for campaign. I checked a similar forum. It says may be the campaign does not have data for that period. But the Twitter Ads Console shows data.

I tried this with twurl

twurl -H ads-api.twitter.com “/2/stats/accounts/18ce53zca8i?start_time=2018-05-01&end_time=2018-05-08&entity=CAMPAIGN&entity_ids=asey7&granularity=TOTAL&metric_groups=ENGAGEMENT&placement=ALL_ON_TWITTER”

It returned

{
“data_type”: “stats”,
“time_series_length”: 1,
“data”: [
{
“id”: “asey7”,
“id_data”: [
{
“segment”: null,
“metrics”: {
“impressions”: null,
“tweets_send”: null,
“qualified_impressions”: null,
“follows”: null,
“app_clicks”: null,
“retweets”: null,
“likes”: null,
“engagements”: null,
“clicks”: null,
“card_engagements”: null,
“poll_card_vote”: null,
“replies”: null,
“url_clicks”: null,
“carousel_swipes”: null
}
}
]
}
],
“request”: {
“params”: {
“start_time”: “2018-04-30T19:00:00Z”,
“segmentation_type”: null,
“entity_ids”: [
“asey7”
],
“end_time”: “2018-05-07T19:00:00Z”,
“country”: null,
“placement”: “ALL_ON_TWITTER”,
“granularity”: “TOTAL”,
“entity”: “CAMPAIGN”,
“platform”: null,
“metric_groups”: [
“ENGAGEMENT”
]
}
}
}


#2

Hi @sarun.ks! I see that you’re only getting data for the ALL_ON_TWITTER placement - you actually need to make two requests, one for each platform, ALL_ON_TWITTER and PUBLISHER_NETWORK, and then add the results from the two requests. So see if by any chance, the results are on the PUBLISHER_NETWORK placement.


#3

Yes, it worked with that.


#4

Great! :slight_smile:

Thanks for marking the topic as solved! :wink: