Skip to content
Home

/

Glossary

/

Integration

/

Google Sheets API

Integration

5 min read

Also: Sheets API, Sheets API v4, Google Sheets REST API, spreadsheets.values, Google Sheets API Python

Google Sheets API

Quick answer

The Google Sheets API is Google's REST API (v4) for reading and writing spreadsheets from your own code, limited to 300 requests per minute per project and 60 per user, separately for reads and writes. With a service account, share the sheet with its client_email before calling values.append; if you get 429s, see Google Sheets limits.

The Google Sheets API is Google's REST API for reading and writing Google Sheets from your own code. Version 4 exposes cell values, formatting, charts and sheet structure, and is limited by per-minute quotas of 300 requests per project and 60 per user, separately for reads and writes.

Last verified

What people do with Google Sheets API

Key facts

Made byGoogle
Current versionv4 (REST, JSON); v3 was turned down in 2021
Read and write quotas300 requests/minute per project and 60 requests/minute per user per project, each for reads and for writes
Over quotaHTTP 429 Too Many Requests; quotas refill every minute and Google recommends exponential backoff
Per-request limitsTimeout after 180 seconds of processing; 2 MB maximum payload recommended
AuthOAuth 2.0 user credentials, service accounts, or API keys for public read-only data

What is the Google Sheets API?

The Google Sheets API is a REST API made by Google that lets any program read, write and format Google Sheets over HTTPS. Where Google Apps Script runs inside Google's servers, the Sheets API is what you call from your own server, a Python script, a mobile app or an automation platform. Nearly every "connect to Google Sheets" feature in third-party tools, Autonoly's included, is built on it.

The current version is v4. Google turned down the older v3 API (the XML "feeds" API) in 2021 after several postponed deadlines, so any tutorial that uses spreadsheets.google.com/feeds URLs is obsolete.

How it works

The API is organized around two resources:

  • `spreadsheets.values` for cell data. values.get and values.batchGet read ranges written in A1 notation such as Sheet1!A1:D100; values.update, values.append and values.batchUpdate write them. A valueInputOption of RAW stores input as-is, while USER_ENTERED parses it as if typed into the UI, so =SUM(A1:A3) becomes a formula and 2026-11-12 becomes a date.
  • `spreadsheets` for structure. spreadsheets.get returns metadata such as sheet names and IDs, and spreadsheets.batchUpdate applies requests that add sheets, format cells, set data validation, create charts or sort ranges.
  • Every spreadsheet is identified by the long ID in its URL, between /d/ and /edit.

    Authentication depends on the data. Public, read-only sheets can be read with an API key. Private sheets need OAuth 2.0, either on behalf of a signed-in user (see OAuth 2.0) or with a service account, which is a robot identity with its own email address. A service account can only open sheets that have been shared with that email address, which is the single most common reason for a 403 error.

    Quotas and limits

    Google's usage limits page sets the quotas per minute, not per day:

  • Read requests: 300 per minute per project, 60 per minute per user per project.
  • Write requests: the same, 300 and 60.
  • Over the limit: an HTTP 429 Too Many Requests response. Quotas refill every minute, and Google recommends retrying with exponential backoff.
  • Batching: a batch request counts as one request, however many subrequests it contains, which is the most effective way to stay under quota.
  • No daily cap as long as you respect the per-minute quotas.
  • Per-request: processing longer than 180 seconds times out, and Google recommends keeping payloads to about 2 MB.
  • Service-account calls count as a single user, so a busy integration that funnels everything through one service account hits the 60-per-minute user quota first. Higher quotas can be requested in the Google Cloud console, but approval is not guaranteed. Standard use has no additional cost; Google's limits page says charges for exceeding quota are planned, so check it before relying on quota increases. The spreadsheet itself is still bound by Google Sheets' own size limits, including 10 million cells per spreadsheet.

    Common problems

  • 429 / RESOURCE_EXHAUSTED. Too many requests in a minute, usually from writing one row per call. Batch rows into a single append or batchUpdate and add backoff; see rate limiting and retry logic.
  • 403 The caller does not have permission. The sheet is not shared with the service account, or the OAuth token lacks the spreadsheets scope.
  • Unable to parse range. The A1 range is malformed, or a sheet name containing spaces is not wrapped in single quotes ('Q4 Sales'!A1).
  • Dates and numbers stored as text. Written with RAW; use USER_ENTERED.
  • Appends land in the wrong place. values.append looks for the last row of the table it detects in the range, so blank rows or stray cells can shift where data goes.
  • The Sheets API and automation

    The Sheets API is the plumbing behind most "save to Google Sheets" steps. When you build your own integration you handle OAuth, token refresh, batching, retries and quotas. A platform with a native integration does that for you, at the cost of exposing fewer of the API's options.

    Autonoly's native Google Sheets integration uses your Google account through OAuth, with tokens encrypted at rest, and gives workflows and the AI agent steps to read rows and write results. That is how data extracted in a real browser, for example from pages IMPORTXML cannot read, ends up in a sheet. For anything the built-in steps do not cover, the HTTP Request step can call the Sheets API directly with OAuth 2.0. More patterns are in the Google Sheets automation guide.

    Why It Matters

    Almost every tool that reads or writes Google Sheets uses this API, so its per-minute quotas, batching rules and sharing model explain most failures of sheet-based automations, from 429 errors to service accounts that cannot see a sheet.

    How Autonoly Solves It

    Autonoly's native Google Sheets integration connects through OAuth, stores tokens encrypted, and lets workflows and the agent read and write rows without handling the API directly. Data extracted from websites in a real browser can be written straight to a sheet, and the HTTP Request step can call the Sheets API with OAuth 2.0 for anything the built-in steps do not cover.

    Learn more

    Examples

    • A Python job that collects 2,000 rows and writes them with one values.append call instead of 2,000, staying far under the 60-writes-per-minute user quota

    • A service account that reads a shared configuration sheet each hour to decide which products a scraper should track

    • Writing a date column with valueInputOption USER_ENTERED so Sheets stores real dates that sort and filter correctly

    Frequently Asked Questions

    Google's usage limits page lists 300 read requests per minute per project and 60 per minute per user per project, with the same figures for writes. Exceeding them returns HTTP 429. Quotas refill every minute and there is no daily cap if you stay within them.

    Batch your work: write many rows in one values.append or batchUpdate call, since a batch counts as one request. Add exponential backoff on 429 responses. If one service account does everything, remember it counts as a single user with a 60-per-minute quota.

    Standard use is available at no additional cost within the quotas. Google's limits page notes that charges for exceeding quota limits are planned for a Google Cloud billing account, so check the current page before requesting higher quotas.

    A service account is a separate identity with its own email address. It can only open spreadsheets that have been shared with that address. Share the sheet with the service account's email, or use OAuth on behalf of a user who has access.

    RAW stores values exactly as sent, so '=A1+1' stays text and '2026-11-12' is a string. USER_ENTERED parses input as if a person typed it, creating formulas, numbers and dates. Use USER_ENTERED unless you need literal text.

    Use Apps Script for logic that lives inside Google Workspace, like custom menus or onEdit triggers. Use the Sheets API when your code runs elsewhere, in any language, or when an external system needs to read or write sheets.

    Related terms, automations and guides

    Where this concept shows up in practice.

    DefinitionGoogle Apps ScriptGoogle Apps Script is Google's cloud-hosted JavaScript platform for automating Google Workspace: Sheets, Gmail, Drive, Docs, Calendar and Forms. Scripts run on Google's servers, can be triggered on a schedule or by events, and are limited by daily quotas such as a 6-minute cap per execution.DefinitionOAuth 2.0OAuth 2.0 is the IETF authorization standard (RFC 6749) that lets an app access your account in another service with a scoped token instead of your password. It powers 'Connect your Google account' buttons and nearly every app-to-app integration.DefinitionRate LimitingRate limiting is a technique that controls the number of requests a client can make to a server within a given time window, preventing abuse and ensuring fair resource distribution.DefinitionRetry LogicRetry logic is a fault-tolerance pattern that automatically re-attempts failed operations with configurable delays, backoff strategies, and maximum attempt limits to handle transient errors without manual intervention.DefinitionAPI IntegrationAPI integration is the process of connecting two or more applications through their APIs so they can exchange data and trigger actions automatically. It eliminates manual data entry by letting systems communicate directly with each other in real time.DefinitionIMPORTXMLIMPORTXML is a Google Sheets function that fetches a URL from Google's servers and returns whatever an XPath query selects from the page, such as titles, prices or links. It reads only the raw HTML, so it cannot see content that JavaScript adds after the page loads.GuideIMPORTXML "Could Not Fetch URL" and "Imported Content Is Empty": Causes and FixesWhy Google Sheets' IMPORTXML and IMPORTHTML return "Could not fetch url", "Imported content is empty" or endless Loading, how to tell which cause you have in a minute, and what to use when the page is JavaScript-rendered, blocked or behind a login.GuideHow to Scrape and Crawl Dynamic Websites (Why JavaScript Pages Come Back Empty)Why requests, BeautifulSoup and Google Sheets' IMPORTXML return empty results on JavaScript pages, and the four ways to get the data: embedded JSON, the site's own XHR/JSON endpoints, a rendered browser with proper waits, and handling infinite scroll, load-more buttons and JS-built links when crawling.

    Stop reading about automation.

    Start automating.

    Describe what you need in plain English. Autonoly's AI agent builds and runs the automation for you — no code required.

    See Features