Ads API Response not matching with dashboard values

ads

#1

I am trying to get values of impression,clicks and other parameters of campaign using ads API ,
i am passing start and end date of my campaign to get these values but i values get from API are not match with ads manger dashboard values.

twurl -H ads-api.twitter.com “/1/stats/jobs/accounts/18ce548hnmt?entity= CAMPAIGN &entity_ids=7q1k8&start_time=2017-03-09&end_time=2017-04-22&granularity=TOTAL&placement=ALL_ON_TWITTER&metric_groups=ENGAGEMENT”

Result of gzip

{“data_type”:“stats”,“time_series_length”:1,“data”:[{“id”:“7sens”,“id_data”:[{“segment”:null,“metrics”:{“video_views_50”:null,“impressions”:[303],“mobile_conversion_spent_credits”:“end_time”:“2017-04-26T19:00:00Z”,“country”:null,“placement”:“ALL_ON_TWITTER”,“granularity”:“TOTAL”,“entity”:“CAMPAIGN”,“platform”:null,“metric_groups”:[“ENGAGEMENT”,“WEB_CONVERSION”,“BILLING”,“MEDIA”,“VIDEO”,“MOBILE_CONVERSION”]}}}

but actual values on my ads dashboard ,

impression :737

How can i get exact result???

Thank you


#2

When pulling data from Ads API, please remember that the start and end dates are exclusive. Meaning that, if you specify start date as 2017-03-09, the results will not include 2017-03-09 data. In Ads Dashboard UI, the start date is inclusive and this is why you are seeing the discrepancy.

Additionally, keep in mind that input values that omit the timestamp will be automatically translated to the appropriate UTC value unless you take the extra step and specify the exact hour (e.g.2017-03-09T14:00:00Z). Detailed information can be found here.