> ## Documentation Index
> Fetch the complete documentation index at: https://superdoc-nick-sd-2070-add-content-controls-namespace-to-doc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# getNodeById

> Retrieve a single node by its unique ID.

> Alpha: Document API is currently alpha and subject to breaking changes.

## Summary

Retrieve a single node by its unique ID.

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

## Expected result

Returns an SDNodeResult envelope with the projected SDM/1 node and canonical address.

## Input fields

| Field      | Type   | Required | Description                                                                                                               |
| ---------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------- |
| `nodeId`   | string | yes      |                                                                                                                           |
| `nodeType` | enum   | no       | `"paragraph"`, `"heading"`, `"listItem"`, `"table"`, `"tableRow"`, `"tableCell"`, `"tableOfContents"`, `"image"`, `"sdt"` |

### Example request

```json theme={null}
{
  "nodeId": "node-def456",
  "nodeType": "paragraph"
}
```

## Output fields

| Field                          | Type      | Required   | Description                                          |   |
| ------------------------------ | --------- | ---------- | ---------------------------------------------------- | - |
| `address`                      | object    | yes        |                                                      |   |
| `address.anchor`               | object    | no         |                                                      |   |
| `address.anchor.end`           | object    | no         |                                                      |   |
| `address.anchor.end.blockId`   | string    | no         |                                                      |   |
| `address.anchor.end.offset`    | integer   | no         |                                                      |   |
| `address.anchor.start`         | object    | no         |                                                      |   |
| `address.anchor.start.blockId` | string    | no         |                                                      |   |
| `address.anchor.start.offset`  | integer   | no         |                                                      |   |
| `address.evaluatedRevision`    | string    | no         |                                                      |   |
| `address.kind`                 | enum      | yes        | `"content"`, `"inline"`, `"annotation"`, `"section"` |   |
| `address.nodeId`               | string    | no         |                                                      |   |
| `address.path`                 | string \\ | integer\[] | no                                                   |   |
| `address.stability`            | enum      | yes        | `"stable"`, `"ephemeral"`                            |   |
| `context`                      | object    | no         |                                                      |   |
| `node`                         | object    | yes        |                                                      |   |

### Example response

```json theme={null}
{
  "address": {
    "anchor": {
      "end": {
        "blockId": "block-abc123",
        "offset": 0
      },
      "start": {
        "blockId": "block-abc123",
        "offset": 0
      }
    },
    "kind": "content",
    "nodeId": "node-def456",
    "stability": "stable"
  },
  "context": {},
  "node": {}
}
```

## Pre-apply throws

* `TARGET_NOT_FOUND`

## Non-applied failure codes

* None

## Raw schemas

<Accordion title="Raw input schema">
  ```json theme={null}
  {
    "additionalProperties": false,
    "properties": {
      "nodeId": {
        "type": "string"
      },
      "nodeType": {
        "enum": [
          "paragraph",
          "heading",
          "listItem",
          "table",
          "tableRow",
          "tableCell",
          "tableOfContents",
          "image",
          "sdt"
        ]
      }
    },
    "required": [
      "nodeId"
    ],
    "type": "object"
  }
  ```
</Accordion>

<Accordion title="Raw output schema">
  ```json theme={null}
  {
    "additionalProperties": false,
    "properties": {
      "address": {
        "additionalProperties": false,
        "properties": {
          "anchor": {
            "additionalProperties": false,
            "properties": {
              "end": {
                "additionalProperties": false,
                "properties": {
                  "blockId": {
                    "type": "string"
                  },
                  "offset": {
                    "type": "integer"
                  }
                },
                "required": [
                  "blockId",
                  "offset"
                ],
                "type": "object"
              },
              "start": {
                "additionalProperties": false,
                "properties": {
                  "blockId": {
                    "type": "string"
                  },
                  "offset": {
                    "type": "integer"
                  }
                },
                "required": [
                  "blockId",
                  "offset"
                ],
                "type": "object"
              }
            },
            "type": "object"
          },
          "evaluatedRevision": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "content",
              "inline",
              "annotation",
              "section"
            ]
          },
          "nodeId": {
            "type": "string"
          },
          "path": {
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array"
          },
          "stability": {
            "enum": [
              "stable",
              "ephemeral"
            ]
          }
        },
        "required": [
          "kind",
          "stability"
        ],
        "type": "object"
      },
      "context": {
        "type": "object"
      },
      "node": {
        "type": "object"
      }
    },
    "required": [
      "node",
      "address"
    ],
    "type": "object"
  }
  ```
</Accordion>
