How to use filters in Facebook & Instagram Ads sources
You can filter the data you import using Graph API syntax: [filter_1, filter_2, ..., filter_N].
To apply a single filter, use one filter ([filter_1]). The structure looks like this:
[
{
"field":"adset.name",
"operator":"CONTAIN",
"value":"Blog"
}
]field - the field name you want to apply the filter to
operator - the condition you want to use in the filter. The Facebook Ads API allows one of the following values: EQUAL, NOT_EQUAL, GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL, IN_RANGE, NOT_IN_RANGE, CONTAIN, NOT_CONTAIN, IN, NOT_IN, STARTS_WITH, ENDS_WITH, ANY, ALL, AFTER, BEFORE, ON_OR_AFTER, ON_OR_BEFORE, NONE, TOP
value - the value to compare a field against. It can be a number (without quotes), a string (with quotes), or an array of values (numbers or strings)
A single filter looks like this:

Some common single-filter examples, ready to copy and paste:
1. Filter by ad name containing a value:
2. Filter by ad set name equal to a value:
3. Filter by amount spent:
4. Filter for either item in a list of actions. For example, action_type must be link_click or landing_page_view:
5. Use several filters in a single data flow: [filter_1, filter_2]
Last updated
Was this helpful?
