# Policy Change Tracker (`company.policy_changes`)

Snapshots a privacy policy, terms of service or DPA as a text hash with per-section hashes plus a structured summary of its key terms, built to run as a monitor that alerts you when the policy changes.

Docs: https://primaryapi.com/docs/api-reference/company/policy_changes

- Endpoint: `POST https://api.primaryapi.com/v1/run/company.policy_changes`
- Category: Compliance & Records · Platform: `company` · Kind: monitor · Status: live
- Price: 1 credit per call; up to 10 credits if a call is retried elsewhere. A quote’s `maxCredits` is the most a given call can cost.
- Billing unit: per successful call
- Reliability: routed to a healthy upstream and retried automatically when an attempt fails; live 30-day status: `GET https://api.primaryapi.com/v1/status/apis?sku=company.policy_changes`
- Execution: durable: may answer 202 and finish in the background; poll `GET /v1/requests/{id}`

## Input

| Field | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
| `url` | string | yes |  | max 2048 chars; format: uri | Policy page or document URL (HTML, plain text or PDF). |
| `summarize` | boolean | no | true |  | Also summarise the key terms with AI (default true). false = hashes and sections only, at 1 credit. |

Unknown fields are rejected with `400 invalid_input`. The routing controls `preferLatencyUnderMs` and `maxCredits` may be sent in the same JSON body.

## Output

When `output.found` is `true`, `output.data` has this shape:

| Field | Type | Description |
|---|---|---|
| `url` | string | URL that was requested. |
| `finalUrl` | string | URL after redirects. |
| `title` | string \| null |  |
| `lastUpdated` | string \| null | The "last updated" / "effective" date exactly as the page states it, or null when it states none. |
| `lastUpdatedDate` | string \| null | The same date as ISO 8601 (YYYY-MM-DD, or YYYY-MM when the page gives only a month). |
| `textHash` | string | "sha256:<hex>" of the normalised main text: changes whenever the wording changes. |
| `wordCount` | integer |  |
| `sections` | object[] | Headings in document order with a hash of each section, so a changed section can be pinpointed. |
| `sections[].heading` | string |  |
| `sections[].hash` | string | "sha256:<hex>" of the section text. |
| `summary` | object \| null | Key terms read with AI; null when summarize=false. |
| `summary.documentType` | enum |  |
| `summary.sellsPersonalData` | enum |  |
| `summary.sharesDataForAdvertising` | enum |  |
| `summary.usesDataToTrainAi` | enum |  |
| `summary.dataRetentionMaxDays` | integer \| null | Longest retention period the document states, in days (null when it states none). |
| `summary.deletionOnRequest` | enum |  |
| `summary.userRights` | enum[] | Rights the document grants, sorted. |
| `summary.minimumAge` | integer \| null |  |
| `summary.internationalTransfers` | enum |  |
| `summary.transferMechanisms` | enum[] | Sorted. |
| `summary.changeNoticeDays` | integer \| null | Advance notice of changes to the document, in days. |
| `summary.autoRenewal` | enum |  |
| `summary.arbitration` | enum |  |
| `summary.classActionWaiver` | enum |  |
| `summary.breachNotificationHours` | integer \| null |  |
| `summary.subprocessorNoticeDays` | integer \| null |  |
| `keyPoints` | string[] | Short statements built from `summary` in a fixed order; they change only when a summarised term changes. |
| `truncated` | boolean | The document was longer than the AI reader takes and only its most relevant parts were read. |

When the thing you asked about does not exist (or a search matches nothing) the call still succeeds: `output.found` is `false`, `output.data` is `null` and `output.reason` says why (`not_found`, `private`, `no_results`, …). Misses are free unless the notes below say misses are billed.

## Example request

```bash
curl -sS -X POST "https://api.primaryapi.com/v1/run/company.policy_changes" \
  -H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/privacy"}'
```

## Example response

_Values are placeholders that follow the output schema; `credits` is what this call would cost at the usual price._

```json
{
  "output": {
    "found": true,
    "data": {
      "url": "https://example.com/privacy",
      "finalUrl": "https://example.com/legal/privacy",
      "title": "Privacy Policy",
      "lastUpdated": "October 1, 2026",
      "lastUpdatedDate": "2026-10-01",
      "textHash": "sha256:5f2b1c0e8a7d4b3c2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e1d0c9b",
      "wordCount": 4120,
      "sections": [
        {
          "heading": "Information we collect",
          "hash": "sha256:0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f9"
        },
        {
          "heading": "How we share information",
          "hash": "sha256:1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90a"
        }
      ],
      "summary": {
        "documentType": "privacy_policy",
        "sellsPersonalData": "no",
        "sharesDataForAdvertising": "yes",
        "usesDataToTrainAi": "opt_out",
        "dataRetentionMaxDays": null,
        "deletionOnRequest": "yes",
        "userRights": [
          "access",
          "correction",
          "deletion",
          "portability"
        ],
        "minimumAge": 13,
        "internationalTransfers": "yes",
        "transferMechanisms": [
          "data_privacy_framework",
          "standard_contractual_clauses"
        ],
        "changeNoticeDays": 30,
        "autoRenewal": "not_stated",
        "arbitration": "not_stated",
        "classActionWaiver": "not_stated",
        "breachNotificationHours": null,
        "subprocessorNoticeDays": null
      },
      "keyPoints": [
        "Document type: privacy policy",
        "Sells personal data: no",
        "Shares data for advertising: yes",
        "Uses data to train AI: opt-out offered",
        "Deletion on request: yes",
        "User rights: access, correction, deletion, portability",
        "Minimum age: 13",
        "International transfers: yes (data privacy framework, standard contractual clauses)",
        "Notice of changes: 30 days"
      ],
      "truncated": false
    }
  },
  "provider": "PrimaryAPI",
  "credits": 1,
  "items": 1,
  "requestId": "req_01JBXK6Y2N9V8T4R3Q2P1M0A7Z"
}
```

## Pricing and reliability

- Usual price: 1 credit per call
- Price ceiling: up to 10 credits if a call is retried elsewhere. A quote’s `maxCredits` is the most a given call can cost; the `maxCredits` routing control caps it per call
- Live 30-day status, success rate, uptime and latency: `GET https://api.primaryapi.com/v1/status/apis?sku=company.policy_changes`

## Errors to handle

`invalid_input`, `unauthorized`, `insufficient_balance`, `key_limit_reached`, `trial_cap_reached`, `forbidden`, `not_found`, `idempotency_conflict`, `rate_limited`, `all_sources_failed`, `service_unavailable`, `timeout`. See https://primaryapi.com/docs/errors.

## Notes

Schedule it as a monitor: the output is identical between runs until the policy text changes, then textHash and the changed section hashes move; keyPoints change only when a summarised term changes. A page that does not exist is a free miss (reason not_found). Text read with AI is checked against the page: names and quotes that do not appear in it are dropped. Treat extracted facts as a starting point and confirm them in the source before relying on them. Pages are read the way a polite crawler would: robots.txt is honoured (a disallowed page is a free miss with reason robots_disallowed), requests are paced per site, and only facts, short quotes and source links are returned.

