Skip to main content

Summary

Return document summary info including word, character, paragraph, heading, table, image, comment, tracked-change, SDT-field, list, and page counts, plus outline and capabilities.
  • Operation ID: info
  • API member path: editor.doc.info(...)
  • Mutates document: no
  • Idempotency: idempotent
  • Supports tracked mode: no
  • Supports dry run: no
  • Deterministic target resolution: yes

Expected result

Returns a DocumentInfo object with counts (words, characters, paragraphs, headings, tables, images, comments, trackedChanges, sdtFields, lists, and optionally pages when pagination is active), document outline, capability flags, and revision.

Input fields

No fields.

Example request

{}

Output fields

FieldTypeRequiredDescription
capabilitiesobjectyes
capabilities.canCommentbooleanyes
capabilities.canFindbooleanyes
capabilities.canGetNodebooleanyes
capabilities.canReplacebooleanyes
countsobjectyes
counts.charactersintegeryes
counts.commentsintegeryes
counts.headingsintegeryes
counts.imagesintegeryes
counts.listsintegeryes
counts.pagesintegerno
counts.paragraphsintegeryes
counts.sdtFieldsintegeryes
counts.tablesintegeryes
counts.trackedChangesintegeryes
counts.wordsintegeryes
defaultsobjectno
defaults.fontFamilystringno
defaults.fontSizenumberno
defaults.styleIdstringno
outlineobject[]yes
revisionstringyes
stylesobjectno
styles.paragraphStylesobject[]no

Example response

{
  "capabilities": {
    "canComment": true,
    "canFind": true,
    "canGetNode": true,
    "canReplace": true
  },
  "counts": {
    "characters": 1,
    "comments": 0,
    "headings": 3,
    "images": 2,
    "lists": 1,
    "pages": 1,
    "paragraphs": 12,
    "sdtFields": 1,
    "tables": 1,
    "trackedChanges": 1,
    "words": 250
  },
  "defaults": {
    "fontFamily": "example",
    "fontSize": 12.5
  },
  "outline": [
    {
      "level": 1,
      "nodeId": "node-def456",
      "text": "Hello, world."
    }
  ],
  "revision": "example",
  "styles": {
    "paragraphStyles": [
      {
        "count": 1,
        "fontFamily": "example",
        "fontSize": 12.5,
        "styleId": "style-001"
      }
    ]
  }
}

Pre-apply throws

  • None

Non-applied failure codes

  • None

Raw schemas

{
  "additionalProperties": false,
  "properties": {},
  "type": "object"
}
{
  "additionalProperties": false,
  "properties": {
    "capabilities": {
      "additionalProperties": false,
      "properties": {
        "canComment": {
          "type": "boolean"
        },
        "canFind": {
          "type": "boolean"
        },
        "canGetNode": {
          "type": "boolean"
        },
        "canReplace": {
          "type": "boolean"
        }
      },
      "required": [
        "canFind",
        "canGetNode",
        "canComment",
        "canReplace"
      ],
      "type": "object"
    },
    "counts": {
      "additionalProperties": false,
      "properties": {
        "characters": {
          "type": "integer"
        },
        "comments": {
          "type": "integer"
        },
        "headings": {
          "type": "integer"
        },
        "images": {
          "type": "integer"
        },
        "lists": {
          "type": "integer"
        },
        "pages": {
          "type": "integer"
        },
        "paragraphs": {
          "type": "integer"
        },
        "sdtFields": {
          "type": "integer"
        },
        "tables": {
          "type": "integer"
        },
        "trackedChanges": {
          "type": "integer"
        },
        "words": {
          "type": "integer"
        }
      },
      "required": [
        "words",
        "characters",
        "paragraphs",
        "headings",
        "tables",
        "images",
        "comments",
        "trackedChanges",
        "sdtFields",
        "lists"
      ],
      "type": "object"
    },
    "defaults": {
      "additionalProperties": false,
      "description": "Document's default body text formatting. Use these values when creating new content to match existing style.",
      "properties": {
        "fontFamily": {
          "description": "Most common body text font family.",
          "type": "string"
        },
        "fontSize": {
          "description": "Most common body text font size in half-points.",
          "type": "number"
        },
        "styleId": {
          "description": "Most common body paragraph style ID.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "outline": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "level": {
            "type": "integer"
          },
          "nodeId": {
            "type": "string"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "level",
          "text",
          "nodeId"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "revision": {
      "type": "string"
    },
    "styles": {
      "additionalProperties": false,
      "description": "Styles currently in use in the document.",
      "properties": {
        "paragraphStyles": {
          "description": "Paragraph styles in use, sorted by frequency (most common first).",
          "items": {
            "additionalProperties": false,
            "properties": {
              "count": {
                "description": "Number of paragraphs using this style.",
                "type": "integer"
              },
              "fontFamily": {
                "description": "Font family used by text in this style.",
                "type": "string"
              },
              "fontSize": {
                "description": "Font size in half-points used by text in this style.",
                "type": "number"
              },
              "styleId": {
                "description": "Style identifier (e.g. 'Normal', 'Heading1', 'BodyText').",
                "type": "string"
              }
            },
            "required": [
              "styleId",
              "count"
            ],
            "type": "object"
          },
          "type": "array"
        }
      },
      "required": [
        "paragraphStyles"
      ],
      "type": "object"
    }
  },
  "required": [
    "counts",
    "outline",
    "capabilities",
    "revision"
  ],
  "type": "object"
}