Well... using 
https://github.com/googleads/google-ads-python/blob/2a1d6062221f6aad1992a6bcca0e7e4a93d2db86/examples/campaign_management/add_complete_campaigns_using_batch_job.py
 
as a starting point, I can query like:

query = """
SELECT campaign.id, ad_group.id, ad_group_criterion.keyword.text, 
ad_group_criterion.criterion_id, ad_group_criterion.cpc_bid_micros 
FROM keyword_view 
WHERE campaign.id = 12345678
"""

search_request = client.get_type("SearchGoogleAdsStreamRequest")
search_request.customer_id = customer_id
search_request.query = query
stream = ga_service.search_stream(search_request)

for batch in stream:
     for row in batch.results:
         campaign = row.campaign
         ad_group = row.ad_group
         criterion = row.ad_group_criterion
         criterion.cpc_bid_micros = 20000


And get all of the current bids and update the stream cpc_bid_micros to, 
say 20000. What I'm missing is the way to take that set of criterion values 
and update them as a batch. I know how to do them one by one, but not as a 
batch. 
On Monday, February 14, 2022 at 8:55:11 PM UTC+13 adsapi wrote:

> Hi Laurie,
>
> Thanks for getting back to us.
>
> The ad_group_criterion.cpc_bid_micros value will change the Max CPC of the 
> specific keyword. If you want to change the max CPC of the entire ad group, 
> you can do this through the *AdGroupService* 
> <https://developers.google.com/google-ads/api/reference/rpc/v10/AdGroupService>
>  
> since that service handles changes to the ad group itself. You can also 
> make use of AdGroupCriterionService that makes changes for the *ad group 
> criteria* 
> <https://developers.google.com/google-ads/api/docs/targeting/criteria#ad_group_criteria>
>  
> and not for the ad group as a whole.
>
> Let us know if you have any further questions.
>
> Regards,
> [image: Google Logo] 
> Yasar 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2W6GCQ:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/410831bf-eb37-457f-a0b4-dd95942ef2d7n%40googlegroups.com.
  • Re... Laurie McIntosh
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... Laurie McIntosh

Reply via email to