Batch Get Spreadsheet Values
sheets_batch_get_valuesBatch read cell values from multiple ranges in a Google Spreadsheet with a single request, reducing API calls and improving efficiency.
Instructions
Read cell values from multiple ranges in a Google Spreadsheet in a single request.
Args:
spreadsheet_id (string): The ID of the Google Spreadsheet
ranges (string[]): Array of A1 notation ranges to read (e.g., ['Sheet1!A1:D10', 'Sheet2!A1:B5'])
major_dimension ('ROWS' | 'COLUMNS'): Return data by rows or columns (default: 'ROWS')
response_format ('markdown' | 'json'): Output format (default: 'markdown')
Returns: For JSON format: { "spreadsheetId": string, "valueRanges": [{ "range": string, "values": [[...]] }, ...] }
Examples:
Read multiple ranges: ranges=["Sheet1!A1:D10", "Sheet2!A:B"]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spreadsheet_id | Yes | The ID of the Google Spreadsheet | |
| ranges | Yes | Array of A1 notation ranges to read (e.g., ['Sheet1!A1:D10', 'Sheet2!A1:B5']) | |
| major_dimension | No | Whether to return data by rows or columns | ROWS |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for structured data | markdown |