Apps Script: Exception: Bandwidth quota exceeded
Last verified
Exception: Bandwidth quota exceededWhat it means
This exception is thrown by UrlFetchApp when Google stops a request because of a transfer limit. It is real and widely reported, but it does not map to any line on Google's published quotas page, which lists URL Fetch call counts per day and a 50 MB maximum response size per call, but no bandwidth figure.
Developer reports, including a Google Developer forum thread with many affected users, describe it as a rate or transfer protection that applies when a script downloads a lot of data or makes many requests in a short period, and that clears after waiting. Treat any specific number quoted for it as unconfirmed.
Your code is not necessarily wrong. Reducing how much and how fast you fetch is the reliable remedy.
What it looks like
Exception: Bandwidth quota exceeded
at UrlFetchApp.fetch
at pullReport(Code:18:28)Why it happens
- Downloading large responses repeatedly, such as full exports or files, in a short time.
- Many fetches in parallel with fetchAll or from concurrent executions.
- Custom functions or connectors that refetch on every recalculation or refresh.
- Several scripts under the same account transferring data at once.
How to fix it
- Log the size of each response (getContent().length) to see how much data each run transfers.
- Request less: add filters, fields or pagination parameters to the URL.
- Cache results with CacheService or in the sheet and reuse them instead of refetching.
- Spread requests over time with pauses and smaller fetchAll batches.
- Retry after a wait; reports indicate the condition clears on its own.
How to stop it recurring
Keep transfers small and infrequent: fetch only changed data, compress or filter at the source, and cache aggressively. Track bytes transferred per run in your logs so you notice growth before it trips the limit.
Official documentation: developers.google.com/apps-script/guides/services/quotas. See all Apps Script error messages or the Apps Script limits and quotas.
Related errors
- Service invoked too many times for one dayException: Service invoked too many times for one day: urlfetch.
- Exception: Address unavailableException: Address unavailable: https://example.com/api
- Exception: Request failed for ... returned code 4xx/5xxException: Request failed for https://api.example.com returned code 401.…
Definitions
- Google Apps ScriptGoogle Apps Script is Google's cloud-hosted JavaScript platform for automating Google Workspace: Sheets, Gmail
- Error HandlingError handling is the practice of anticipating, detecting, and responding to errors in software execution, inc
- Rate LimitingRate limiting is a technique that controls the number of requests a client can make to a server within a given
- OAuth 2.0OAuth 2.0 is the IETF authorization standard (RFC 6749) that lets an app access your account in another servic
Quick answers
What does "Exception: Bandwidth quota exceeded" mean in Apps Script?
This exception is thrown by UrlFetchApp when Google stops a request because of a transfer limit. It is real and widely reported, but it does not map to any line on Google's published quotas page, which lists URL Fetch call counts per day and a 50 MB maximum response size per call, but no bandwidth figure.
How do I fix "Exception: Bandwidth quota exceeded"?
1. Log the size of each response (getContent().length) to see how much data each run transfers. 2. Request less: add filters, fields or pagination parameters to the URL. 3. Cache results with CacheService or in the sheet and reuse them instead of refetching. 4. Spread requests over time with pauses and smaller fetchAll batches. 5. Retry after a wait; reports indicate the condition clears on its own.
Run the job somewhere with its own limits
If a script keeps hitting its host's quotas, an Autonoly workflow can run the same steps on a schedule in an isolated cloud container, and the AI agent has a terminal with Python for steps that need code. Autonoly has limits of its own, priced in credits.
Also see Agent terminal & SSH.