Ads API Response not matching with dashboard values



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 “/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


but actual values on my ads dashboard ,

impression :737

How can i get exact result???

Thank you


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.