> ## Documentation Index
> Fetch the complete documentation index at: https://superdoc-caio-pizzol-docs-ai-core-preset.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# tables.getCells

> Retrieve cell information for a table, optionally filtered by row or column.

## Summary

Retrieve cell information for a table, optionally filtered by row or column.

* Operation ID: `tables.getCells`
* API member path: `editor.doc.tables.getCells(...)`
* Mutates document: `no`
* Idempotency: `idempotent`
* Supports tracked mode: `no`
* Supports dry run: `no`
* Deterministic target resolution: `yes`

## Expected result

Returns a TablesGetCellsOutput with cell information for the requested rows and columns.

## Input fields

### Variant 1 (target.nodeType="table")

| Field             | Type         | Required | Description         |
| ----------------- | ------------ | -------- | ------------------- |
| `columnIndex`     | integer      | no       |                     |
| `rowIndex`        | integer      | no       |                     |
| `target`          | TableAddress | yes      | TableAddress        |
| `target.kind`     | `"block"`    | yes      | Constant: `"block"` |
| `target.nodeId`   | string       | yes      |                     |
| `target.nodeType` | `"table"`    | yes      | Constant: `"table"` |

### Variant 2 (required: nodeId)

| Field         | Type    | Required | Description |
| ------------- | ------- | -------- | ----------- |
| `columnIndex` | integer | no       |             |
| `nodeId`      | string  | yes      |             |
| `rowIndex`    | integer | no       |             |

### Example request

```json theme={null}
{
  "columnIndex": 1,
  "rowIndex": 1,
  "target": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "table"
  }
}
```

## Output fields

| Field              | Type         | Required | Description         |
| ------------------ | ------------ | -------- | ------------------- |
| `address`          | TableAddress | yes      | TableAddress        |
| `address.kind`     | `"block"`    | yes      | Constant: `"block"` |
| `address.nodeId`   | string       | yes      |                     |
| `address.nodeType` | `"table"`    | yes      | Constant: `"table"` |
| `cells`            | object\[]    | yes      |                     |
| `nodeId`           | string       | yes      |                     |

### Example response

```json theme={null}
{
  "address": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "table"
  },
  "cells": [
    {
      "address": {
        "kind": "block",
        "nodeId": "node-def456",
        "nodeType": "tableCell"
      },
      "colspan": 1,
      "columnIndex": 1,
      "nodeId": "node-def456",
      "rowIndex": 1,
      "rowspan": 1
    }
  ],
  "nodeId": "node-def456"
}
```

## Pre-apply throws

* `TARGET_NOT_FOUND`

## Non-applied failure codes

* None

## Raw schemas

<Accordion title="Raw input schema">
  ```json theme={null}
  {
    "additionalProperties": false,
    "oneOf": [
      {
        "required": [
          "target"
        ]
      },
      {
        "required": [
          "nodeId"
        ]
      }
    ],
    "properties": {
      "columnIndex": {
        "minimum": 0,
        "type": "integer"
      },
      "nodeId": {
        "type": "string"
      },
      "rowIndex": {
        "minimum": 0,
        "type": "integer"
      },
      "target": {
        "$ref": "#/$defs/TableAddress"
      }
    },
    "type": "object"
  }
  ```
</Accordion>

<Accordion title="Raw output schema">
  ```json theme={null}
  {
    "additionalProperties": false,
    "properties": {
      "address": {
        "$ref": "#/$defs/TableAddress"
      },
      "cells": {
        "items": {
          "additionalProperties": false,
          "properties": {
            "address": {
              "$ref": "#/$defs/TableCellAddress"
            },
            "colspan": {
              "minimum": 1,
              "type": "integer"
            },
            "columnIndex": {
              "minimum": 0,
              "type": "integer"
            },
            "nodeId": {
              "type": "string"
            },
            "rowIndex": {
              "minimum": 0,
              "type": "integer"
            },
            "rowspan": {
              "minimum": 1,
              "type": "integer"
            }
          },
          "required": [
            "nodeId",
            "address",
            "rowIndex",
            "columnIndex",
            "colspan",
            "rowspan"
          ],
          "type": "object"
        },
        "type": "array"
      },
      "nodeId": {
        "type": "string"
      }
    },
    "required": [
      "nodeId",
      "address",
      "cells"
    ],
    "type": "object"
  }
  ```
</Accordion>
