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

# Change tracking

> Compare a page with the last time your API key read it. Get a status, the time of the previous read and a diff of the Markdown or of the fields you name.

`changeTracking` compares a read with the last read of the same page by the same API key. To run the check on a schedule, use [Monitors](https://docs.stophy.dev/monitors/overview). It needs an API key. Without one the call returns `400 invalidRequest`.

```bash theme={null}
curl -X POST https://api.stophy.dev/v1/scrape \
  -H "Authorization: Bearer $STOPHY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://httpbin.org/uuid",
    "formats": ["markdown", { "type": "changeTracking" }]
  }'
```

The first read returns `changeStatus: "new"`, `previousScrapeAt: null` and no diff. Send the request again:

```json theme={null}
{
  "success": true,
  "data": {
    "changeTracking": {
      "previousScrapeAt": "2026-11-17T17:45:51.219Z",
      "changeStatus": "changed",
      "visibility": "visible",
      "diff": "@@ -1,3 +1,3 @@\n {\n-  \"uuid\": \"33789d8f-642c-49f9-a333-827012a0146f\"\n+  \"uuid\": \"86a45d4a-252b-4686-a8a0-3d98b1396796\"\n }\n"
    }
  }
}
```

`changeStatus` is `new`, `changed` or `same`. A `same` read has no `diff`. Every read replaces the stored one, so the next call compares with this call.

## Fields of the format

| Field | Default | Effect |
| - | - | - |
| `type` | none | `"changeTracking"`. Required. |
| `modes` | `["git-diff"]` | `git-diff` returns a unified diff of the Markdown. `json` compares fields between this read and the last. Send both to get both. |
| `schema`, `prompt` | none | With `json` mode: the fields to compare, as a JSON Schema (up to 100 top-level fields and 32 KB) or in plain words such as `the price and the stock`. Without either, the model compares the page's main facts. |

With `json` mode, `changeTracking.json` holds each field with its `previous` and `current` value. A field with no earlier value has `null` as `previous`.

* A read is compared with the last read of the same URL with the same `location.country`, `onlyMainContent`, `includeTags`, `excludeTags` and `actions`. Change any of them and you start a new history. The comparison is kept for 30 days after the last read.
* A diff is cut at 20,000 characters.
* The page is always read live, whatever `maxAge` says.

`json` mode adds a model fee when it returns something. See [Pricing](https://docs.stophy.dev/account/pricing.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.