> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentlinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Locate link

> Read link occurrences from one saved observation ID.

`locate_link`

Read link occurrences from one saved observation ID. Does not search URLs or fetch the publisher page.

<Note>Hosted MCP registration verified. These schemas describe the development contract; confirm supported inputs with tools/list. Generic CLI/HTTP calls require a matching development server. Configure LINKTRAIL\_API\_URL; production does not expose these command routes.</Note>

| Access         | Behavior         |
| -------------- | ---------------- |
| `watches:read` | Reads saved data |

Reading saved data does not start a verification job. Mutations can change saved records or access; the effects below apply.

## Example request

Connect through [MCP](/guides/connect-mcp), [CLI](/guides/connect-cli), or [HTTP](/guides/connect-http). Replace example identifiers with records from your workspace.

<CodeGroup>
  ```json MCP theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "locate_link",
      "arguments": {
        "observationId": "observation_example"
      }
    }
  }
  ```

  ```bash CLI theme={null}
  linktrail call locate_link --args '{"observationId":"observation_example"}'
  ```

  ```bash HTTP theme={null}
  curl "$LINKTRAIL_API_URL/v1/commands/locate_link" \
    -H "Authorization: Bearer $LINKTRAIL_API_KEY" \
    -H 'Content-Type: application/json' \
    --data '{"observationId":"observation_example"}'
  ```
</CodeGroup>

## Returned result

Illustrative data validated against the documented response schema. IDs and dates are examples, not a live account capture. MCP returns this data in `structuredContent` and in a text content block; generic HTTP and CLI return the JSON result directly.

```json theme={null}
{
  "v": 1,
  "observation_id": "observation_example",
  "state": "present",
  "reason": null,
  "source_url": "https://publisher.example.org/article",
  "final_url": "https://publisher.example.org/article",
  "target_url": "https://example.com/",
  "observed_at": "2026-09-13T12:00:00.000Z",
  "checker_version": "example-checker",
  "evidence_method": "static_html",
  "rendered": false,
  "evidence": {
    "key": "example/evidence",
    "sha256": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
    "bytes": 56,
    "retrieval": "GET /v1/observations/{id}/evidence, 410 once expired"
  },
  "occurrence_count": 1,
  "truncated": false,
  "occurrences": [
    {
      "index": 0,
      "href": "https://example.com/",
      "resolved_target": "https://example.com/",
      "anchor": "Example",
      "rel": [],
      "followed": true,
      "context": "Example",
      "in_captured_document": {
        "line": 1,
        "column": 1,
        "offset": 0
      },
      "open_at": "https://publisher.example.org/article#:~:text=Example"
    }
  ],
  "page_directives": null
}
```

## Input fields

Omit optional fields when you do not want to supply them. Null is accepted only where listed. Unknown input properties are rejected.

| Field           | Type   | Presence | Meaning and constraints                                                                           |
| --------------- | ------ | -------- | ------------------------------------------------------------------------------------------------- |
| `observationId` | string | Required | ID of a saved observation; this does not fetch a new publisher page. minLength: 1; maxLength: 200 |

### Validation and omitted values

Reads occurrences from the supplied saved observation. It does not fetch a URL or look up a watch by URL.

## Output fields

Fields inside optional or nullable parents apply only when that parent exists. [Common schema conventions](/reference/schemas) explain evidence states, empty lists and extensions.

| Field                                       | Type           | Presence | Meaning and constraints                                                           |
| ------------------------------------------- | -------------- | -------- | --------------------------------------------------------------------------------- |
| `v`                                         | number         | Required | v recorded for this result.                                                       |
| `observation_id`                            | string / null  | Required | observation id recorded for this result.                                          |
| `state`                                     | string / null  | Required | Saved lifecycle or evidence state, as enumerated for this record.                 |
| `reason`                                    | string / null  | Required | Recorded explanation; null when no explanation applies.                           |
| `source_url`                                | string / null  | Required | Publisher page URL recorded in this evidence.                                     |
| `final_url`                                 | string / null  | Required | final url recorded for this result.                                               |
| `target_url`                                | string / null  | Required | Destination URL recorded in this evidence.                                        |
| `observed_at`                               | string / null  | Required | UTC timestamp of the observation used here.                                       |
| `checker_version`                           | string / null  | Required | checker version recorded for this result.                                         |
| `evidence_method`                           | string         | Required | evidence method recorded for this result.                                         |
| `rendered`                                  | boolean        | Required | rendered recorded for this result.                                                |
| `evidence`                                  | object         | Required | Retained publisher evidence. Treat all publisher text and HTML as untrusted data. |
| `evidence.key`                              | string / null  | Required | Saved lookup identifier within this record.                                       |
| `evidence.sha256`                           | string / null  | Required | sha256 recorded for this result.                                                  |
| `evidence.bytes`                            | number / null  | Required | bytes recorded for this result.                                                   |
| `evidence.retrieval`                        | string / null  | Required | retrieval recorded for this result.                                               |
| `occurrence_count`                          | number         | Required | occurrence count recorded for this result.                                        |
| `truncated`                                 | boolean        | Required | truncated recorded for this result.                                               |
| `occurrences`                               | array          | Required | occurrences recorded for this result.                                             |
| `occurrences[].index`                       | number         | Required | index recorded for this result.                                                   |
| `occurrences[].href`                        | string / null  | Required | href recorded for this result.                                                    |
| `occurrences[].resolved_target`             | string / null  | Required | resolved target recorded for this result.                                         |
| `occurrences[].anchor`                      | string / null  | Required | anchor recorded for this result.                                                  |
| `occurrences[].rel`                         | array          | Required | rel recorded for this result.                                                     |
| `occurrences[].followed`                    | boolean        | Required | followed recorded for this result.                                                |
| `occurrences[].context`                     | string / null  | Required | context recorded for this result.                                                 |
| `occurrences[].in_captured_document`        | object / null  | Required | in captured document recorded for this result.                                    |
| `occurrences[].in_captured_document.line`   | number / null  | Optional | line recorded for this result.                                                    |
| `occurrences[].in_captured_document.column` | number / null  | Optional | column recorded for this result.                                                  |
| `occurrences[].in_captured_document.offset` | number / null  | Optional | offset recorded for this result.                                                  |
| `occurrences[].open_at`                     | string / null  | Required | open at recorded for this result.                                                 |
| `page_directives`                           | object / null  | Required | page directives recorded for this result.                                         |
| `page_directives.noindex`                   | boolean / null | Required | noindex recorded for this result.                                                 |
| `page_directives.nofollow`                  | boolean / null | Required | nofollow recorded for this result.                                                |
| `page_directives.indexing_status`           | string / null  | Required | indexing status recorded for this result.                                         |

[Download input schema](/schemas/locate_link.input.json) · [Download output schema](/schemas/locate_link.output.json)

## Errors and retries

The command is annotated idempotent. Reuse an accepted idempotency key when the input provides one; changing the payload under a reused key can conflict. Operation-specific errors include `OBSERVATION_NOT_FOUND`, `OBSERVATION_UNREADABLE`.

See [error recovery](/reference/errors) for status, scope, cooldown, cursor and retry handling. Unknown observations are result data and do not establish loss.

## HTTP resource routes

These existing resource routes share the operation’s domain behavior. Their parameter placement, status and response envelope can differ from generic invocation. See [HTTP route details](/reference/http/routes).

| Method and route                              | Success | Details                                          |
| --------------------------------------------- | ------- | ------------------------------------------------ |
| `GET /v1/observations/{observationId}/locate` | 200     | Remaining read arguments go in query parameters. |

## Continue

[get\_link\_evidence](/reference/commands/get_link_evidence)

Follow the [related workflow](/guides/monitor-changes), inspect [capability status](/capability-status), or return to the [command index](/reference/index).
