jonmrich
jonmrich

Reputation: 4323

Facebook Marketing API Between Relative Dates

I know I can retrieve data from the API between two specified dates like so:

https://graph.facebook.com/v2.5/act_xxxxxx/insights?level=ad&fields=ad_name,adset_name,campaign_name,spend,unique_clicks,clicks,impressions,cost_per_unique_click,cpm,ctr&sort=spend_descending&time_range[since]=2016-04-01&time_range[until]=2016-04-16

Is there a way to retrieve the data from the API using relative dates from today? Such as this psuedocode:

https://graph.facebook.com/v2.5/act_xxxxxx/insights?level=ad&fields=ad_name,adset_name,campaign_name,spend,unique_clicks,clicks,impressions,cost_per_unique_click,cpm,ctr&sort=spend_descending&time_range[since]=15 DAYS AGO&time_range[until]=7 DAYS AGO

Upvotes: 0

Views: 88

Answers (1)

Related Questions