{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Performance & Visual Regression Monitor for CI",
    "description": "Run local Lighthouse audits, visual screenshot regression tests, DOM/SEO checks, and deterministic CI pass/fail monitoring with persistent baselines. Compare production with staging or monitor websites over time.",
    "version": "0.1",
    "x-build-id": "qoV3tpJAATlTV3jeH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/produkdigitalali~ci-web-regression-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-produkdigitalali-ci-web-regression-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/produkdigitalali~ci-web-regression-monitor/runs": {
      "post": {
        "operationId": "runs-sync-produkdigitalali-ci-web-regression-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/produkdigitalali~ci-web-regression-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-produkdigitalali-ci-web-regression-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": [
          "targets",
          "mode"
        ],
        "properties": {
          "targets": {
            "title": "Pages to audit",
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "description": "Up to 20 targets. In monitor mode, url is checked against a saved baseline. In compare mode, add baselineUrl for the reference page.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "Candidate/current URL",
                  "type": "string",
                  "description": "Public HTTP(S) URL to audit.",
                  "editor": "textfield"
                },
                "baselineUrl": {
                  "title": "Reference URL",
                  "type": "string",
                  "description": "Required only in compare mode, e.g. production URL when url is staging.",
                  "editor": "textfield"
                },
                "label": {
                  "title": "Label",
                  "type": "string",
                  "description": "Stable human-readable identity such as homepage or checkout.",
                  "editor": "textfield"
                }
              },
              "required": [
                "url"
              ],
              "additionalProperties": false
            }
          },
          "mode": {
            "title": "Regression mode",
            "enum": [
              "monitor",
              "compare"
            ],
            "type": "string",
            "description": "monitor compares each page with a persistent accepted baseline; compare checks baselineUrl vs url in the same run.",
            "default": "monitor"
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "mobile",
              "custom"
            ],
            "type": "string",
            "description": "Desktop/mobile emulation for screenshot capture and Lighthouse strategy, or custom viewport dimensions.",
            "default": "desktop"
          },
          "viewportWidth": {
            "title": "Viewport width",
            "minimum": 320,
            "maximum": 2560,
            "type": "integer",
            "description": "Used for desktop/custom capture. Mobile defaults to 390 unless overridden.",
            "default": 1365
          },
          "viewportHeight": {
            "title": "Viewport height",
            "minimum": 320,
            "maximum": 2560,
            "type": "integer",
            "description": "Used for desktop/custom capture. Mobile defaults to 844 unless overridden.",
            "default": 768
          },
          "fullPage": {
            "title": "Full-page screenshot",
            "type": "boolean",
            "description": "Capture the full scroll height. Off is faster and usually less noisy for CI.",
            "default": false
          },
          "pixelThreshold": {
            "title": "Per-pixel sensitivity",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "0-1 per-channel sensitivity before a pixel counts as visually different. 0.10 is a practical default.",
            "default": 0.1
          },
          "maxVisualDiffPercent": {
            "title": "Maximum visual change (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Fail when changed pixels exceed this percentage after noise controls are applied.",
            "default": 1
          },
          "hideSelectors": {
            "title": "Hide dynamic selectors",
            "maxItems": 50,
            "type": "array",
            "description": "CSS selectors hidden before screenshots, useful for clocks, ads, random banners, and live counters.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maskSelectors": {
            "title": "Mask selectors",
            "maxItems": 50,
            "type": "array",
            "description": "CSS selectors covered with a stable mask color before visual comparison.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "domSelectors": {
            "title": "DOM selectors to assert",
            "maxItems": 50,
            "type": "array",
            "description": "Optional CSS selectors whose first visible text and element count are tracked between runs.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "runLighthouse": {
            "title": "Run Lighthouse audit",
            "type": "boolean",
            "description": "Run Lighthouse locally inside the Actor by default. Google PageSpeed Insights remains available as an optional provider.",
            "default": true
          },
          "lighthouseProvider": {
            "title": "Lighthouse provider",
            "enum": [
              "local",
              "pagespeed",
              "auto"
            ],
            "type": "string",
            "description": "Local runs Lighthouse inside the Actor with bundled Node/Chromium and requires no API key. PageSpeed uses Google PageSpeed Insights. Auto tries local first and falls back to PageSpeed only when an API key is provided.",
            "default": "local"
          },
          "requireLighthouse": {
            "title": "Fail when Lighthouse is unavailable",
            "type": "boolean",
            "description": "If enabled, any selected Lighthouse provider failure becomes a CI regression. Leave off for graceful visual/DOM fallback.",
            "default": false
          },
          "lighthouseCategories": {
            "title": "Lighthouse categories",
            "maxItems": 4,
            "type": "array",
            "description": "Lighthouse categories to run for either local Lighthouse or PageSpeed Insights.",
            "items": {
              "type": "string",
              "enum": [
                "performance",
                "accessibility",
                "best-practices",
                "seo"
              ],
              "enumTitles": [
                "Performance",
                "Accessibility",
                "Best Practices",
                "SEO"
              ]
            },
            "default": [
              "performance",
              "accessibility",
              "best-practices",
              "seo"
            ]
          },
          "pagespeedApiKey": {
            "title": "Optional PageSpeed API key",
            "type": "string",
            "description": "Used only for the PageSpeed provider or Auto fallback. Encrypted and never logged."
          },
          "maxScoreDrop": {
            "title": "Maximum Lighthouse score drop",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Relative score drop allowed versus baseline before failing. Applied to available Lighthouse categories.",
            "default": 5
          },
          "minPerformanceScore": {
            "title": "Minimum performance score",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Absolute minimum 0-100. Set 0 to disable.",
            "default": 0
          },
          "minAccessibilityScore": {
            "title": "Minimum accessibility score",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Absolute minimum 0-100. Set 0 to disable.",
            "default": 0
          },
          "minBestPracticesScore": {
            "title": "Minimum best-practices score",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Absolute minimum 0-100. Set 0 to disable.",
            "default": 0
          },
          "minSeoScore": {
            "title": "Minimum SEO score",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Absolute minimum 0-100. Set 0 to disable.",
            "default": 0
          },
          "maxLcpMs": {
            "title": "Maximum LCP (ms)",
            "minimum": 0,
            "maximum": 120000,
            "type": "number",
            "description": "Optional absolute Lighthouse lab LCP ceiling. Set 0 to disable.",
            "default": 0
          },
          "maxCls": {
            "title": "Maximum CLS",
            "minimum": -1,
            "maximum": 10,
            "type": "number",
            "description": "Optional Lighthouse lab CLS ceiling. Set -1 to disable.",
            "default": -1
          },
          "maxTbtMs": {
            "title": "Maximum TBT (ms)",
            "minimum": 0,
            "maximum": 120000,
            "type": "number",
            "description": "Optional Lighthouse Total Blocking Time ceiling. Set 0 to disable.",
            "default": 0
          },
          "failOnSeoChanges": {
            "title": "Fail on SEO field changes",
            "type": "boolean",
            "description": "Fail when title, meta description, canonical, robots, or html lang differs from baseline.",
            "default": false
          },
          "failOnDomChanges": {
            "title": "Fail on selected DOM changes",
            "type": "boolean",
            "description": "Fail when H1 or configured domSelectors differ from baseline.",
            "default": false
          },
          "baselineUpdatePolicy": {
            "title": "Baseline update policy",
            "enum": [
              "on_pass",
              "never",
              "always"
            ],
            "type": "string",
            "description": "on_pass accepts only passing/recovered captures, never freezes the first baseline, always moves baseline even after regressions.",
            "default": "on_pass"
          },
          "stateNamespace": {
            "title": "State namespace",
            "maxLength": 100,
            "type": "string",
            "description": "Separates independent baselines such as production, staging, project, branch, or client.",
            "default": "default"
          },
          "stabilizationDelayMs": {
            "title": "Stabilization delay (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Extra delay after load before DOM/screenshot capture.",
            "default": 800
          },
          "navigationTimeoutSeconds": {
            "title": "Browser timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Per-page Playwright navigation timeout.",
            "default": 45
          },
          "pagespeedTimeoutSeconds": {
            "title": "Lighthouse timeout (seconds)",
            "minimum": 15,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time allowed for a local Lighthouse or PageSpeed audit.",
            "default": 90
          },
          "emitOnlyFailures": {
            "title": "Emit only failures",
            "type": "boolean",
            "description": "Suppress PASS and RECOVERED rows. Baseline-created and error/regression rows remain visible.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}