Campaign Budget Optimization

Campaign budget optimization is a way of optimizing the distribution of a campaign budget across your campaign's ad sets. This means Facebook automatically and continuously finds the best available opportunities for results across your ad sets and distributes your campaign budget in real time to get those results.

For more information, see:

You can enable and disable campaign budget optimization for a campaign. If you disable it, you should provide budgets for all ad sets under the campaign.

Campaign-Level Fields

FieldDescription

daily_budget

The daily budget of the campaign.

lifetime_budget

The lifetime budget of the campaign.

pacing_type

Pacing type shared across the ad sets in this campaign. This field must be specified in the campaign level when using campaign budget optimization. Available options:

  • standard
  • no_pacing, also known as accelerated delivery
  • day_parting, also called ad scheduling

budget_rebalance_flag

Do not use for campaign budget optimization. See Ad Set Budget Rebalancing below.

adset_budgets

The ad set budget to use for each ad set in the campaign. Use this to disable campaign budget optimization and to use ad set budgets.

bid_strategy

Bid strategy of the campaign. Available options:

  • LOWEST_COST_WITHOUT_CAP
  • COST_CAP
  • LOWEST_COST_WITH_BID_CAP
  • TARGET_COST
  • LOWEST_COST_WITH_MIN_ROAS

For LOWEST_COST_WITHOUT_CAP, if you choose Value as an optimization_goal, in Ads Manager, we display Highest Value as your bid strategy.

adset_bid_amounts

The bid amounts to use for ad sets in this campaign when the campaign bid strategy is set to LOWEST_COST_WITH_BID_CAP, COST_CAP or TARGET_COST. You should set this field along with bid_strategy.

See examples below to learn more about using these fields. For information on deprecated and new campaign-level optimization fields, see Ads Developer Blog, Introducing Marketing API, v3.0.

Ad Set-Level Controls

FieldDescription

daily_min_spend_target

Daily minimum spending target for the ad set, in your account's currency. You must specify a daily budget at the ad campaign level. This target does not guarantee you spend this amount, but Facebook makes a best effort to achieve it. To remove daily_min_spend_target from an ad set, set it to 0 or an empty value. For example daily_min_spend_target=0 or daily_min_spend_target=.

daily_spend_cap

Daily spend cap of the ad set defined in your account currency.


You must specify the daily budget in the campaign.

lifetime_min_spend_target

Lifetime minimum spend target for an ad set defined in your account currency. You must specify the lifetime budget at the ad campaign level. This target is not a guarantee you achieve the target, but Facebook makes a best effort to reach it. To remove lifetime_min_spend_target from an ad set, set it to 0 or an empty value. For example lifetime_min_spend_target=0 or lifetime_min_spend_target=.

lifetime_spend_cap

Lifetime spend cap of the ad set defined in your account currency. You must specify the lifetime budget in the campaign.

bid_amount

Bid amount for this ad set. Only available when the Campaign level is_autobid is false.

bid_constraints

Similar to an ad set budget, minimum Return on Ads Spend bidding, or Min ROAS, uses this to provide the ROAS floor, but you cannot use bid_amount with bid_constraints. See Examples to use Min ROAS with campaign budget optimization.

Examples

For example, create a campaign with campaign budget optimization with LOWEST_COST_WITHOUT_CAP as bid_strategy. The campaign has a 1000 USD daily budget with auto bid:

curl 
  -F "name"="L3 With Daily Budget"
  -F "objective"="LINK_CLICKS"
  -F "daily_budget=100000"
  -F "bid_strategy"="LOWEST_COST_WITHOUT_CAP"*
  -F "access_token"="ACCESS_TOKEN" 
  https://graph.facebook.com/VERSION/act_AD_ACCOUNT_ID/campaigns

Create a campaign with campaign budget optimization and LOWEST_COST_WITH_BID_CAP as bid_strategy. The campaign has a 1000 USD lifetime budget:

curl 
  -F "name"="L3 With Lifetime Budget"
  -F "objective"="LINK_CLICKS"
  -F "lifetime_budget=100000"
  -F "bid_strategy"="LOWEST_COST_WITH_BID_CAP"*
  -F "access_token"="ACCESS_TOKEN" 
  https://graph.facebook.com/VERSION/act_AD_ACCOUNT_ID/campaigns

Create an ad set with the maximum bid capped:

curl \
  -F "campaign_id"="CAMPAIGN_ID"
  -F "name"="Test Adset No Budget"
  -F "status"="ACTIVE"
  -F "optimization_goal"="LINK_CLICKS"
  -F "targeting={'geo_locations':{'countries':['US']},'publisher_platforms': ['facebook','audience_network'],'facebook_positions':['feed'],'device_platforms':['mobile','desktop']}"
  -F "billing_event"="IMPRESSIONS"
  -F "access_token"="ACCESS_TOKEN"
  -F "bid_amount"=100
 https://graph.facebook.com/VERSION/act_AD_ACCOUNT_ID/adsets

Create a campaign with campaign budget optimization and LOWEST_COST_WITH_MIN_ROAS as bid_strategy. For example, the campaign has 1000 USD lifetime budget with Min ROAS set:

curl 
  -F "name"="L3 With Lifetime Budget"
  -F "objective"="LINK_CLICKS"
  -F "lifetime_budget=100000"
  -F "bid_strategy=LOWEST_COST_WITH_MIN_ROAS"
  -F "access_token"="ACCESS_TOKEN" 
 https://graph.facebook.com/VERSION/act_AD_ACCOUNT_ID/campaigns

Then create an ad set with Return on Ads Spend minimums set:

curl \
  -F 'name=minRoasBiddingDemo' \
  -F 'optimization_goal=VALUE' \
  -F 'promoted_object={"pixel_id": "<PIXEL_ID>", "custom_event_type": "PURCHASE"}' \
  -F 'targeting={"geo_locations":{"countries":["US"]}}' \
  -F 'campaign_id=<CAMPAIGN_ID>' \
  -F 'status=PAUSED' \
  -F 'start_time=2018-12-10T12:45:26-0700' \
  -F 'bid_constraints={"roas_average_floor": 10000}' \
  -F 'billing_event=IMPRESSIONS' \
  -F 'access_token=ACCESS_TOKEN' \
  https://graph.facebook.com/VERSION/act_AD_ACCOUNT_ID/adsets

Update budget optimization or bid strategy choices

You can disable budget optimization from an ad campaign and add budget to ad sets. For example, the following code sample:

  • Removes campaign budget
  • Sets budget of AD_SET_ID1 to 5000
  • Sets budget of AD_SET_ID1 to 7000
curl 
 -F "adset_budgets"="[{adset_id: AD_SET_ID1, daily_budget: 5000}, {adset_id: AD_SET_ID2, daily_budget: 7000}]" 
 -F "access_token"="ACCESS_TOKEN" 
https://graph.facebook.com/AD_VERSION/act_AD_ACCOUNT_ID/CAMPAIGN_ID

Or you can change your bid_strategy between LOWEST_COST, COST_CAP, LOWEST_COST_WITH_BID_CAP and TARGET_COST. For example, the following code sample sets:

  • Bid strategy to LOWEST_COST_WITH_BID_CAP
  • The bid of AD_SET_ID1 to 1500
  • The bid of AD_SET_ID1 to 2000
curl 
 -F "adset_bid_amounts"={"AD_SET_ID1": 1500, "AD_SET_ID2": 2000}
 -F "bid_strategy"="LOWEST_COST_WITH_BID_CAP"
 -F "access_token"="ACCESS_TOKEN" 
https://graph.facebook.com/VERSION/act_AD_ACCOUNT_ID/CAMPAIGN_ID

Limitations and Best Practices

Bid strategy

Define a bid strategy at the campaign level. All ad sets share the same bid strategy defined at the ad campaign level. You can still define different bid amounts or Return on Ads Spending minimums at the ad set level for non-auto bid campaigns. This is the same approach you can use for ad set budget. For LOWEST_COST_WITH_MIN_ROAS, you cannot currently switch to other bid strategies after you create your campaign. See Bid Strategies.

Pacing

Define the pacing_type in the campaign level, not in the ad set level. See Pacing and Scheduling.

Optimization goals

All optimization goals must be the same across ad sets under auto bid. Once you run ads in a campaign, you can not edit optimization goals. See Optimization Goals.