RateExceededError while adding blocked IP addresses

54 views
Skip to first unread message

PS

unread,
Dec 8, 2016, 5:37:13 PM12/8/16
to AdWords API Forum
Hi Guys,

I'm trying to add 400 IP addresses to the IP Exclusion list to all of our campaigns. However, after updating only 10-12 campaigns, I get the following error:

[RateExceededError <rateName=OperationsPerDay, rateKey=billing_developer_request, rateScope=ACCOUNT, retryAfterSeconds=86400>]

As per this document, one mutate operation should count as 2 API requests. However, it looks like each ADD operation within one mutate request is counting as an API request.

Please let me know if I'm missing something.

Here is my code.

Thanks
Prashant



for (Campaign campaign : campaigns) {
 
for(String blockedIPAddress : blockedIPAddresses){
 
CampaignCriterionOperation operation = new CampaignCriterionOperation();
 
NegativeCampaignCriterion negativeCampaignCriterion = new NegativeCampaignCriterion();
 negativeCampaignCriterion
.setCampaignId(campaign.getId());
 
IpBlock ipBlock = new IpBlock();
 ipBlock
.setIpAddress(blockedIPAddress);
 negativeCampaignCriterion
.setCriterion(ipBlock);
 operation
.setOperand(negativeCampaignCriterion);
 operation
.setOperator(Operator.ADD);
 operations
.add(operation);
 
 
if(operations.size() > 399){
 
break;
 
}
 
}
 
 campaignCriterionService
.mutate(operations.toArray(new CampaignCriterionOperation[operations.size()]));

 
Thread.sleep(10000);
 
}

Anthony Madrigal

unread,
Dec 8, 2016, 6:44:44 PM12/8/16
to AdWords API Forum
Hi Prashant,

Since the scope of your error is ACCOUNT, it does not have to do with the number of operations you are doing, instead it deals with the rate of how many operations you are doing per second. Here is a description of what the error means and how to prevent it. Please let me know if you have any further questions.

Regards,
Anthony
AdWords API Team

PS

unread,
Dec 8, 2016, 7:07:17 PM12/8/16
to AdWords API Forum
Thanks for the quick response.

This means we can't update all of our campaigns in a reasonable amount of time without applying for standard access?

Anthony Madrigal

unread,
Dec 8, 2016, 7:28:08 PM12/8/16
to AdWords API Forum
Hi,

The rate exceeded error with scope of ACCOUNT can still occur even with Standard access. You will need to run less operations at the same time. Please see our list of Best Practices for some suggestions on how to optimize your code.
Reply all
Reply to author
Forward
0 new messages