首页 > 解决方案 > How to filter facebook API Campaign data by veiculation date

问题描述

As of now, my query is:

https://graph.facebook.com/v3.1/my_adact/campaigns?fields=name,insights{spend,reach,impressions,clicks},start_time,end_time&date_preset=this_month&limit=100

How should I make it so I can filter by campaigns that ran this month?}

Thanks!

标签: facebookfacebook-graph-apiklipfolio

解决方案


To see campaign stats for every campaign that was active this month you can use the following query and the insights endpoint:

https://graph.facebook.com/v3.1/act_xxxxxx/insights?date_preset=this_month&level=campaign&fields=campaign_name,campaign_id,spend,impressions,reach,actions,clicks

This will return the insights as defined in the field parameter rolled up to the campaign level as defined by the level parameter and for this_month.


推荐阅读