Reputation: 171
I want to get the daily insights data so I try to use the below edge to request record by record (day by day). If there is data for 30 days, I have to request 30 times.
/insights?fields=impressions,social_clicks,website_clicks,ctr&time_range={'since':'2015-01-01','until':'2015-01-01'}
But if I can break down by using the edge such as the below one, I would not have to request many times.
/insights?fields=impressions,social_clicks,website_clicks,ctr&breakdowns=DAY
Do you know how to break down the insights by day?
Upvotes: 17
Views: 8916
Reputation: 361
You can select how to break in days using a parameter, for getting daily info just use the parameter time_increment
parameter with value 1.
/insights?fields=impressions,social_clicks,website_clicks,ctr&time_range={'since':'2015-01-01','until':'2015-01-30'}&time_increment=1
Reference: https://developers.facebook.com/docs/marketing-api/reference/ad-account/insights/
Upvotes: 36