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

# Fields to Track

A monitor's `fields` say what a check compares. Each one is a path into the API response. A check keeps only those fields, in the shape of the response, and reports a change when they differ from the previous check.

Most responses worth watching are lists: Zillow's `properties`, a SERP's `organicResults`, Indeed's `jobs`. A list is tracked by the field that tells its items apart, written in square brackets:

```json theme={null}
{
  "fields": [
    { "path": "properties", "list": { "keys": ["id"], "fields": ["price", "status"] } },
    { "path": "searchInformation.totalResults" }
  ]
}
```

This watches every listing by its `id`: a listing that appears or disappears is a change, and so is a new `price` or `status` on a listing that stayed. It also watches the total count as a single value.

## Reading a Field

The dashboard writes fields as short lines; the API takes the same rule as JSON.

| Line | JSON | A check reports |
| - | - | - |
| `product.price.currentPrice` | `{ "path": "product.price.currentPrice" }` | The value changed. |
| `properties[id]` | `{ "path": "properties", "list": { "keys": ["id"], "fields": [] } }` | A listing appeared or disappeared. |
| `properties[id].price` | `{ "path": "properties", "list": { "keys": ["id"], "fields": ["price"] } }` | The same, plus `price` changing on a listing that stayed. |
| `localResults.places[title,address].rating` | `{ "path": "localResults.places", "list": { "keys": ["title", "address"], "fields": ["rating"] } }` | Composite key: a place is the same place when both match. |
| `product.images[]` | `{ "path": "product.images", "list": { "keys": [], "fields": [] } }` | No key: items are compared by content. Added and removed only. |
| `products[handle].variants.price` | `{ "path": "products", "list": { "keys": ["handle"], "fields": ["variants.price"] } }` | A field inside a list in each item; see [below](#fields-inside-an-items-lists). |

> [!NOTE]
>
> The API takes only the JSON form. The lines are how the dashboard shows and edits the same rules.

Leave `fields` out and the monitor tracks the endpoint's [default fields](#suggested-and-default-fields). Send `fields: []` to compare the whole response instead, less its `requestMetadata`. Web Scraping takes no fields: it always compares the page as markdown, or the data your `aiExtractRules` extracted.

A field that is missing from the response is kept as `null`, so a field appearing or disappearing is a change too.

## Lists in Detail

* `keys`: the item fields that tell items apart. With keys, a check reports items that were **added**, **removed**, and **changed** (an item with the same key whose tracked fields differ). Order never matters, so an item that only moved up or down is not a change.
* `fields`: the item fields to compare. Empty, the whole item is kept, but only the keys are hashed: a listing whose price moved is not a change, only a listing that appeared or disappeared is.
* No keys (`[]`): items are compared by content, as a multiset. Strings and numbers count as items.
* No `list` at all (`{ "path": "properties" }`): the whole array is one value, and any difference inside it is a change.

An item whose keys are all empty (a short video with no `videoId`, a news cluster with no `link`) is matched by its content instead, so such items are not taken for one another.

Two entries for one list merge into one rule: `properties[id].price` and `properties[id].status` as separate entries become `fields: ["price", "status"]`. An entry with `fields: []` absorbs the others. Two different keys for one list, or a path tracked both with and without `list`, are refused with `400`.

### Fields Inside an Item's Lists

An item field can go through a list inside the item. `products[handle].variants.price` on Shopify reads the price of every variant of a product, as an array:

```json theme={null}
{ "path": "products", "list": { "keys": ["handle"], "fields": ["variants.price", "variants.compare_at_price"] } }
```

```json theme={null}
{ "handle": "allbirds-slipper", "variants": { "price": ["15.60", "15.60", "16.00"], "compare_at_price": ["52.00", "52.00", "52.00"] } }
```

A price that moves on any variant is a change; stock and other variant fields are not. In the same way, a list reached through another list (`groups.items` where `groups` is a list) joins the items of every group into one list.

## What a Snapshot Looks Like

With `{ "path": "properties", "list": { "keys": ["id"], "fields": ["price"] } }` and `{ "path": "searchInformation.totalResults" }`, a Zillow check keeps:

```json theme={null}
{
  "properties": [
    { "id": "2061234567", "price": 489000 },
    { "id": "2067654321", "price": 575000 }
  ],
  "searchInformation": { "totalResults": 2 }
}
```

`GET /monitors/{id}/resources/{resourceId}/snapshot` returns the latest one.

## What a Diff Looks Like

A changed result carries `diff`:

```json theme={null}
{
  "kind": "fields",
  "changes": [
    { "path": "searchInformation.totalResults", "before": 2, "after": 3 }
  ],
  "lists": [
    {
      "path": "properties",
      "keys": ["id"],
      "added": [{ "id": "2070000001", "price": 450000 }],
      "removed": [],
      "changed": [
        { "key": "2061234567", "changes": [{ "path": "price", "before": 489000, "after": 479000 }] }
      ]
    }
  ]
}
```

`changes` lists value changes by path; `lists` has one entry per tracked list that gained, lost or changed items. A result also carries `patch`, a unified diff of the snapshot text, for display.

Without fields the diff is `{ "kind": "object", "changes": [ … ] }`, or `{ "kind": "text", "changes": [{ "type": "added" | "removed", "value": "…" }] }` for a page as markdown.

## Suggested and Default Fields

`GET /monitors/endpoints` returns, for each endpoint, `fields.suggested` (paths worth tracking) and `fields.default`. A monitor created without `fields` gets the defaults, through the API and MCP as in the dashboard; `fields: []` compares the whole response.

```json theme={null}
{
  "id": "amazon_product",
  "fields": {
    "suggested": [
      { "path": "product.price.currentPrice" },
      { "path": "product.isAvailable" },
      { "path": "product.variants", "list": { "keys": ["asin"], "fields": [] } }
    ],
    "default": [
      { "path": "product.price.currentPrice" },
      { "path": "product.isAvailable" },
      { "path": "product.stockWarning" }
    ]
  }
}
```

## Changing Fields

`PUT /monitors/{id}` with new `fields` rebuilds the baseline from the last response the API gave for each resource: no request is made and no credits are spent. History stays; the next check compares against the new baseline.


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