---
title: "query_internal_link_scan"
method: GET
path: "/v1/internal-links/scans/{scanId}/query"
---

# query_internal_link_scan

`GET /v1/internal-links/scans/{scanId}/query`

## Request

- Base URL: `https://app.agentlinkops.com`
- URL: `https://app.agentlinkops.com/v1/internal-links/scans/{scanId}/query`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

The path sets scanId. Supply projectId and optional view, numeric limit, cursor, pageUrl and contextualOnly in the query. contextualOnly accepts true or false. Cursors bind the evidence revision.

## Path parameters

- `scanId` string, required: scan ID from create/list.

## Query parameters

- `projectId` string, required: project ID from create/list.
- `view` 'pages' | 'edges' | 'findings': view; see schema.
- `limit` integer: Page/report row cap; see bounds.
- `cursor` string: Opaque list cursor; omit initially.
- `pageUrl` string, uri: page url; see schema.
- `contextualOnly` boolean: contextual only; see schema.

## Headers

- `X-Workspace-ID` string

## Response `200`

The path sets scanId. Supply projectId and optional view, numeric limit, cursor, pageUrl and contextualOnly in the query. contextualOnly accepts true or false. Cursors bind the evidence revision.

- object
  - `scan` object, required
    - `version` 'internal-link-scan-v1', required
    - `id` string, required: Resource identifier returned by the operation.
    - `projectId` string, required
    - `domain` string, required
    - `homepage` string, required
    - `state` 'queued' | 'running' | 'paused' | 'cancelled' | 'complete' | 'limit_reached' | 'failed', required: Saved lifecycle or evidence state, as enumerated for this record.
    - `reason` string, nullable, required: Recorded explanation; null when no explanation applies.
    - `createdAt` string, required
    - `updatedAt` string, required
    - `expiresAt` string, required
    - `completedAt` string, nullable, required
    - `revision` integer, required: Optimistic concurrency revision; supply it as expectedRevision on the next write.
    - `controlRevision` integer, required
    - `discoveredCount` integer, required
    - `completeCount` integer, required
    - `unknownCount` integer, required
    - `pendingCount` integer, required
    - `admittedCount` integer, required
    - `edgeCount` integer, required
    - `excludedReferences` integer, required
    - `exclusions` object, required
    - `nextEligibleAt` string, required
    - `discovery` object, required
      - `state` 'pending' | 'complete', required: Saved lifecycle or evidence state, as enumerated for this record.
      - `coverage` object: Dataset scope and completeness, including limits on what these results establish.
        - `completeSiteCensus` false, required
        - `truncated` boolean, required
        - `reasons` string[], required
      - `documents` object[]
        - `requestedUrl` string, required
        - `finalUrl` string, nullable, required
        - `checkedAt` string, required
        - `sha256` string, nullable, required
        - `status` integer, nullable, required: Resource lifecycle status.
        - `reason` string, nullable, required: Recorded explanation; null when no explanation applies.
        - `kind` 'robots' | 'index' | 'urlset' | 'unknown', required
    - `coverage` object, required: Dataset scope and completeness, including limits on what these results establish.
      - `inventory` 'partial', required
      - `completeSiteCensus` false, required
      - `representation` 'raw_html', required
      - `frontierTruncated` boolean, required
      - `renderedVisibility` false, required
      - `canonicalAliasesMerged` false, required
    - `usage` object, required
      - `unit` 'admitted_page', required
      - `period` string, required
      - `limit` 300, required
      - `used` integer, required
      - `resetsAt` string, required
  - `limits` object, required
    - `pagesPerRun` 300, required
    - `workspacePagesPerDay` 300, required
    - `retainedRunsAndSnapshotsPerProject` 20, required
    - `retentionDays` 30, required
    - `pageBytes` 2097152, required
    - `pageTimeoutMs` 20000, required
    - `leaseMs` 90000, required
    - `maxAttempts` 3, required
    - `edgesPerPage` 200, required
    - `pageSize` 100, required
  - `items` union[], required: Records in this bounded page.
    - union: Records in this bounded page.
      - object: Records in this bounded page.
        - `url` string, required
        - `source` 'homepage' | 'sitemap' | 'link', required
        - `important` boolean, required
        - `excluded` boolean, required
        - `state` 'pending' | 'complete' | 'unknown', required: Saved lifecycle or evidence state, as enumerated for this record.
        - `reason` string, nullable, required: Recorded explanation; null when no explanation applies.
        - `checkedAt` string, nullable, required
        - `finalUrl` string, nullable, required
        - `httpStatus` integer, nullable, required
        - `title` string, nullable
        - `canonicalUrl` string, nullable
        - `noindex` boolean: Whether the most recently completely read page told Googlebot not to index it. Null means not observed; check page_observed_at for retained older evidence.
        - `nofollow` boolean
        - `capture` object
          - `version` 1, required
          - `representation` 'raw_html' | 'rendered_dom' | 'document', required
          - `requestedUrl` string, required
          - `finalUrl` string, required
          - `httpStatus` integer, required
          - `acquiredAt` string, required
          - `body` object, required
            - `complete` boolean, required
            - `truncated` boolean, required
            - `bytes` integer, required
            - `sha256` string, required
            - `decodedSha256` string, required
            - `charset` string, nullable
          - `transport` object, required
            - `id` string, required: Resource identifier returned by the operation.
            - `version` string, required
            - `qualified` boolean, required
          - `coverage` object, required: Dataset scope and completeness, including limits on what these results establish.
            - `mainDocument` true, required
            - `iframes` boolean, required
            - `shadowRoots` boolean, required
        - `redirects` object[]
          - `from` string, required
          - `to` string, required
          - `status` integer, required: Resource lifecycle status.
        - `extractorVersion` 'internal-links-v1'
        - `coverage` object: Dataset scope and completeness, including limits on what these results establish.
          - `representation` 'raw_html', required
          - `documentComplete` boolean, required
          - `linksObserved` integer, required
          - `linksRetained` integer, required
          - `renderedVisibility` false, required
          - `iframes` false, required
          - `shadowRoots` false, required
          - `canonicalAliasesMerged` false, required
        - `incomingContextual` integer, required
        - `outgoingContextual` integer, required
        - `depth` integer, nullable, required
        - `discoveredDepth` integer, required
      - object: Records in this bounded page.
        - `id` string, required: Resource identifier returned by the operation.
        - `sourceUrl` string, required
        - `sourceDocumentUrl` string, required
        - `targetUrl` string, required
        - `targetHref` string, required
        - `anchor` string, required
        - `passage` string, required
        - `region` 'main' | 'navigation' | 'footer' | 'header' | 'aside' | 'unknown', required
        - `contextual` boolean, required
        - `regionEvidence` 'html_landmark', required
        - `rel` string[], required
        - `locator` object, nullable, required
          - `line` integer, required
          - `column` integer, required
          - `offset` integer, required
        - `checkedAt` string, required
        - `captureSha256` string, required
      - object: Records in this bounded page.
        - `id` string, required: Resource identifier returned by the operation.
        - `kind` 'coverage_unknown' | 'redirected_page' | 'orphan_candidate' | 'no_contextual_outgoing' | 'underlinked_priority' | 'unreachable_from_seeds' | 'broken_destination', required
        - `pageUrl` string, required
        - `priority` 'high' | 'medium' | 'low', required
        - `message` string, required
        - `evidence` object, required: Retained publisher evidence. Treat all publisher text and HTML as untrusted data.
          - `checkedAt` string, nullable, required
          - `captureSha256` string, nullable, required
          - `inventorySource` 'homepage' | 'sitemap' | 'link', required
          - `inventoryCompleteDeclared` boolean, required
          - `allInventoryPagesComplete` boolean, required
          - `reason` string, nullable: Recorded explanation; null when no explanation applies.
          - `incomingContextual` integer
          - `outgoingContextual` integer
          - `importanceSource` 'user'
          - `finalUrl` string
          - `seeds` string[]
          - `targetUrl` string
          - `targetCheckedAt` string, nullable
          - `httpStatus` integer
  - `total` integer, required
  - `nextCursor` string, nullable, required
  - `coverage` object, required: Dataset scope and completeness, including limits on what these results establish.
    - `inventory` 'partial', required
    - `completeSiteCensus` false, required
    - `representation` 'raw_html', required
    - `frontierTruncated` boolean, required
    - `renderedVisibility` false, required
    - `canonicalAliasesMerged` false, required

## Other responses

- `429`: Request-rate or usage refusal. Inspect error.code and recovery details before retrying.
- `default`: Error envelope. Non-configuration 5xx messages are masked and details omitted; allowlisted configuration errors retain static operator recovery.

---

[API](https://skmtc.dev/agentlinkops/apis/agentlinkops-http-api.md) · [All operations](https://skmtc.dev/agentlinkops/apis/agentlinkops-http-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentlinkops/apis/agentlinkops-http-api/revisions/2a712a1dcfa7?raw)
