Filtering by action_target_id on Facebook Ads API

389 views Asked by At

I am using the Facebook Ads API to try to filter out specific action target ids using the follwowing call:

(account-id)/reportstats?date_preset=yesterday&data_columns=["action_target_name","adgroup_id","adgroup_name","spend","actions","adgroup_objective"]&actions_group_by=["action_target_id", "action_destination"]&filters=[{"field": "action_target_id","type": "contains","value": 'insert id'}]

Every time I try to put in a specific ID, I get an empty data set back. Whenever I change the type to "not_contains", I get every piece of data returned. I've also tried the same with action_destination, but it keeps saying value needs to be numeric even though it a string.

It definitely seems like you can filter by action_target_id because when I tried to filter by something random, it told me that filter doesn't exist.

Can anyone help me please?

1

There are 1 answers

0
Paul Bain On BEST ANSWER

Unfortunately these values are nested under the actions fields of the results and filters only work on top level field values.