Log in / Create free account🌐 ES☀️

Advanced training · Module 8 — GAQL and the API — reading what the interface does not show

Limits, quotas and traps: what to know before you build a process on GAQL

⏱️ 10 min read · 🥷 Scripts · updated on 2026-08-22

🎧 Listen to the lesson · ≈ 4 min🔒 Subscribers only

GAQL promises all the data; reality imposes limits: on time, on quota, on privacy, on freshness and on versions. A process that does not know them fails on a Tuesday at 3am with nobody watching. This lesson is the list of limits and the design that survives them.

Limit Value Consequence
Time per run 30 min (60 for some parallel manager-account runs) Long jobs get cut off: you have to split them into batches and resume
Frequency One scheduled run per hour per script There is no "every 10 minutes"
Calls to external services (UrlFetch) A daily quota per user: ~20,000 on Gmail, ~100,000 on Workspace Scripts that call an AI or a server burn quota; whoever runs them on Workspace has five times as much
Spreadsheets Cell limits and Sheets call limits Write in blocks, not cell by cell
Email A daily sending quota Grouped alerts, not one per event
Concurrent runs Limited per account Several scripts at the same hour tread on each other

API limits

Data that does not exist, or arrives late

API versions

The Google Ads API ships new versions several times a year and retires old ones after a while; fields and resources get renamed or disappear. Google Ads scripts use a version managed by Google (less maintenance), but fields still change. The design answer: queries with the minimum fields, and a compatibility check (preview) after every version notice.

Designing processes that survive

  1. Batches and resuming: split the work (by account, by campaign, by date range), store a cursor (where it got to) in the sheet or in the script's properties, and resume on the next run. Heavy work once a day per account; light work every hour.
  2. Frozen date windows: work out the range once at the start of the job and store it; if the job spans several runs, all of them use the same range (otherwise the batches will not reconcile).
  3. Incremental download with overlap: every day, the last N days (3-7) are downloaded again and replace what was stored: that is how late conversions get in.
  4. Retries with a wait on transient API errors; and if it fails, it does not touch anything on writes.
  5. Block writes to sheets; block reads of configuration.
  6. A consumption meter: count external calls per run and per account, and report them (so you do not hit the quota at the end of the month).
  7. Diagnostics: a tab with the trace of the last run and errors highlighted; without it, the 3am failure is invisible.
  8. Large accounts: sampling or pre-aggregation (GAQL lets you sort and limit: the 2,000 highest-spending search terms instead of 50,000).

Specific traps

💡 Ninja trick: several of these designs are standard in the Suite today precisely because they hit the limit first: the Agent has a daily gate (heavy work once a day per account, pending items first, light KPIs every hour) and a rotating cursor for resuming; the Shield's Smart Mode downloads RAW data incrementally with a frozen window; every script carries a UrlFetch meter per account and a Diagnostics tab with the trace. And the analyses that do not fit into 30 minutes (Site Analyzer across thousands of domains) moved to a server of our own.

What you should remember

📎 Sources and further reading

⚠️ Free training with no support. Ninja Scripts support channels (email and Telegram) are only for the use of the scripts, not for Google Ads questions or questions about this training.

Pick up here

← BeforeThe GAQL cookbook: ten queries that answer the questions from the whole courseGAQL and the API — reading what the interface does not showAfter →API versus scripts: where each automation should liveGAQL and the API — reading what the interface does not showRelacionadaAutomating with judgement: rules, scripts and AI — what to delegate, what to supervise and what never to automateScripts I — what they are, what they solve and how to install the SuiteRelacionadaLead quality: scoring every contact and teaching Google the difference between a customer and a browserMeasurement II — offline conversions, values, GA4, attribution and lead qualityRelacionadaAuditing your tracking: the routine that tells you your data is trustworthyBasic measurement — conversions, the Google tag and consentRelacionadaControlling monthly spend: pacing, variances, alerts and a month-end with no surprisesBudgets and planning — impression share, curves, allocation and spend control

Ver el temario completo

🎓
You're reading, in the open, a lesson from the subscribers' training

This page is read-only. With the Suite subscription you get the full academy — all three levels with audio, quizzes, favorites, highlights and certificates — plus the scripts working in your Google Ads account.

See the full Suite → Create my free account →
🥷

Subscriber feature

This option is part of the Ninja Scripts Suite subscription.

See the subscription →