{
  "openapi": "3.0.1",
  "info": {
    "title": "Page Change Monitor: Text Diff & Change Alerts API",
    "description": "Watch any web page (or one CSS section of it) for text changes. Each run returns changed true/false, a clean line diff (added/removed lines), a short summary and stable JSON for agents, MCP, schedules and webhooks. Ignores timestamps, ads and counters. $0.001 per page check.",
    "version": "0.1",
    "x-build-id": "FKvVtDDAFErBXLF3j"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tallowlanelabs~page-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tallowlanelabs-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/tallowlanelabs~page-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-tallowlanelabs-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/tallowlanelabs~page-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-tallowlanelabs-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",
        "properties": {
          "urls": {
            "title": "Pages to watch",
            "type": "array",
            "description": "One URL per line (http or https). Only these exact pages are fetched: no crawling, no link following. Each URL is compared with its own stored snapshot. Optional: leave empty to run a quick demo on two stable public example pages.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "pages": {
            "title": "Per-page settings (advanced)",
            "type": "array",
            "description": "Optional extra pages with their own settings, e.g. [{\"url\": \"https://acme.com/pricing\", \"selector\": \"#plans\", \"label\": \"Acme pricing\", \"ignorePatterns\": [\"Updated .*\"], \"minCheckIntervalMinutes\": 1440}]. Supported keys: url, label, selector, regionStart, regionEnd, ignoreSelectors, ignorePatterns, minCheckIntervalMinutes. Per-page ignore rules are added to the global ones.",
            "default": []
          },
          "selector": {
            "title": "CSS selector (optional)",
            "type": "string",
            "description": "Only watch the part of each page matched by this CSS selector (for example main, #pricing, .changelog article:first-of-type). If it matches nothing, the page is reported as selectorNotFound, not charged, and its snapshot is kept. Leave empty for the whole visible page."
          },
          "regionStart": {
            "title": "Text region: start at line containing",
            "type": "string",
            "description": "Optional. Only watch text from the first line containing this text (case-insensitive) ..."
          },
          "regionEnd": {
            "title": "Text region: stop before line containing",
            "type": "string",
            "description": "... up to (not including) the next line containing this text. Leave empty to watch to the end."
          },
          "ignoreSelectors": {
            "title": "Ignore elements (CSS selectors)",
            "type": "array",
            "description": "Elements removed before comparing, e.g. .ticker, #comments, .related-posts. Added to the built-in noise list (ads, cookie banners) unless that is turned off below.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "ignorePatterns": {
            "title": "Ignore text (regular expressions)",
            "type": "array",
            "description": "Text masked before comparing, matched per line (case-insensitive; or write /pattern/flags). A line that ends up empty is dropped. Example: \"Last refreshed .*\" or \"^Sponsored.*$\". Added to the built-in patterns unless turned off below.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "useDefaultIgnoreRules": {
            "title": "Use built-in noise rules",
            "type": "boolean",
            "description": "Built-in rules ignore clock times (12:34 PM, 17:35 UTC), ISO timestamps, relative times (\"5 minutes ago\"), view/like/comment counters, ad slots and cookie/consent banners. Calendar dates are NOT ignored, so a changed \"Last updated\" date counts as a change. Changing any ignore rule re-baselines a page (reported as baselineReset, no false change).",
            "default": true
          },
          "minCheckIntervalMinutes": {
            "title": "Minimum check interval (minutes)",
            "minimum": 5,
            "maximum": 525600,
            "type": "integer",
            "description": "A page is fetched at most once per this many minutes (per URL and selector), however often the Actor runs; earlier runs report it as tooSoon (not fetched, not charged). Minimum 5. A 10% early-start tolerance (max 5 min) lets an hourly schedule work with 60.",
            "default": 60
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "all",
              "changesOnly"
            ],
            "type": "string",
            "description": "\"all\" (default) writes one record per page every run. \"changesOnly\" writes only changed pages plus pages that could not be checked; unchanged pages are still charged as page checks and listed in RUN_SUMMARY.",
            "default": "all"
          },
          "includeText": {
            "title": "Include the full current text",
            "type": "boolean",
            "description": "Add the page's cleaned text (one line per block) to each checked record as \"text\". Off by default to keep records small.",
            "default": false
          },
          "maxDiffLines": {
            "title": "Max diff lines per side",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "At most this many added and this many removed lines are listed per record (counts are always exact; diff.truncated says when lines were cut).",
            "default": 200
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Read each site's robots.txt once a day (cached) and skip pages it disallows (status robotsDisallowed, not charged). Turn off only for pages you own or have permission to monitor.",
            "default": true
          },
          "domainDelayMs": {
            "title": "Delay between requests to the same site (ms)",
            "minimum": 1000,
            "maximum": 60000,
            "type": "integer",
            "description": "Requests to one host are sent one at a time with at least this gap (minimum 1,000 ms). Different sites are checked in parallel.",
            "default": 2000
          },
          "maxConcurrency": {
            "title": "Max parallel requests (all sites)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Overall cap on requests in flight across different sites.",
            "default": 4
          },
          "timeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Per page. Slow pages are retried once on a network error; blocks (403/429/captcha/challenge) are never retried.",
            "default": 30
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store that keeps each page's last snapshot between runs (keyed by a hash of URL + selector + region). Use a different name or key prefix to run independent monitors.",
            "default": "page-change-monitor-state"
          },
          "stateKeyPrefix": {
            "title": "State key prefix",
            "type": "string",
            "description": "Optional prefix for snapshot keys, so several schedules can share one store without sharing snapshots.",
            "default": ""
          },
          "resetState": {
            "title": "Reset snapshots",
            "type": "boolean",
            "description": "Ignore stored snapshots for the pages in this run: every page becomes a first check (new baseline). The minimum check interval still applies.",
            "default": false
          },
          "failIfAllUrlsFail": {
            "title": "Fail the run if every page fails",
            "type": "boolean",
            "description": "Mark the run as failed when no page could be checked because of invalid URLs, network or HTTP errors (tooSoon, blocked and robots skips never fail a run).",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}