{
  "openapi": "3.0.1",
  "info": {
    "title": "Regulatory Page Change Monitor – Diffs & Alerts",
    "description": "Regulatory page change monitor for legal, policy and government pages: get only what was added, changed or removed, with a readable line-level diff, webhook alerts and audit-ready records. Filters cookie banners, ads, timestamps and counters; works for price and competitor pages too.",
    "version": "0.1",
    "x-build-id": "4XC6077iAEW1hxiii"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lwsdjfls~regulatory-page-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lwsdjfls-regulatory-page-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/lwsdjfls~regulatory-page-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-lwsdjfls-regulatory-page-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/lwsdjfls~regulatory-page-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-lwsdjfls-regulatory-page-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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "URLs to monitor",
            "minItems": 1,
            "type": "array",
            "description": "Pages to watch. With a crawl depth above 0, these are the start pages of the crawl.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "monitorMode": {
            "title": "What to monitor",
            "enum": [
              "fullText",
              "selectors",
              "list"
            ],
            "type": "string",
            "description": "Full page text: any visible text change. Specific elements: only the CSS/XPath selectors below. List or table: every item is tracked separately, so you see exactly which products, rows or publications were added, changed or removed.",
            "default": "fullText"
          },
          "selectors": {
            "title": "Elements to monitor",
            "type": "array",
            "description": "For \"Specific elements\". CSS selectors (e.g. .product-price) or XPath (starting with / or prefixed with xpath:). Use an attribute to monitor for example a link (href) instead of the text.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "title": "Name",
                  "type": "string",
                  "editor": "textfield",
                  "description": "Field name in the output, e.g. price.",
                  "pattern": "^[\\w-]{1,40}$"
                },
                "selector": {
                  "title": "Selector",
                  "type": "string",
                  "editor": "textfield",
                  "description": "CSS selector or XPath.",
                  "minLength": 1
                },
                "attribute": {
                  "title": "Attribute",
                  "type": "string",
                  "editor": "textfield",
                  "description": "Optional. Monitor this attribute instead of the text.",
                  "minLength": 1
                },
                "optional": {
                  "title": "Optional",
                  "type": "boolean",
                  "editor": "checkbox",
                  "description": "Do not treat a missing element as a site structure change.",
                  "default": false
                }
              },
              "required": [
                "name",
                "selector"
              ]
            },
            "default": []
          },
          "listSelector": {
            "title": "List item selector",
            "minLength": 1,
            "type": "string",
            "description": "For \"List or table\". Selector that matches one item, e.g. .product-card or table.results tbody tr."
          },
          "listFields": {
            "title": "Item fields",
            "type": "array",
            "description": "Optional. Fields inside each item, e.g. title and price. Without fields, the whole item text is monitored.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "title": "Name",
                  "type": "string",
                  "editor": "textfield",
                  "description": "Field name in the output, e.g. price.",
                  "pattern": "^[\\w-]{1,40}$"
                },
                "selector": {
                  "title": "Selector",
                  "type": "string",
                  "editor": "textfield",
                  "description": "CSS selector or XPath, relative to the item.",
                  "minLength": 1
                },
                "attribute": {
                  "title": "Attribute",
                  "type": "string",
                  "editor": "textfield",
                  "description": "Optional. Use this attribute instead of the text.",
                  "minLength": 1
                },
                "optional": {
                  "title": "Optional",
                  "type": "boolean",
                  "editor": "checkbox",
                  "description": "Allow this field to be empty in every item.",
                  "default": false
                }
              },
              "required": [
                "name",
                "selector"
              ]
            },
            "default": []
          },
          "listKeyField": {
            "title": "Item key field",
            "minLength": 1,
            "type": "string",
            "description": "Optional. Name of the item field that identifies an item, e.g. sku. By default the first link in the item is used, or its text."
          },
          "noiseFilters": {
            "title": "Noise filters",
            "type": "array",
            "description": "What never counts as a change. The defaults remove cookie banners, ads, hidden elements, clock times, relative times, counters, session tokens, tracking parameters and shuffled carousels. See the README for exactly what each filter does.",
            "items": {
              "type": "string",
              "enum": [
                "cookie-banners",
                "ads",
                "hidden-elements",
                "timestamps",
                "relative-times",
                "counters",
                "tokens",
                "tracking-params",
                "unordered-carousels",
                "dates",
                "navigation",
                "live-regions"
              ],
              "enumTitles": [
                "Cookie banners and consent dialogs",
                "Advertisements",
                "Hidden elements",
                "Clock times and timestamps",
                "Relative times (\"5 minutes ago\")",
                "View, like and visitor counters",
                "Session ids, CSRF tokens, random strings",
                "Tracking and session parameters in URLs",
                "Randomly ordered carousels",
                "Calendar dates (off by default)",
                "Navigation, header and footer (off by default)",
                "Live regions, tickers and timers (off by default)"
              ]
            },
            "default": [
              "cookie-banners",
              "ads",
              "hidden-elements",
              "timestamps",
              "relative-times",
              "counters",
              "tokens",
              "tracking-params",
              "unordered-carousels"
            ]
          },
          "ignoreSelectors": {
            "title": "Ignore elements",
            "type": "array",
            "description": "CSS selectors of extra elements to ignore, e.g. .stock-counter or #recently-viewed.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "ignoreTextPatterns": {
            "title": "Ignore text patterns",
            "type": "array",
            "description": "Regular expressions for text to ignore, e.g. Order #\\d+ or /visitors: \\d+/i.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "minChangedCharacters": {
            "title": "Minimum changed characters",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Only report a change when at least this many characters were added or removed. Smaller edits accumulate until they pass the threshold. 0 reports every change.",
            "default": 0
          },
          "crawlDepth": {
            "title": "Crawl depth",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "0 monitors only the URLs above. 1 also monitors pages they link to, and so on. Pages that disappear from the crawl are reported as removed.",
            "default": 0
          },
          "maxPagesPerStartUrl": {
            "title": "Maximum pages per start URL",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Crawl limit per start URL. When it is reached, removals are not reported for that URL in that run.",
            "default": 50
          },
          "includeUrlPatterns": {
            "title": "Include URL patterns",
            "type": "array",
            "description": "Glob patterns of links to follow, e.g. https://example.com/blog/**. By default links on the same host are followed.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "excludeUrlPatterns": {
            "title": "Exclude URL patterns",
            "type": "array",
            "description": "Glob patterns of links never to follow, e.g. **/tag/**.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "renderJavaScript": {
            "title": "Render JavaScript",
            "type": "boolean",
            "description": "Load pages in a headless browser. Only needed for pages that show their content with JavaScript; it is slower and uses more memory (2 GB by default).",
            "default": false
          },
          "waitForSelector": {
            "title": "Wait for selector",
            "minLength": 1,
            "type": "string",
            "description": "With JavaScript rendering: wait until this CSS selector exists before reading the page."
          },
          "waitForMillis": {
            "title": "Extra wait (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "With JavaScript rendering: extra time to wait after the page loaded.",
            "default": 0
          },
          "reportBaseline": {
            "title": "List what is monitored on the first run",
            "type": "boolean",
            "description": "On the first check of a URL, add one free \"baseline\" record per monitored page or list item, so you can verify your selectors. Baseline records are not changes and are never charged. Turn off to receive only real changes.",
            "default": true
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. Receives a JSON summary (counts, one line per change, dataset link) whenever a run finds changes. Stored encrypted, because a webhook URL often contains a secret token."
          },
          "maxChangesPerRun": {
            "title": "Maximum changes per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on reported (and charged) changes in one run. Anything above it is reported in the next run.",
            "default": 500
          },
          "maxPagesPerRun": {
            "title": "Maximum pages per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on checked (and charged) pages in one run.",
            "default": 1000
          },
          "onStructureChange": {
            "title": "When a page structure changes",
            "enum": [
              "failRun",
              "skipUrl"
            ],
            "type": "string",
            "description": "What to do when a selector no longer matches (for example after a redesign). This is never reported as \"everything removed\".",
            "default": "failRun"
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Separates independent monitors. Defaults to the task ID, so every saved task keeps its own history. Stored encrypted, because it often names a customer."
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Pages loaded in parallel. Requests to the same host are also limited to 2 per second.",
            "default": 5
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for one attempt to load a page. A page that times out is tried again. A page started close to the run's timeout gets less time to load, at least 5 seconds.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Most sites work without a proxy. Use one for sites that block data center traffic.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}