This page outlines various limits and limitations in AdWords scripts that you should be aware of. These limits can change at any time without warning, so ensure that your scripts are flexible and contain error handling.
Execution time limits
AdWords scripts
AdWords scripts for advertiser accounts can execute for a maximum of 30 minutes, after which they will be cancelled. All of the changes made before the script was cancelled will be applied.
MCC scripts
MCC scripts can normally execute for a maximum of 30 minutes after which
they will be cancelled. However, if an MCC script uses the
executeInParallel
method to process accounts in parallel, and specify a callback method, then it can
execute up to a maximum of 60 minutes before being cancelled. This is
illustrated in the figure below, where processAccount
is the parallel function,
and allFinished
is the callback method when calling executeInParallel.
All of the changes made before the script was cancelled will be applied.
Entity limits
Scripts of AdWords accounts
- A single iterator will return at most 50,000 entities (keywords, ads,
ad groups, or campaigns).
iterator.hasNext()
will returnfalse
after that, and a warning will be logged. - A single selector can handle at most 10,000 IDs in
selector.withIds()
. If 10,000 or more IDs are specified,selector.get()
will throw a runtime error. Similarly, specifying anId IN [LIST]
condition with a list of IDs > 10,000 will result in a runtime error. - A single script can process at most 250,000 entities of all types.
iterator.hasNext()
will returnfalse
afterwards for any iterator, and a warning will be logged. - A single script can create 250,000 keywords and ads at the most. Successive attempts to create entities will fail, and a warning will be logged.
- Logging output will be truncated at 100Kb. A warning will be logged if that happens.
Scripts of manager accounts
- Each account processed by an MCC script gets its own quota as listed above.
- When using
executeInParallel
method, a script can process up to 50 accounts. - The
processAccount
method fromexecuteInParallel
can return up to 10MB of data.
Bulk upload limits
- The upload file is limited to 50MB and one million rows, and will be rejected upon submission if it exceeds these limits.
- An upload job times out after two hours and the job will stop processing any remaining data from the uploaded file.
Quotas for Google services
The underlying Google Apps Script services impose daily quotas and hard limits on some features. For a list of these quotas, refer to this page.
Authorized scripts
OAuth2 is used to authorize scripts. Each account has a limit of 250 authorized scripts. Beyond that limit, one of the previously authorized scripts will be deauthorized. This is only temporary, and the script can be reauthorized the next time it is opened.
AdWords Express and AdWords for video accounts
These types of campaigns cannot be used with AdWords scripts. A CampaignSelector
(such as in AdWordsApp.campaigns().get()
) will automatically filter these
campaigns from the results. AdWords scripts can be used in accounts managed by
AdWords Express, but any campaigns created will be regular non-express campaigns.
Video stats are included in account stats, which can be gathered by either account.getStatsFor or via the account performance report.