Hi @Pushkr,
The issue here is with the timezone on your API request. This “2017-11-01T00:00:00Z” is at 12AM UTC, since our data is all stored in UTC. The timezone on the ads account is in EST which is currently UTC + 5. If you leave off “T00:00:00Z” from the API request it will use the ads account timezone.
If you’d like to match your API request to the UI, it would be the following: (note start time is UTC +4 because it was before DST ended)
$ twurl -H ads-api.twitter.com "/2/stats/accounts/18ce53uxjpy?entity=PROMOTED_TWEET&entity_ids=1jrlnc,1jkf91&start_time=2017-11-01T04:00:00Z&end_time=2017-11-07T05:00:00Z&granularity=TOTAL&placement=ALL_ON_TWITTER&metric_groups=ENGAGEMENT,BILLING" | jq
{
"data_type": "stats",
"time_series_length": 1,
"data": [
{
"id": "1jrlnc",
"id_data": [
{
"segment": null,
"metrics": {
"impressions": [
217632
],
"tweets_send": [
10
],
"billed_charge_local_micro": [
1962306747
],
"qualified_impressions": null,
"follows": [
20
],
"app_clicks": null,
"retweets": [
158
],
"likes": [
1003
],
"engagements": [
4801
],
"clicks": [
3676
],
"card_engagements": null,
"poll_card_vote": null,
"replies": [
56
],
"url_clicks": [
1236
],
"billed_engagements": [
3185
],
"carousel_swipes": null
}
}
]
},
{
"id": "1jkf91",
"id_data": [
{
"segment": null,
"metrics": {
"impressions": [
71548
],
"tweets_send": [
9
],
"billed_charge_local_micro": [
737693253
],
"qualified_impressions": null,
"follows": [
6
],
"app_clicks": null,
"retweets": [
104
],
"likes": [
547
],
"engagements": [
1907
],
"clicks": [
1468
],
"card_engagements": null,
"poll_card_vote": null,
"replies": [
43
],
"url_clicks": [
389
],
"billed_engagements": [
1305
],
"carousel_swipes": null
}
}
]
}
],
"request": {
"params": {
"start_time": "2017-11-01T04:00:00Z",
"segmentation_type": null,
"entity_ids": [
"1jrlnc",
"1jkf91"
],
"end_time": "2017-11-07T05:00:00Z",
"country": null,
"placement": "ALL_ON_TWITTER",
"granularity": "TOTAL",
"entity": "PROMOTED_TWEET",
"platform": null,
"metric_groups": [
"ENGAGEMENT",
"BILLING"
]
}
}
}
Ads UI - 11/1 - 11/6 = 11/1 - 11/7 in API:
