{
  "openapi": "3.0.1",
  "info": {
    "title": "Visual Change Detector - Website Screenshot Diff Monitor",
    "description": "Monitor websites for visual changes. Takes Playwright screenshots, compares them with the previous run (or staging vs production) pixel by pixel, stores a highlighted diff image and reports % changed plus a visible-text diff.",
    "version": "1.0",
    "x-build-id": "adJT5D4nbhMiisaZg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/freecamp008~visual-change-detector/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-freecamp008-visual-change-detector",
        "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/freecamp008~visual-change-detector/runs": {
      "post": {
        "operationId": "runs-sync-freecamp008-visual-change-detector",
        "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/freecamp008~visual-change-detector/run-sync": {
      "post": {
        "operationId": "run-sync-freecamp008-visual-change-detector",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "monitor",
              "compare"
            ],
            "type": "string",
            "description": "<b>monitor</b>: compare each URL with the baseline screenshot saved by the previous run (first run creates the baseline). <b>compare</b>: compare two URLs with each other (e.g. staging vs production) using <code>comparePairs</code>.",
            "default": "monitor"
          },
          "urls": {
            "title": "URLs to monitor",
            "type": "array",
            "description": "Pages to screenshot and compare with their previous baseline (monitor mode). One result per URL.",
            "items": {
              "type": "string"
            }
          },
          "comparePairs": {
            "title": "Compare pairs (compare mode)",
            "type": "array",
            "description": "Pairs of pages to compare with each other, e.g. <code>[{\"urlA\": \"https://staging.example.com\", \"urlB\": \"https://example.com\"}]</code>. URL A is treated as the reference (\"baseline\"), URL B as the current screenshot. One result per pair."
          },
          "baselineStoreName": {
            "title": "Baseline store name",
            "type": "string",
            "description": "Name of the key-value store where baselines are kept between runs (monitor mode). Use different names to keep separate baseline sets, e.g. per project or environment.",
            "default": "visual-change-baselines"
          },
          "updateBaseline": {
            "title": "Update baseline after each check",
            "type": "boolean",
            "description": "If enabled, the new screenshot replaces the baseline after comparing, so the next run compares with this run. Disable to always compare with a fixed (approved) baseline. A missing baseline is always created.",
            "default": true
          },
          "viewportWidth": {
            "title": "Viewport width (px)",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Browser viewport width in CSS pixels.",
            "default": 1366
          },
          "viewportHeight": {
            "title": "Viewport height (px)",
            "minimum": 240,
            "maximum": 2160,
            "type": "integer",
            "description": "Browser viewport height in CSS pixels (also the screenshot height when full page is off).",
            "default": 768
          },
          "fullPage": {
            "title": "Full-page screenshot",
            "type": "boolean",
            "description": "Capture the whole scrollable page instead of only the visible viewport. Ignored when a selector is set.",
            "default": true
          },
          "selector": {
            "title": "Element selector",
            "type": "string",
            "description": "Optional CSS selector - screenshot (and text-diff) only this element, e.g. <code>#pricing</code> or <code>main</code>."
          },
          "hideSelectors": {
            "title": "Hide elements (CSS selectors)",
            "type": "array",
            "description": "CSS selectors of elements to hide before the screenshot (<code>visibility: hidden</code>), e.g. ads, chat widgets, clocks, rotating banners or other dynamic content that would cause false alarms.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "blockCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Inject CSS that hides common cookie consent banners (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast, TrustArc, Osano, CookieYes, Complianz and more).",
            "default": true
          },
          "waitForSelector": {
            "title": "Wait for selector",
            "type": "string",
            "description": "Optional CSS selector to wait for before taking the screenshot (useful for single-page apps)."
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Extra wait after the page has loaded, before the screenshot (lets animations, fonts and lazy content settle).",
            "default": 500
          },
          "navigationTimeoutSecs": {
            "title": "Navigation timeout (s)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time to wait for the page to load.",
            "default": 45
          },
          "threshold": {
            "title": "Pixel color threshold",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Pixelmatch color sensitivity from 0 to 1: how different two pixel colors must be to count as changed. Lower = more sensitive. 0.1 is a good default.",
            "default": 0.1
          },
          "changeThresholdPercent": {
            "title": "Change threshold (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "A page is reported as <code>changed</code> when more than this percentage of pixels differ. Raise it to ignore tiny rendering noise.",
            "default": 0.5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy for loading the pages (e.g. Apify Proxy for geo-specific or protected sites).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}