Programatically knowing if an account has reached account limits

137 views
Skip to first unread message

wes...@channable.com

unread,
Nov 16, 2022, 2:17:58 AM11/16/22
to Google Ads API and AdWords API Forum
We create lots of adgroup criteria via the Google Ads API. A lot of these criteria are keywords. We've noticed recently that we get a lot of `RESOURCE_LIMIT` errors back from Google when the account we are pushing to has reached the Account limit for their adgroup criteria. Having a look through the API documentation, I cannot find a way to find out if an account has reached its account limits. If we could do this, this would save us from sending millions of operations per day to Google.

The only idea I've had so far would be to query all the keywords in the account and then count them, but this is not robust or reliable for the entire adgroup criteria limit since there are other adgroup criteria, and this also takes quite a long time to do for accounts that have lots of keywords/criteria.

Do you know of a way this can be accomplished?

Google Ads API and AdWords API Forum

unread,
Nov 16, 2022, 4:10:14 AM11/16/22
to Google Ads API and AdWords API Forum
Re-posting the last inquiry  [https://groups.google.com/g/adwords-api/c/BxX6wXcoHjw] from the forum as it wasn't routed to our support queue.

Regards,
Carmela
Google Ads API Team

Google Ads API and AdWords API Forum

unread,
Nov 17, 2022, 4:16:29 AM11/17/22
to Google Ads API and AdWords API Forum
Hi Wesley,

This is Carmela from the Google Ads API team. Thank you for reaching out to us.

With regards to your concern, you mentioned that you are seeing 'RESOURCE_LIMIT' errors. The said error means that the request is attempting to create a resource that would cause the total number of those resources to exceed a specified limit. There are multiple limits on the number of resources that can exist in certain contexts. To handle this kind of error Identify the limit that's being encountered by reviewing the System Limits guide. Either reuse an existing resource, or remove resources to create space for new ones. In order to avoid the said error, please review the API's System Limits and use search queries to monitor the number of resources that have limitations.

Regards,
Carmela
Google Ads API Team
On Wednesday, November 16, 2022 at 3:17:58 PM UTC+8 wes...@channable.com wrote:

wes...@channable.com

unread,
Dec 14, 2022, 2:44:01 AM12/14/22
to Google Ads API and AdWords API Forum
> In order to avoid the said error, please review the API's System Limits and use search queries to monitor the number of resources that have limitations.

This was my original question actually. I was wondering if there was a way to just query if a system limit has been reached. In my case, we know that we are hitting the System Limits for Adgroup Criteria, but there are a lot of different types of Adgroup Criteria. On top of that, for these clients, just querying all of their positive keywords alone can take many minutes, and that would only give us part of the picture. So I was wondering if there was a better way to immediately know if a System Limit was already being reached, so in this case, is there a query I could do so that Google would return that there are too many Adgroup Criteria or give me the number of available Adgroup Criteria left before we reach the limit for this client.

Google Ads API Forum Advisor

unread,
Dec 14, 2022, 5:13:20 AM12/14/22
to adwor...@googlegroups.com, wes...@channable.com

Hi wesley,

​This is Marjorie from the Google Ads API team as well. Thank you for getting back to us.

I understand your concern if possible to monitor the “System Limits'' for Adgroup Criteria and positive keywords. Unfortunately, there is no way other than reporting. You need to check first using our reports then send the mutate request where there is a large amount of mutate operation. Please the reference below:
 

SELECT ad_group_criterion.keyword.text FROM ad_group_criterion WHERE ad_group_criterion.type IN ('KEYWORD')


For additional information, field return_total_results_count should give a total number of results that match the query ignoring the LIMIT clause will be included in the response. Default is false.

I hope it helps. Have a great day.

Regards,

Google Logo
Marjorie
Google Ads API Team
 


ref:_00D1U1174p._5004Q2h2q1w:ref
Reply all
Reply to author
Forward
0 new messages