Everything an AI agent can do with the Google Sheets API.

A reference guide for building AI agents: every method, how to authenticate, and the permissions each one needs.

Endpoints17
API versionv4
Last updated23 June 2026
Orientation

How the Google Sheets API works.

The Google Sheets API is how an app or AI agent works with a Google spreadsheet: reading cell values, appending rows, updating a range, or changing formatting and structure. Access is granted through an OAuth 2.0 access token, and the scopes on that token set whether a call can only read or can also write, and whether it reaches every spreadsheet on the account or only the files the app created. Google ships new capabilities as dated additions rather than minting new version numbers.

17Endpoints
4Capability groups
7Read
10Write
2Permissions
Authentication
Google Sheets authenticates calls with an OAuth 2.0 access token, sent as a Bearer token. The token represents either a person who went through Google's consent flow or a service account that signs in with its own key. The scopes attached to the token set what it can do, and Google reviews sensitive and restricted scopes before an app can use them with outside users.
Permissions
Access is governed by OAuth scopes. spreadsheets.readonly allows reads, spreadsheets allows reads and writes, and the broader drive, drive.file, and drive.readonly scopes also satisfy Sheets calls. drive.file narrows access to only the files an app created or a user opened with it, while drive reaches every file on the account. A method returns PERMISSION_DENIED when the token's scope is too narrow or the identity cannot see the spreadsheet.
Versioning
Google Sheets exposes one URL version of its API, v4, launched in 2016. New capabilities, like smart chips and tables, ship as dated additions in the release notes rather than as new version numbers, so there is no version to pin per request. The older v3 API was turned down in 2021.
Data model
A spreadsheet is identified by a spreadsheetId taken from its URL and contains one or more sheets, each a grid of cells addressed in A1 notation. Reading and writing cell values goes through the values methods, while changing structure, formatting, charts, or filters goes through a single spreadsheets batchUpdate method whose requests apply atomically. The API has no webhook or push channel of its own.
Connect & authenticate

Connection & authentication methods.

How an app or AI agent connects to Google Sheets determines what it can reach. An agent calls the API with an OAuth 2.0 access token, and the scopes on that token set whether it can read or change a spreadsheet, and whether it reaches every spreadsheet on the account or only the files it created.

Ways to connect

REST API

The REST API takes and returns JSON at https://sheets.googleapis.com/v4. A call authenticates with an OAuth 2.0 access token in the Authorization header, and a spreadsheet is addressed by its spreadsheetId, the string from its URL. Cell ranges are given in A1 notation, like Sheet1!A1:B2. There is no first-party Model Context Protocol server for Google Sheets.

Best forConnecting an app or AI agent to Google Sheets.
Governed byThe OAuth scopes on the access token.
Docs ↗
Authentication

OAuth 2.0 (user)

An app sends a user through Google's OAuth 2.0 consent flow and receives an access token tied to that person, plus a refresh token to renew it. The scopes requested set what the token can do, and Google's verification review applies to sensitive and restricted scopes before an app can use them with outside users.

TokenOAuth 2.0 access token (Bearer), refreshable
Best forActing on a specific person's spreadsheets with their consent.
Docs ↗

Service account

A service account is a non-human Google identity that authenticates with its own key and obtains an access token without a consent screen. It can reach a spreadsheet that is shared with its email address, or, in Google Workspace, use domain-wide delegation to act as users in the organization.

TokenOAuth 2.0 access token minted from a service-account key
Best forServer-to-server access to spreadsheets shared with the account.
Docs ↗
Endpoint reference

Every Google Sheets API method.

Filter by method, access, or permission, or search any path. Select a row for version detail, rate limits, the related webhook event, and the source.

MethodEndpointWhat it doesAccessPermissionVersion

Spreadsheets

Methods for reading a whole spreadsheet and changing its structure, formatting, and charts.4

Full scope: https://www.googleapis.com/auth/spreadsheets.readonly. Also satisfied by spreadsheets, drive.readonly, drive.file, or drive. Use the includeGridData parameter to return cell values.

Acts onspreadsheet
Permission (capability)spreadsheets.readonly
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Full scope: https://www.googleapis.com/auth/spreadsheets. Also satisfied by drive.file or drive.

Acts onspreadsheet
Permission (capability)spreadsheets
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Full scope: https://www.googleapis.com/auth/spreadsheets. Also satisfied by drive.file or drive. This is the single method for all structural and formatting changes; requests apply atomically.

Acts onspreadsheet
Permission (capability)spreadsheets
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Full scope: https://www.googleapis.com/auth/spreadsheets.readonly. Also satisfied by spreadsheets, drive.readonly, drive.file, or drive. A read despite using POST.

Acts onspreadsheet
Permission (capability)spreadsheets.readonly
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Cell values

Methods for reading and writing the cell values inside a spreadsheet.10

Full scope: https://www.googleapis.com/auth/spreadsheets.readonly. Also satisfied by spreadsheets, drive.readonly, drive.file, or drive.

Acts onvalueRange
Permission (capability)spreadsheets.readonly
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Full scope: https://www.googleapis.com/auth/spreadsheets. Also satisfied by drive.file or drive. Overwrites the target range in place.

Acts onvalueRange
Permission (capability)spreadsheets
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Full scope: https://www.googleapis.com/auth/spreadsheets. Also satisfied by drive.file or drive. Finds the existing table and writes below it.

Acts onvalueRange
Permission (capability)spreadsheets
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Full scope: https://www.googleapis.com/auth/spreadsheets. Also satisfied by drive.file or drive. Removes only values, not cell formatting.

Acts onvalueRange
Permission (capability)spreadsheets
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Full scope: https://www.googleapis.com/auth/spreadsheets.readonly. Also satisfied by spreadsheets, drive.readonly, drive.file, or drive.

Acts onvalueRange
Permission (capability)spreadsheets.readonly
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Full scope: https://www.googleapis.com/auth/spreadsheets. Also satisfied by drive.file or drive.

Acts onvalueRange
Permission (capability)spreadsheets
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Full scope: https://www.googleapis.com/auth/spreadsheets.readonly. Also satisfied by spreadsheets, drive.readonly, drive.file, or drive. A read despite using POST.

Acts onvalueRange
Permission (capability)spreadsheets.readonly
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Full scope: https://www.googleapis.com/auth/spreadsheets. Also satisfied by drive.file or drive.

Acts onvalueRange
Permission (capability)spreadsheets
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Full scope: https://www.googleapis.com/auth/spreadsheets. Also satisfied by drive.file or drive.

Acts onvalueRange
Permission (capability)spreadsheets
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Full scope: https://www.googleapis.com/auth/spreadsheets. Also satisfied by drive.file or drive.

Acts onvalueRange
Permission (capability)spreadsheets
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Sheets (tabs)

Methods for operating on individual sheets within a spreadsheet.1

Full scope: https://www.googleapis.com/auth/spreadsheets. Also satisfied by drive.file or drive. Writes into the destination spreadsheet, so the token needs access to both files.

Acts onsheet
Permission (capability)spreadsheets
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Developer metadata

Methods for reading hidden developer metadata attached to a spreadsheet, sheet, or range.2

Full scope: https://www.googleapis.com/auth/spreadsheets.readonly. Also satisfied by spreadsheets, drive.readonly, drive.file, or drive.

Acts ondeveloperMetadata
Permission (capability)spreadsheets.readonly
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Full scope: https://www.googleapis.com/auth/spreadsheets.readonly. Also satisfied by spreadsheets, drive.readonly, drive.file, or drive. A read despite using POST.

Acts ondeveloperMetadata
Permission (capability)spreadsheets.readonly
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply
No endpoints match those filters.
Webhooks

Webhook events.

EventWhat it signalsTriggered by
No events match that search.
Rate limits & pagination

Rate limits, pagination & request size.

Google Sheets limits how fast an app can call by a per-minute request quota, counted separately for reads and writes, and at both the project level and the per-user level.

Request rate

Google Sheets meters calls by a per-minute request quota, not by a per-method cost, so individual methods carry no point weighting. Reads and writes are counted separately, and each is capped at 300 requests per minute per project and 60 requests per minute per user per project. The quota refreshes every minute. Going over returns HTTP 429 with a RESOURCE_EXHAUSTED error, and the documented response is to slow down and retry with truncated exponential backoff. There is no charge for usage within these limits.

Pagination

The Sheets API does not paginate value reads; a get or batchGet returns the full requested range in one response. A request to read or write very large ranges is bounded by the request size and the per-request processing time limit rather than by page cursors.

Request size

There is no hard size limit on a single request, but a payload of roughly 2 MB or less is recommended for speed, and any single request that runs longer than 180 seconds returns a timeout. A spreadsheet itself is bounded by Google Sheets product limits, like the cell count cap, which the API shares.

Errors

Status codes & error handling.

The status codes an agent should handle, and what to do about each.

StatusCodeMeaningWhat to do
400INVALID_ARGUMENTThe request was malformed, for example a bad A1 range, an unparseable field, or an invalid parameter value.Check the request against the reference for the method, fix the range or parameters, and resend. The request is not retryable as-is.
401UNAUTHENTICATEDNo valid OAuth credentials were supplied, or the access token has expired.Refresh the access token using the refresh token, or send the user back through consent, then retry.
403PERMISSION_DENIEDThe token lacks a scope the method needs, or the authenticated identity does not have access to the spreadsheet.Request the right scope, like spreadsheets for writes, or share the spreadsheet with the account, then retry.
404NOT_FOUNDThe spreadsheet ID does not exist, or it is not visible to the authenticated identity.Verify the spreadsheetId and confirm the identity has access to the file.
429RESOURCE_EXHAUSTEDA per-minute quota was exceeded, for reads or writes, at the project or per-user level.Slow the request rate and retry with truncated exponential backoff. Batch related calls to use fewer requests.
500INTERNALAn unexpected error on Google's side while processing the request.Retry with backoff, and file a report on the Sheets API issue tracker if it persists.
503UNAVAILABLEThe service is temporarily unavailable, or the spreadsheet is too complex for the request to complete in time.Retry with backoff, keep to roughly one request per second per spreadsheet, batch operations, and request only the data needed.
Versioning & freshness

Version history.

Google Sheets uses one URL version of its API, v4, and ships dated feature updates through its release notes rather than minting new version numbers.

Version history

What changed, and when

Latest versionv4
v4Current version
Current version (v4)

Google Sheets exposes one URL version of its API, v4, and adds capabilities through dated release-note entries rather than new version numbers. Recent additions include smart chips and table operations.

What changed
  • Drive and People smart chips reached general availability for creating, updating, and reading (June 2025).
  • Table creation, modification, and basic table actions added (April 2025).
  • The older v3 API was turned down (2021).
2025-06-17Feature update
Drive and People chips generally available

Smart chips that reference Drive files and people became generally available in the Sheets API, so an app can create, update, and read them.

What changed
  • Create, update, and read Drive and People smart chips through the API.
2025-04-29Feature update
Tables support

The Sheets API gained the ability to create and modify tables and take basic actions on them.

What changed
  • Create and modify tables, and perform basic table actions, through the API.
2021-08-02Requires migration
Sheets API v3 turned down

The legacy v3 API was turned down, leaving v4 as the supported version, with migration guidance provided.

What changed
  • v3 turned down; integrations directed to migrate to v4.
2016-06-15Feature update
Google Sheets API v4 launched

Google introduced the v4 API, a JSON REST interface for reading and modifying spreadsheets, replacing the older v3 design.

What changed
  • v4 launched with the spreadsheets and values methods.

v4 is the current and only supported version; the older v3 was turned down in 2021.

Google Sheets API release notes ↗
Questions

Google Sheets API, answered.

Which OAuth scope does a method need?+
Reading methods accept the read-only scopes spreadsheets.readonly and drive.readonly, as well as the broader spreadsheets, drive.file, and drive. Writing methods need spreadsheets, drive.file, or drive. The narrowest scope that covers the work is the safest choice, since a leaked token can do only what its scopes allow.
What is the difference between the values methods and batchUpdate?+
The values methods read and write the data inside cells, given by an A1 range. The spreadsheets batchUpdate method changes everything else, like cell formatting, adding or deleting sheets, charts, filters, and conditional formatting. A structural change goes through batchUpdate, while putting numbers and text into cells goes through the values methods.
Does the Google Sheets API send webhooks when a spreadsheet changes?+
No. The Sheets API has no webhook or push channel of its own, so an app learns about changes by reading the spreadsheet. Change notifications for the underlying file are a feature of the separate Google Drive API, which can watch a file and notify an app when it is modified.
How does the difference between drive.file and drive matter?+
The drive.file scope limits an app to only the files it created or that a user explicitly opened with it, so it never sees the rest of the account's spreadsheets. The drive scope reaches every file on the account. For an agent that only needs the sheets it works with, drive.file or a spreadsheets scope keeps its reach narrow.
How are the rate limits counted?+
Limits are per minute, not per method, and reads and writes are counted separately. Each is capped at 300 requests per minute per project and 60 per minute per user per project, refreshing every minute. Exceeding a limit returns a 429 RESOURCE_EXHAUSTED error, and the fix is to slow down and retry with exponential backoff, batching related calls to use fewer requests.
How does an agent append rows without overwriting data?+
The values append method finds the existing table in the given range and writes new rows below the last row of data, rather than replacing the range. The values update method, by contrast, overwrites the exact range it is given. Append is the method for adding records to a growing list.
Related

More productivity API guides for agents

What is Bollard AI?

Control what every AI agent can do in Google Sheets.

Bollard AI sits between a team's AI agents and Google Sheets. Grant each agent exactly the access it needs, read or write, and every call is checked and logged.

  • Set read, write, or full access per agent, never a shared Google account.
  • Denied by default, so an agent reaches only what has been explicitly allowed.
  • Every call recorded in plain English: who, what, where, and the decision.
Google Sheets
Reporting Agent
Read cell values ActionOffReadFull use
Append rows ActionOffReadFull use
Create spreadsheets ActionOffReadFull use
Clear ranges ActionOffReadFull use
Per-agent access, set in Bollard AI, not in Google Sheets