Skip to content
Google Sheets IMPORT functions · error message

Google Sheets: Resource at url contents exceeded maximum size

Permanent - do not retrySize limits

Last verified

The exact message
Resource at url contents exceeded maximum size.

What it means

IMPORTDATA, IMPORTHTML and IMPORTXML return this error when the response body is larger than Google is willing to download for a single import formula. The page or file was found and the server responded; Sheets stopped because of size, before parsing.

Google does not publish a byte limit for these four functions on their help pages, so treat any exact figure you see quoted online as a community estimate. What is consistent in user reports is that it shows up on very large CSV exports and on heavy HTML pages that are several megabytes before any filtering.

Your XPath or table index does not reduce the download: the whole response is fetched first and filtered afterwards, so a narrow query against a huge page still fails.

What it looks like

=IMPORTDATA("https://data.example.org/all_records.csv")

#N/A
Resource at url contents exceeded maximum size.

Why it happens

  • A CSV or TSV export with tens of thousands of rows or many wide columns.
  • An HTML page that inlines large scripts, styles, images as data URIs, or embedded JSON state.
  • An API endpoint that returns the full dataset because no filter or page parameter was set.
  • A URL that serves a binary file or archive instead of the expected text format.

How to fix it

  1. Check the size of the response by downloading the URL once in your browser and looking at the file size.
  2. Add filter, date-range or pagination parameters to the source URL so each request returns less data.
  3. Split one large import into several smaller ones, each hitting a narrower URL, and stack the results with VSTACK or {range1; range2}.
  4. For HTML, look for a lighter endpoint: a print view, mobile view, RSS feed, or the JSON or CSV endpoint the page itself loads.
  5. If the full dataset is genuinely large, load it with a script or a scheduled job into the sheet as static values rather than through a live formula.

How to stop it recurring

Design imports around small, filtered requests. Ask the source for exactly the rows and columns you need, keep historical data as pasted values instead of re-downloading it every hour, and avoid pointing import formulas at full database dumps. Remember that Sheets also has a per-spreadsheet cell limit, so even a successful very large import can make the file slow.

Official documentation: support.google.com/docs/answer/12188454. See all Google Sheets error messages or the Google Sheets limits and quotas.

Related errors

Definitions

Quick answers

What does "Resource at url contents exceeded maximum size" mean in Google Sheets?

IMPORTDATA, IMPORTHTML and IMPORTXML return this error when the response body is larger than Google is willing to download for a single import formula. The page or file was found and the server responded; Sheets stopped because of size, before parsing. Google does not publish a byte limit for these four functions on their help pages, so treat any exact figure you see quoted online as a community estimate.

How do I fix "Resource at url contents exceeded maximum size"?

1. Check the size of the response by downloading the URL once in your browser and looking at the file size. 2. Add filter, date-range or pagination parameters to the source URL so each request returns less data. 3. Split one large import into several smaller ones, each hitting a narrower URL, and stack the results with VSTACK or {range1; range2}. 4. For HTML, look for a lighter endpoint: a print view, mobile view, RSS feed, or the JSON or CSV endpoint the page itself loads. 5. If the full dataset is genuinely large, load it with a script or a scheduled job into the sheet as static values…

When an IMPORT formula cannot read the page

IMPORTXML and IMPORTHTML only see the HTML the server sends. An Autonoly extraction step reads the page in a real browser and writes rows to Google Sheets. Sites that block automated visitors can still block it.

Also see Google Sheets integration.