How to retrieve audiences used in ads using facebook marketing api?

52 views Asked by At

I'm looking to create a report showing which of our saved_audience(s) is/are being used with our ads. Is there a way to see the audience name or id that corresponds to a specific ad?

I've tried the following hoping to be able to retrieved the information: {ad_account_id}/insights?fields=campaign_id,campaign_name&level=ad&breakdowns=saved_audience

and got

{
  "error": {
    "message": "(#100) breakdowns[0] must be one of the following values: ad_format_asset, age, app_id, body_asset, call_to_action_asset, coarse_conversion_value, country, description_asset, fidelity_type, gender, hsid, image_asset, impression_device, is_conversion_id_modeled, link_url_asset, media_asset_url, media_creator, media_destination_url, media_format, media_origin_url, media_text_content, postback_sequence_index, product_id, redownload, region, skan_campaign_id, skan_conversion_id, skan_version, title_asset, video_asset, dma, frequency_value, hourly_stats_aggregated_by_advertiser_time_zone, hourly_stats_aggregated_by_audience_time_zone, mmm, place_page_id, publisher_platform, platform_position, device_platform, standard_event_content_type, marketing_messages_btn_name",
    "type": "OAuthException",
    "code": 100,
    "fbtrace_id": "AgHiM0UIZAhk9A7wLRI7Uxn"
  }

{ad_account_id}/insights?fields=campaign_id,campaign_name,saved_audience&level=ad

and got

{
  "error": {
    "message": "(#100) saved_audience is not valid for fields param. please check https://developers.facebook.com/docs/marketing-api/reference/ads-insights/ for all valid values",
    "type": "OAuthException",
    "code": 100,
    "fbtrace_id": "AeaGfLKw0TZqgwX_-Qe5Phg"
  }
}

I've scored the documentation but have only found information on creating audiences rather than finding information on the audiences already used.

0

There are 0 answers