Google Ads Script Limits That Change How You Build
Advertiser account scripts are cancelled at 30 minutes, manager scripts at 60 when using executeInParallel with a callback. Iterators return at most 50,000 results, withIds accepts 10,000, logs truncate at 100 KB, and reports are exempt from entity limits.
Every limit below is documented by Google and every one of them changes the design of a script rather than merely inconveniencing it. Google states plainly that these can change without warning, which is itself a design instruction: assume the ceiling and handle the failure.
Execution time
A script running on an advertiser account is cancelled at 30 minutes. A manager-level script is also cancelled at 30 minutes, unless it uses executeInParallel with a callback method, in which case the ceiling is 60 minutes.
The part that catches people out: changes made before the cancellation are kept. A script that pauses campaigns and times out halfway through leaves the account in a half-applied state, with no error visible in the interface beyond a failed run. If a script writes, it should either be idempotent or record its own progress.
Execution speed is not consistent between runs, because it depends on load on Google’s infrastructure. A script that finishes in twenty minutes today can time out next week without a line changing. Design for roughly half the ceiling, not ninety per cent of it.
Entity limits
| Limit | Value | What it means |
|---|---|---|
| Results per iterator | 50,000 | Default cap. withLimit() changes it downward; you cannot iterate past the cap upward. |
IDs in withIds() |
10,000 | Passing more throws a runtime error, as does an Id IN [LIST] condition over the same size. |
| Console log output | 100 KB | Beyond this the log is truncated and a warning is written. Long logs lose their tail, which is usually the part you needed. |
Reports are not subject to entity limits. That is the single strongest argument for reading through GAQL rather than selectors in any account large enough for the question to arise.
Manager account limits
Each account processed by a manager script gets its own quota of the limits above. With executeInParallel, a script can process up to 50 accounts per call, and the processAccount function can return up to 10 MB of data back to the callback.
Ten megabytes sounds generous until you return raw rows. Return aggregates from each account, not records — the callback is for assembling a summary, not for shipping a data set.
Other ceilings worth knowing
- 250 authorised scripts per account using OAuth2.
- Bulk uploads are limited to 50 MB and one million rows, and are rejected on submission if either is exceeded.
- Apps Script quotas apply underneath.
UrlFetchAppandMailAppdraw on daily quotas that belong to the wider Apps Script platform, not to Google Ads. A script that fetches thousands of URLs will meet that ceiling before it meets any Ads limit.
Designing around the wall
Split the work across runs. Keep a list of the accounts, campaigns or URLs to process in a spreadsheet with a completion column. Each run takes the next batch that fits comfortably inside the window and marks it done. Schedule it hourly and let it work through the list.
Read in bulk, write in small batches. One query that returns everything is faster than ten thousand object lookups. Writes are the slow half, so cap how many a single run is allowed to make.
Fail loudly. A timed-out script produces no email. If your only signal that a script worked is receiving its report, silence looks identical to success. Send a short completion line even when there is nothing to report, or check the run history.
Error handling patterns covers what that looks like in code.
Questions
- How long can a Google Ads script run?
- Thirty minutes for an advertiser account script. A manager script that uses executeInParallel and specifies a callback method can run up to sixty minutes.
- What happens to changes when a script times out?
- They are kept. Every change applied before cancellation stays in the account, which can leave a writing script half applied.
- How many results does an iterator return?
- A single iterator returns at most 50,000 results by default. Reports run through GAQL are not subject to entity limits.
- How many accounts can executeInParallel process?
- Up to 50 accounts per call, and each processAccount function can return up to 10 MB of data to the callback.