{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Change Monitor: Detect Page & Text Changes",
    "description": "Checks a list of URLs and returns only the pages whose content changed since the last run: unified diff, added/removed lines, SHA-256 hashes. Optional CSS selector, keyword triggers and ignore regexes. Plain HTTP, respects robots.txt. $0.001 per URL checked, $0.005 per change.",
    "version": "0.1",
    "x-build-id": "Dk3ehVi0rliG41Vga"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/opendata-tools~website-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-opendata-tools-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/opendata-tools~website-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-opendata-tools-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/opendata-tools~website-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-opendata-tools-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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Pages to watch",
            "type": "array",
            "description": "Pages to check. To watch only part of one page, add a selector to that URL via the API/JSON input as {\"url\": \"...\", \"selector\": \"#main\"} (or userData.selector).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of this watch list. Snapshots are kept in a named key-value store in your own account (website-change-monitor-<name>), so different watch lists don't clash. Keep it the same between scheduled runs.",
            "default": "default"
          },
          "selector": {
            "title": "CSS selector (all pages)",
            "type": "string",
            "description": "Optional. Only compare the part of each page matching this CSS selector, e.g. main, #pricing, .job-list. A per-URL selector overrides this."
          },
          "mode": {
            "title": "Compare",
            "enum": [
              "text",
              "html"
            ],
            "type": "string",
            "description": "Visible text ignores whitespace, scripts, styles and comments. HTML compares the markup itself.",
            "default": "text"
          },
          "keywords": {
            "title": "Keyword triggers",
            "type": "array",
            "description": "Optional. If set, a change is only reported when one of these keywords appears or disappears (case-insensitive). Leave empty to report every change.",
            "items": {
              "type": "string"
            }
          },
          "keywordTrigger": {
            "title": "Keyword trigger",
            "enum": [
              "any",
              "appears",
              "disappears"
            ],
            "type": "string",
            "description": "Which keyword movement counts as a change.",
            "default": "any"
          },
          "ignorePatterns": {
            "title": "Ignore patterns",
            "type": "array",
            "description": "Optional regular expressions (case-insensitive) removed from the text before comparing, for dates, counters, timestamps, etc. Example: \\d{1,2}:\\d{2} or Updated .* ago. Invalid regexes are matched as plain text.",
            "items": {
              "type": "string"
            }
          },
          "outputBaseline": {
            "title": "Output baseline on first run",
            "type": "boolean",
            "description": "On the first check of a page there is nothing to compare with. By default it is silently recorded. Turn on to also output it (changeType = baseline, not charged as a change).",
            "default": false
          },
          "resetBaseline": {
            "title": "Reset baseline",
            "type": "boolean",
            "description": "Ignore saved snapshots and record a fresh baseline for every page in this run.",
            "default": false
          },
          "maxUrls": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Only the first N pages are checked.",
            "default": 100
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Pages checked in parallel. Requests to the same site are always made one at a time.",
            "default": 5
          },
          "perHostDelaySecs": {
            "title": "Delay between requests to the same site (seconds)",
            "minimum": 0.5,
            "maximum": 30,
            "type": "number",
            "description": "Politeness gap per host. A longer Crawl-delay in robots.txt is respected (up to 10 s).",
            "default": 1
          },
          "maxDiffChars": {
            "title": "Max diff length (characters)",
            "minimum": 500,
            "maximum": 50000,
            "type": "integer",
            "description": "The unified diff in each result is cut to this length.",
            "default": 4000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}