> ## 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.

# getNode

> Retrieve a single node by target position.

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

## Summary

Retrieve a single node by target position.

* Operation ID: `getNode`
* API member path: `editor.doc.getNode(...)`
* 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

### Variant 1 (kind="block")

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

### Variant 2 (kind="inline")

| Field                  | Type         | Required | Description                                                                                                    |
| ---------------------- | ------------ | -------- | -------------------------------------------------------------------------------------------------------------- |
| `anchor`               | InlineAnchor | yes      | InlineAnchor                                                                                                   |
| `anchor.end`           | Position     | yes      | Position                                                                                                       |
| `anchor.end.blockId`   | string       | yes      |                                                                                                                |
| `anchor.end.offset`    | integer      | yes      |                                                                                                                |
| `anchor.start`         | Position     | yes      | Position                                                                                                       |
| `anchor.start.blockId` | string       | yes      |                                                                                                                |
| `anchor.start.offset`  | integer      | yes      |                                                                                                                |
| `kind`                 | `"inline"`   | yes      | Constant: `"inline"`                                                                                           |
| `nodeType`             | enum         | yes      | `"run"`, `"bookmark"`, `"comment"`, `"hyperlink"`, `"sdt"`, `"image"`, `"footnoteRef"`, `"tab"`, `"lineBreak"` |

### Example request

```json theme={null}
{
  "kind": "block",
  "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`
* `ADDRESS_STALE`

## Non-applied failure codes

* None

## Raw schemas

<Accordion title="Raw input schema">
  ```json theme={null}
  {
    "$ref": "#/$defs/NodeAddress"
  }
  ```
</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>
