Facebook Marketing API: Is it possible to filter insights by status

Digital Marketing Facebook Marketing API 3 years ago

9.58K 1 0 0 0

_x000D_ _x000D_ I am trying to filter adsets insights by adset status, but when I add a status filter, I get an empty dataset back: curl "https://graph.facebook.com/v2.7/act_/insights?fields=clicks,impressions,cpc,ctr,account_id&time_range%5Bsince%5D=2016-01-12&time_range%5Buntil%5D=2016-09-12&access_token=&format=json&filtering=%5B%7B%22field%22:%22status%22,%22operator%22:%22EQUAL%22,%22value%22:%22ACTIVE%22%7D%5D&level=adset" here is what filtering param looks like before it gets url-encoded: [{"field":"status","operator":"EQUAL","value":"ACTIVE"}] I have tried all valid values for status ACTIVE, PAUSED, DELETED, ARCHIVED to no avail. When I remove filtering param - I see my data. The question is: Does anyone know if it is possible to filter by status, and if it is, what I am doing wrong?

User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 3 years ago
_x000D_ It is possible. Using latest version as of March 2018. You need to actually request all the ads that are ACTIVE and then provide insights as a 'nested' list of fields. Replace 123456 with your ad account (but leave the 'act_' which is needed) act_123456/ads?fields=effective_status,name,insights{total_action_value,total_actions,actions},adset_id,campaign_id&filtering=[{'field':'effective_status','operator':'IN','value':['ACTIVE']}] This also works for /campaigns and /adsets You can also do this (be sure to include &level=ad): act_123456/insights?fields=ad_id,adset_id,campaign_name,action_values,campaign_id,total_action_value&level=ad&filtering=[{"field":"campaign.delivery_info","operator":"IN","value":["active"]}]
0 views
0 shares

No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Similar Forum


Q

What are the best SEO tools for a personal website? What website or tools should I use to build and...

What are the best SEO tools for a personal website? What website or tools should I use to build and...
Q

Why is keyword research important?

Why is keyword research important?
Q

What is SEO ?

What is SEO ?