| title | find |
|---|---|
| sidebarTitle | find |
| description | Search the document for text or node matches using SDM/1 selectors. Returns discovery-grade results — for mutation targeting, use query.match instead. |
{/* GENERATED FILE: DO NOT EDIT. Regenerate via pnpm run docapi:sync. */}
Alpha: Document API is currently alpha and subject to breaking changes.
Search the document for text or node matches using SDM/1 selectors. Returns discovery-grade results — for mutation targeting, use query.match instead.
- Operation ID:
find - API member path:
editor.doc.find(...) - Mutates document:
no - Idempotency:
idempotent - Supports tracked mode:
no - Supports dry run:
no - Deterministic target resolution:
no
Returns an SDFindResult envelope ({ total, limit, offset, items }). Each item is an SDNodeResult ({ node, address }).
| Field | Type | Required | Description |
|---|---|---|---|
in |
StoryLocator | no | StoryLocator |
limit |
integer | no | |
offset |
integer | no | |
options |
object | no | |
options.includeContext |
boolean | no | |
options.includeProvenance |
boolean | no | |
options.includeResolved |
boolean | no | |
select |
object(type="text") | object(type="node") | yes | One of: object(type="text"), object(type="node") |
within |
BlockNodeAddress | no | BlockNodeAddress |
within.kind |
"block" |
no | Constant: "block" |
within.nodeId |
string | no | |
within.nodeType |
enum | no | "paragraph", "heading", "listItem", "table", "tableRow", "tableCell", "tableOfContents", "image", "sdt" |
{
"in": {
"kind": "story",
"storyType": "body"
},
"select": {
"caseSensitive": true,
"mode": "contains",
"pattern": "hello world",
"type": "text"
},
"within": {
"kind": "block",
"nodeId": "node-def456",
"nodeType": "paragraph"
}
}| Field | Type | Required | Description |
|---|---|---|---|
items |
object[] | yes | |
limit |
integer | yes | |
offset |
integer | yes | |
total |
integer | yes |
{
"items": [
{
"address": {
"kind": "block",
"nodeId": "node-def456",
"nodeType": "paragraph"
},
"context": {},
"node": {}
}
],
"limit": 50,
"offset": 0,
"total": 1
}CAPABILITY_UNAVAILABLEINVALID_INPUTADDRESS_STALESTORY_NOT_FOUNDSTORY_MISMATCHSTORY_NOT_SUPPORTEDCROSS_STORY_PLANMATERIALIZATION_FAILED
- None