query = """
SELECT
ad_group_criterion.cpc_bid_micros,
ad_group_criterion.keyword.text,
ad_group_criterion.keyword.match_type,
ad_group_criterion_label.label,
FROM keyword_view
WHERE ad_group_criterion.type = KEYWORD
"""
It returns 1,000,000+ keywords data. Does that mean it will be counted as 1 operation or 1,000,000+?
2. As it's mentioned in the above link that daily limit for operation is 10,000. If I try to execute code which performs more than 10,000 operations(mutate),
A . will it show an error stating - you can not perform more than 10000 operations and code will not be executed OR
B. code will get executed and I will be charged for operations above 10,000
3. For following code
I am trying to change Max CPC of three keywords, will it be counted as 3 operations and I will be charged for three operations OR it will be treated as 1 operation
def bid_change(client, customer_id, ad_group_id, criterion_id,bid):
agc_service = client.get_service("AdGroupCriterionService", version="v5")
ad_group_criterion_operation = client.get_type(
"AdGroupCriterionOperation", version="v5"
)
ad_group_criterion = ad_group_criterion_operation.update
ad_group_criterion.resource_name = agc_service.ad_group_criteria_path(
customer_id, ResourceName.format_composite(ad_group_id, criterion_id)
)
#customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}
ad_group_criterion.cpc_bid_micros= bid
fm = protobuf_helpers.field_mask(None, ad_group_criterion)
ad_group_criterion_operation.update_mask.CopyFrom(fm)
try:
agc_response = agc_service.mutate_ad_group_criteria(
customer_id, [ad_group_criterion_operation]
)
except google.ads.google_ads.errors.GoogleAdsException as ex:
print(
'Request with ID "%s" failed with status "%s" and includes the '
"following errors:" % (ex.request_id, ex.error.code().name)
)
for error in ex.failure.errors:
print('\tError with message "%s".' % error.message)
if error.location:
for field_path_element in error.location.field_path_elements:
print("\t\tOn field: %s" % field_path_element.field_name)
sys.exit(1)
print("Updated keyword %s." % agc_response.results[0].resource_name)