Skip to content
Google Apps Script · error message

Apps Script: Exception: Bandwidth quota exceeded

RetryableUrlFetchApp and external requests

Last verified

The exact message
Exception: Bandwidth quota exceeded

What 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

  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.

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

Definitions

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.