# SheetsFilteredReadDataTool

> **Class** in `langchain_google_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-google-community/sheets/read_sheet_tools/SheetsFilteredReadDataTool)

Tool for reading data from Google Sheets using DataFilters.

[`BaseReadTool`][langchain_google_community.sheets.read_sheet_tools.BaseReadTool].

Uses `getByDataFilter` API to read ranges specified by A1 notation, grid
coordinates, or developer metadata. Optionally includes detailed cell formatting.

!!! note "Authentication Required"

    Requires OAuth2 authentication (not API key).

!!! warning "Range Selection Only"

    This tool is for `RANGE SELECTION`, not conditional filtering like
    `'score > 50'`. For conditional filtering, create a Filter View using
    Sheets UI or `batchUpdate` API.

## Signature

```python
SheetsFilteredReadDataTool()
```

## Description

**Tool Output:**

success (bool): Whether operation succeeded.
spreadsheet_id (str): The spreadsheet ID.
properties (dict): Spreadsheet-level properties.
sheets (list): List of sheets with filtered data containing properties
    and data segments.

???+ example "Basic Usage with A1 Notation"

    Read using A1 notation:

    ```python
    from langchain_google_community.sheets import SheetsFilteredReadDataTool

    tool = SheetsFilteredReadDataTool(api_resource=service)
    result = tool.run(
        {
            "spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
            "data_filters": [{"a1Range": "Sheet1!A1:E10"}],
            "include_grid_data": True,
        }
    )
    ```

??? example "Using Grid Coordinates"

    Read using grid coordinates:

    ```python
    result = tool.run(
        {
            "spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
            "data_filters": [
                {
                    "gridRange": {
                        "sheetId": 0,
                        "startRowIndex": 0,
                        "endRowIndex": 10,
                        "startColumnIndex": 0,
                        "endColumnIndex": 5,
                    }
                }
            ],
        }
    )
    ```

## Extends

- `BaseReadTool`

## Properties

- `name`
- `description`
- `args_schema`

---

[View source on GitHub](https://github.com/langchain-ai/langchain-google/blob/6b6f1e8aa4053d9914ab0b58ee16c21364897842/libs/community/langchain_google_community/sheets/read_sheet_tools.py#L649)