{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Change Monitor — Page Diffs, Alerts & Webhooks",
    "description": "Watch any list of web pages on a schedule. Every run returns one row per page and, when a page changed, a row with the added and removed lines, a similarity score and your keyword hits. Title, links and status too. Optional webhook. No browser, no API key, no per-site setup.",
    "version": "0.1",
    "x-build-id": "wMDfdcF101fcUUeaC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/insight.solutions~website-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-insight.solutions-website-change-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/insight.solutions~website-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-insight.solutions-website-change-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/insight.solutions~website-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-insight.solutions-website-change-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Pages to watch",
            "type": "array",
            "description": "One URL per entry, `http://` or `https://`. A missing scheme becomes `https://`, a `#fragment` is dropped (it never reaches the server) and a `?query` is kept, because `?page=2` is a different page. The same page written twice is watched once. Each page keeps its own snapshot between runs.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "monitor",
              "snapshot"
            ],
            "type": "string",
            "description": "`monitor` compares each page with the snapshot the previous run left and stores the new one. `snapshot` only fetches and extracts: one `page-check` row per page, no comparison, and the state store is never opened.",
            "default": "monitor"
          },
          "firstRunBehavior": {
            "title": "First run behaviour",
            "enum": [
              "baseline-only",
              "emit-all"
            ],
            "type": "string",
            "description": "What to do the first time a page is seen, when there is nothing to compare it with. `baseline-only` stores the snapshot and writes one `page-check` row with `isBaseline: true`. `emit-all` also writes a `change` row of type `new` carrying the whole text, which is billed as a change.",
            "default": "baseline-only"
          },
          "watch": {
            "title": "What to compare",
            "type": "array",
            "description": "`text` is the readable content — navigation, footers and cookie banners stripped. `title` and `metaDescription` are the page's own. `links` is the set of same-site links in the readable content. `status` is the HTTP status and, when the page redirects, where to. `html` is a hash of the raw HTML: every byte counts, so it fires on things you cannot see and is off by default. Every facet is stored on every run, so switching one on later compares with a real earlier reading.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "title",
                "metaDescription",
                "links",
                "status",
                "html"
              ],
              "enumTitles": [
                "Readable text",
                "Page title",
                "Meta description",
                "Same-site links",
                "HTTP status and redirect target",
                "Raw HTML hash (noisy)"
              ]
            },
            "default": [
              "text"
            ]
          },
          "ignore": {
            "title": "Ignore lines matching",
            "type": "array",
            "description": "Regular expressions (JavaScript syntax). A line of text that matches any of them is left out before the page is hashed and compared — use it for timestamps, view counters and \"last updated\" lines. A plain pattern is case-insensitive; write `/pattern/flags` to choose the flags yourself. An invalid pattern is a free diagnostic row and the run carries on without it. Adding or removing a pattern never reports the lines it affects as a change.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Only alert on these keywords",
            "type": "array",
            "description": "Case-insensitive. When set, a change row is written only if one of these appears in the lines the change added or removed; `keywordsAdded` and `keywordsRemoved` say which. Leave empty to report every change. The `page-check` row still says `changed: true` when a change was filtered out.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minChangePercent": {
            "title": "Minimum text change (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Skip text changes smaller than this share of the page, measured as `100 × (1 − similarity)`. `2` quiets a counter ticking over on a long page. Applies to the text facet only: a new title or a new redirect is news at any size.",
            "default": 0
          },
          "includeText": {
            "title": "Include the full text",
            "type": "boolean",
            "description": "Put the page's full compared text (up to \"Maximum text length\") in the `text` column of `page-check` and `change` rows. Change rows always carry the added and removed lines either way.",
            "default": false
          },
          "maxTextChars": {
            "title": "Maximum text length (characters)",
            "minimum": 1000,
            "maximum": 200000,
            "type": "integer",
            "description": "How much of each page is kept and compared. Longer pages are compared on their first this-many characters, cut at a whole line, and their rows say `truncated: true` — a change further down is not seen.",
            "default": 20000
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. When a run finds at least one change, POST one JSON payload with every change row to this URL (fitted to 256 KB). Ten-second timeout, one retry, and a redirect to another host is never followed. The URL is treated as a secret: only its host is ever logged. A failed POST is a free `webhook` row and never fails the run.",
            "default": ""
          },
          "maxUrls": {
            "title": "Maximum pages per run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Pages past this many are not checked and not charged; one free row says how many were left out.",
            "default": 100
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Name of the key-value store that keeps each page's last snapshot between runs. The Actor creates it on its first run and reads it back on every run after. Keep one per watchlist: two schedules sharing a store would compare with the same snapshots, so the second run stops with a clear message instead of double-reporting.",
            "default": "website-change-monitor-state"
          },
          "maxConcurrency": {
            "title": "Pages in parallel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages are read at once. Requests to one host are always at least one second apart, whatever this says, so it speeds up a list that spans many sites, not fifty pages on one.",
            "default": 5
          },
          "maxRunSecs": {
            "title": "Run time budget (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "Wall-clock budget for the whole run. When it is reached the Actor stops fetching, keeps and bills what it already delivered, and writes a free `deadline` row for each page it did not reach — those pages keep their snapshots.",
            "default": 240
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Ordinary web pages answer Apify's datacenter proxy, which is the default and is already inside the event prices. A site that refuses datacenter addresses comes back as a free `blocked` row; the RESIDENTIAL group helps with some of those.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}