Stay organized with collectionsSave and categorize content based on your preferences.
Bids can be set at different levels of the campaign hierarchy: campaign, ad
group, or ad group criterion. A bid set at a lower level overrides those set
at higher levels. For example, a bid set on an individual ad group within a
campaign would override the campaign-level bid strategy's bid.
Update bids
Multiple bids of different types can be set simultaneously; for example,cpc_bid_microsandcpm_bid_microscan both be
set, but only the bid that's relevant for the selected bidding strategy type
is used.
When updating bids, you can just include the bids you want to update. Google Ads
will then update those bids, but won't change, add, or remove the other bids.
The following code example updates the CPC bid of an existing ad group.
defmain(client:GoogleAdsClient,customer_id:str,ad_group_id:str,cpc_bid_micro_amount:int,)->None:ad_group_service:AdGroupServiceClient=client.get_service("AdGroupService")# Create ad group operation.ad_group_operation:AdGroupOperation=client.get_type("AdGroupOperation")ad_group:AdGroup=ad_group_operation.updatead_group.resource_name=ad_group_service.ad_group_path(customer_id,ad_group_id)ad_group.status=client.enums.AdGroupStatusEnum.PAUSEDad_group.cpc_bid_micros=cpc_bid_micro_amountclient.copy_from(ad_group_operation.update_mask,protobuf_helpers.field_mask(None,ad_group._pb),)operations:List[AdGroupAdOperation]=[ad_group_operation]# Update the ad group.ad_group_response:MutateAdGroupsResponse=(ad_group_service.mutate_ad_groups(customer_id=customer_id,operations=operations,))print(f"Updated ad group{ad_group_response.results[0].resource_name}.")
defupdate_ad_group(customer_id,ad_group_id,bid_micro_amount)# GoogleAdsClient will read a config file from# ENV['HOME']/google_ads_config.rb when called without parametersclient=Google::Ads::GoogleAds::GoogleAdsClient.newresource_name=client.path.ad_group(customer_id,ad_group_id)operation=client.operation.update_resource.ad_group(resource_name)do|ag|ag.status=:PAUSEDag.cpc_bid_micros=bid_micro_amountendresponse=client.service.ad_group.mutate_ad_groups(customer_id:customer_id,operations:[operation],)puts"Ad group with resource name = '#{response.results.first.resource_name}' was updated."end
subupdate_ad_group{my($api_client,$customer_id,$ad_group_id,$cpc_bid_micro_amount)=@_;# Create an ad group with the proper resource name and any other changes.my$ad_group=Google::Ads::GoogleAds::V21::Resources::AdGroup->new({resourceName=>Google::Ads::GoogleAds::V21::Utils::ResourceNames::ad_group($customer_id,$ad_group_id),status=>PAUSED,cpcBidMicros=>$cpc_bid_micro_amount});# Create an ad group operation for update, using the FieldMasks utility to# derive the update mask.my$ad_group_operation=Google::Ads::GoogleAds::V21::Services::AdGroupService::AdGroupOperation->new({update=>$ad_group,updateMask=>all_set_fields_of($ad_group)});# Update the ad group.my$ad_groups_response=$api_client->AdGroupService()->mutate({customerId=>$customer_id,operations=>[$ad_group_operation]});printf"Updated ad group with resource name: '%s'.\n",$ad_groups_response->{results}[0]{resourceName};return1;}
For ads running on the Display Network, there are a number of different
dimensions for which an ad group bid can be set. If multiple bids are set in
different dimensions, thedisplay_custom_bid_dimensionfield can be used to specify thedimensionthat should
be used for absolute bids. Ads on the Search Network always use keyword bids.
You can also set abid adjustmentto be
used when the criterion is not in an absolute bidding dimension. It can be
accessed using thebid_modifierfield of the ad group criterion.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[[["\u003cp\u003eBids can be set at the campaign, ad group, or ad group criterion level, with lower-level bids overriding higher-level bids.\u003c/p\u003e\n"],["\u003cp\u003eMultiple bid types can be set simultaneously, but only the relevant bid for the selected bidding strategy is used.\u003c/p\u003e\n"],["\u003cp\u003eWhen updating bids, include only the desired changes, as Google Ads will retain existing bids not specified in the update.\u003c/p\u003e\n"],["\u003cp\u003eTo remove a specific bid, update its corresponding field to \u003ccode\u003enull\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eFor Display Network ads, bids can be set for various dimensions, and the \u003ccode\u003edisplay_custom_bid_dimension\u003c/code\u003e field specifies the dimension for absolute bids.\u003c/p\u003e\n"]]],[],null,[]]