Reputation: 307
When using Facebook's Ads API, I'd like to request all creatives for an account that are currently being used by an adgroup. I.e. where the count_current_adgroups value is > 0. I can pull all creatives for the account with:
">https://graph.facebook.com/adcreatives/?ids=act_123456789&access_token=
How do you limit this request to only return adcreatives that are being used by an adgroup?
Thanks.
Upvotes: 0
Views: 499
Reputation: 2880
John - This functionality doesn't currently exist. Your best bet is to load all the active adgroups in your account like this:
https://graph.facebook.com/adaccount/adgroups
Inside of each adgroup, it will list the adcreative that is currently associated with that adgroup. Collect all of these adcreative IDs together, and deduplicate them, then load them all using this syntax:
https://graph.facebook.com/adaccount/adcreatives?ids=1,2,3,4
This should give you the functionality you need, although it will take two calls to the Facebook Ads API to compute what you want.
Upvotes: 1