Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID.
This method differs from spreadsheets.get in that it allows selecting which subsets of spreadsheet data to return by specifying adataFiltersparameter. MultipleDataFilterscan be specified. Specifying one or more data filters returns the portions of the spreadsheet that intersect ranges matched by any of the filters.
By default, data within grids is not returned. You can include grid data one of 2 ways:
Specify afield masklisting your desired fields using thefieldsURL parameter in HTTP
Set theincludeGridDataparameter to true. If a field mask is set, theincludeGridDataparameter is ignored
For large spreadsheets, as a best practice, retrieve only the specific spreadsheet fields that you want.
HTTP request
POST https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}:getByDataFilter
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-29 UTC."],[],[],null,["# Method: spreadsheets.getByDataFilter\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nReturns the spreadsheet at the given ID. The caller must specify the spreadsheet ID.\n\nThis method differs from spreadsheets.get in that it allows selecting which subsets of spreadsheet data to return by specifying a [dataFilters](/workspace/sheets/api/reference/rest/v4/spreadsheets/getByDataFilter#body.request_body.FIELDS.data_filters) parameter. Multiple [DataFilters](/workspace/sheets/api/reference/rest/v4/DataFilter) can be specified. Specifying one or more data filters returns the portions of the spreadsheet that intersect ranges matched by any of the filters.\n\nBy default, data within grids is not returned. You can include grid data one of 2 ways:\n\n- Specify a [field mask](https://developers.google.com/workspace/sheets/api/guides/field-masks) listing your desired fields using the `fields` URL parameter in HTTP\n\n- Set the [includeGridData](/workspace/sheets/api/reference/rest/v4/spreadsheets/get#body.QUERY_PARAMETERS.include_grid_data) parameter to true. If a field mask is set, the `includeGridData` parameter is ignored\n\nFor large spreadsheets, as a best practice, retrieve only the specific spreadsheet fields that you want.\n\n### HTTP request\n\n`POST https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}:getByDataFilter`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-----------------|--------------------------------------|\n| `spreadsheetId` | `string` The spreadsheet to request. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"dataFilters\": [ { object (/workspace/sheets/api/reference/rest/v4/DataFilter) } ], \"includeGridData\": boolean, \"excludeTablesInBandedRanges\": boolean } ``` |\n\n| Fields ||\n|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `dataFilters[]` | `object (`[DataFilter](/workspace/sheets/api/reference/rest/v4/DataFilter)`)` The [DataFilters](/workspace/sheets/api/reference/rest/v4/DataFilter) used to select which ranges to retrieve from the spreadsheet. |\n| `includeGridData` | `boolean` True if grid data should be returned. This parameter is ignored if a field mask was set in the request. |\n| `excludeTablesInBandedRanges` | `boolean` True if tables should be excluded in the banded ranges. False if not set. |\n\n### Response body\n\nIf successful, the response body contains an instance of [Spreadsheet](/workspace/sheets/api/reference/rest/v4/spreadsheets#Spreadsheet).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/drive`\n- `https://www.googleapis.com/auth/drive.file`\n- `https://www.googleapis.com/auth/spreadsheets`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]