Facebook "Not Delivering Not Approved" Ad Sets via Python SDK
<p>Having a little trouble here with filtering ad sets via the Facebook Ads Python SDK.</p>

<p>I'm making the following call (the variable account is an instance of  <a href="https://github.com/facebook/facebook-python-ads-sdk/blob/f02c6d5a5a3b211751f4eb3975cd3659cf001f17/facebookads/adobjects/adset.py" rel="nofollow">AdAccount</a>):</p>

<pre><code>account_adsets = account.get_ad_sets(fields=fields, params={'effective_status':['ACTIVE'], 'status':['ACTIVE'],
                                                'date_preset':'today',
                                                'is_completed':False,
                                                'include_deleted':False})
</code></pre>

<p>And I'm getting back adsets that are marked "Not Delivering, Not Approved" in the "Delivery" column of Power Editor, in addition to the ones marked "Active".</p>

<p>As you can see in the call above, I'm already restricting things to 'status':['ACTIVE'], which I would have thought would filter our disapproved adsets (as suggested in the <a href="https://github.com/facebook/facebook-python-ads-sdk/blob/f02c6d5a5a3b211751f4eb3975cd3659cf001f17/facebookads/adobjects/adset.py" rel="nofollow">AdSet source here</a>, and copied below):</p>

<pre><code>class AdSet(
    AbstractCrudObject,
    HasAdLabels,
    CanValidate,
):

def __init__(self, fbid=None, parent_id=None, api=None):
    self._isAdSet = True
    super(AdSet, self).__init__(fbid, parent_id, api)

class EffectiveStatus:
    active = 'ACTIVE'
    paused = 'PAUSED'
    deleted = 'DELETED'
    pending_review = 'PENDING_REVIEW'
    disapproved = 'DISAPPROVED'
    preapproved = 'PREAPPROVED'
    pending_billing_info = 'PENDING_BILLING_INFO'
    campaign_paused = 'CAMPAIGN_PAUSED'
    archived = 'ARCHIVED'
    adset_paused = 'ADSET_PAUSED'
</code></pre>

<p>Anyone have any ideas how I could stop those ad sets from appearing?</p>

<p>Ad Sets aren't approved or disapproved, Ads are.</p>

<p>I'm not 100% sure what you're seeing in the Power Editor UI, but I suspect it's showing 'Not Delivering, Not Approved' via detecting that all of the Ads in that Ad Set are DISAPPROVED</p>

<p>In your case, you should filter on the Ads' status by fetching at that level and working back up to the Ad Sets and Campaigns, or do filtering after your current call based on the Ads in the Ad Set</p>

python facebook-graph-api facebook-ads-api