---
title: "comment.locate: Locate Comment Anchors — Doc kit command — Kition"
description: "Answers where each of a host's comment anchors is in the document now, after edits: whether it is found, the text it covers, its page, and the rectangles to highlight."
canonical: "https://developer.kition.ai/docs/kits/doc/commands/comment.locate"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/doc/commands/comment.locate](https://developer.kition.ai/docs/kits/doc/commands/comment.locate)

# comment.locate

**Locate Comment Anchors.** Answers where each of a host's comment anchors is in the document now, after edits: whether it is found, the text it covers, its page, and the rectangles to highlight.

- Kit: Doc 0.1.0 (.docx); reference: [Doc kit commands](https://developer.kition.ai/docs/kits/doc.md)
- Changes the document: no

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `anchors` | `object[]` | no | [{ids: [object], range?: {start, end}, quote?, page?}] |

## Call through doc_run

```text
doc_run {
  "path": "<file>.docx",
  "steps": [{ "command": "comment.locate" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `anchors`. doc_run answers the step’s result in `completed[i].result`.

## Result



```json
{
  "type": "array"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "anchors": {
      "description": "[{ids: [object], range?: {start, end}, quote?, page?}]",
      "items": {
        "additionalProperties": true,
        "properties": {
          "ids": {
            "items": {},
            "type": "array"
          },
          "page": {
            "type": "integer"
          },
          "quote": {},
          "range": {
            "additionalProperties": true,
            "properties": {
              "end": {
                "type": "number"
              },
              "start": {
                "type": "number"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "type": "array"
    }
  },
  "returns": "[{found, exact, text, page, at: {page, x, y, height} | null, rects: [{page, x, y, width, height}]}] (where each host comment anchor is in this view now, after edits: exact when its quote is still where its range says; page counts from 1)",
  "type": "object"
}
```

Generated from the command list of @kition/doc-darwin-arm64@0.1.0 and the kit itself (doc_commands through @kition/cli@0.1.1, built from KitionAI/kition-doc@41e14a8).
