Reputation: 811
let's say you want the daily Ad performance stats for an account for January. Currently we (inefficiently) achieve this by making 31 calls (one per day of the month of January) like this:
https://graph.facebook.com/v2.1/act_1376129679271234/stats?access_token=&start_time=1422939600&end_time=1423026000
where start_time and end_time specify a duration of 1 day.
Is there a way where we can achieve this in fewer calls?
Many thanks, Pete
Upvotes: 0
Views: 1126
Reputation: 2256
You can use the new Ad Report Stats API in which you can specify your time range and time_increment
which is the number of days of data aggregation (in your case you want to set the time_increment
to 1).
https://developers.facebook.com/docs/marketing-api/adreportstats/v2.2#params
Upvotes: 1