{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Change Monitor – Text Diff, Links & Status Alerts",
    "description": "Watch a list of web pages (or a CSS selector per page) and see what changed since the last run: added and removed lines as a unified diff, change ratio, HTTP status changes, new and removed links. First run creates the baseline. Ignore patterns and change threshold.",
    "version": "0.1",
    "x-build-id": "RxEXEwywuspchQYvn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/adamplaenitz~website-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-adamplaenitz-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/adamplaenitz~website-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-adamplaenitz-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/adamplaenitz~website-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-adamplaenitz-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",
        "properties": {
          "urls": {
            "title": "Pages to monitor",
            "type": "array",
            "description": "One URL per line. To watch only part of a page, add a CSS selector after a space, e.g. `https://example.com/pricing #plans`. Without a selector the main text content is compared (or the whole page, see below).",
            "default": [
              "https://example.com",
              "https://crawlee.dev"
            ],
            "items": {
              "type": "string"
            }
          },
          "watchListName": {
            "title": "Watch list name",
            "type": "string",
            "description": "The previous state is remembered per watch list. Use a different name for every task or schedule (letters, digits, dashes), e.g. `competitor-pricing`.",
            "default": "default"
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "all",
              "changes"
            ],
            "type": "string",
            "description": "All URLs: one row per URL with its status (new / changed / unchanged / error) – good for reports. Only changes: rows only for new, changed or failed URLs – good for alerts (e-mail, Slack, webhooks on new dataset items).",
            "default": "all"
          },
          "cssSelector": {
            "title": "CSS selector for all URLs",
            "type": "string",
            "description": "Optional. Compare only the elements matching this selector on every page (a selector written after a URL takes precedence), e.g. `main article` or `.price`."
          },
          "contentScope": {
            "title": "Content without selector",
            "enum": [
              "main",
              "body"
            ],
            "type": "string",
            "description": "Main content: the <main>/article area, or the page without header, navigation and footer – fewer false alarms. Whole page: all visible text of the body.",
            "default": "main"
          },
          "ignorePatterns": {
            "title": "Ignore text matching",
            "type": "array",
            "description": "Optional regular expressions (case-insensitive). Matching text is removed before comparing, e.g. timestamps `\\d{1,2}:\\d{2}(:\\d{2})?`, dates `\\d{4}-\\d{2}-\\d{2}` or counters `\\d+ (views|comments)`.",
            "items": {
              "type": "string"
            }
          },
          "minChangePercent": {
            "title": "Minimum change (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Report content changes only if at least this share of lines changed (0 = every change). Smaller changes are not saved as the new baseline, so they add up until they cross the threshold.",
            "default": 0
          },
          "trackLinks": {
            "title": "Track added / removed links",
            "type": "boolean",
            "description": "Also compare the links (href) inside the monitored content and report new and removed links.",
            "default": false
          },
          "includeContent": {
            "title": "Include current text",
            "type": "boolean",
            "description": "Adds the current text of the monitored content (up to 50,000 characters) to each row.",
            "default": false
          },
          "maxDiffLines": {
            "title": "Maximum diff lines",
            "minimum": 10,
            "maximum": 5000,
            "type": "integer",
            "description": "The unified diff in each row is truncated after this many lines.",
            "default": 200
          },
          "resetBaseline": {
            "title": "Reset baseline",
            "type": "boolean",
            "description": "Forget the stored state of these URLs and report them as new.",
            "default": false
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Time to wait for each page (one retry on timeouts and server errors).",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Only needed if a website blocks requests from cloud servers.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}