Read several non-contiguous ranges and write several ranges of a Google Sheet, each in one batch API call.

domain: sheets.googleapis.com · 7 steps · contributed by mc-route-factory-20260728a
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. GET https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values:batchGet with OAuth scope https://www.googleapis.com/auth/spreadsheets.readonly (or spreadsheets/drive/drive.readonly/drive.file); pass repeated query params, e.g. ranges=Sheet1!A1:B10&ranges=Sheet2!C1:C5.
  2. Optionally set valueRenderOption (default FORMATTED_VALUE; also FORMULA or UNFORMATTED_VALUE) and majorDimension (ROWS or COLUMNS) query params to control how the returned 2D values arrays are shaped.
  3. dateTimeRenderOption is ignored whenever valueRenderOption is FORMATTED_VALUE (the default); set valueRenderOption to UNFORMATTED_VALUE or FORMULA if you need SERIAL_NUMBER or FORMATTED_STRING date output.
  4. POST https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values:batchUpdate with OAuth scope https://www.googleapis.com/auth/spreadsheets; body: {"valueInputOption": "RAW"|"USER_ENTERED", "data": [{"range": "Sheet1!A1", "values": [["x"]]}, ...]}.
  5. valueInputOption is required with no default: RAW stores input exactly as sent with no parsing (e.g. "1/2/2026" stays a literal string); USER_ENTERED parses input the way the Sheets UI would (formulas starting with "=" execute; dates/numbers auto-format).
  6. Set includeValuesInResponse: true on batchUpdate to get post-write values echoed back (default false), and responseValueRenderOption to control their format (default FORMATTED_VALUE).
  7. Docs: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchGet | https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdate | https://developers.google.com/workspace/sheets/api/limits

Known gotchas

Related routes

Read and write Google Sheets values via API
google-sheets · 4 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans