Marketing API Version

Ad Campaign

Contains your advertising objective and one or more ad sets. Optimize and measure results for each advertising objective with campaigns. See Ads Help Center, Ad Campaign Structure for background and Ad Creative, Campaigns.

On May 1, 2018 with the release of Marketing API 2.13 we will remove kpi_custom_conversion_id, kpi_type, and kpi_results.

For example, create a new campaign and read all ad sets from the campaign:

use FacebookAds\Object\AdCampaign;
use FacebookAds\Object\Fields\AdSetFields;

$adcampaign = new AdCampaign($adcampaign_id);
$adsets = $adcampaign->getAdSets(array(
  AdSetFields::NAME,
  AdSetFields::CAMPAIGN_STATUS
));

// This will output the name of all fetched ad sets.
foreach ($adsets as $adset) {
  echo $adset->name;
}
from facebookads.objects import AdCampaign, AdSet

adcampaign = AdCampaign('<AD_CAMPAIGN_GROUP_ID>')
adsets = adcampaign.get_ad_sets([
    AdSet.Field.name,
    AdSet.Field.status,
])

# This will output the name of all fetched ad sets.
for adset in adsets:
    print adset[AdSet.Field.name]
curl -G \
-d "fields=name,campaign_status" \
-d "access_token=<ACCESS_TOKEN>" \
"https://graph.facebook.com/<API_VERSION>/<AD_CAMPAIGN_ID>/adcampaigns"

Limits

The following are the limits on ad campaigns

LimitValue

Maximum number of ad campaigns per regular ad account

5000 non deleted ad campaigns

Maximum number of ad campaigns per bulk ad account

10000 non deleted ad campaigns

Maximum number of ad sets per ad campaign

10000 non deleted ad sets

Maximum length of an ad campaign name

400 characters

Maximum number of archived ad campaigns per ad account

100k archived ad campaigns