{
  "openapi": "3.0.1",
  "info": {
    "title": "Lighthouse CI Regression Gate",
    "description": "Lighthouse CI performance regression and pass/fail gate for 1–10 authorised public URLs, with explicit baselines, thresholds, and Core Web Vitals.",
    "version": "0.1",
    "x-build-id": "qOOgdJQEi6vaPSLQ8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hero98~lighthouse-release-regression-gate/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hero98-lighthouse-release-regression-gate",
        "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/hero98~lighthouse-release-regression-gate/runs": {
      "post": {
        "operationId": "runs-sync-hero98-lighthouse-release-regression-gate",
        "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/hero98~lighthouse-release-regression-gate/run-sync": {
      "post": {
        "operationId": "run-sync-hero98-lighthouse-release-regression-gate",
        "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",
          "confirmPermission"
        ],
        "properties": {
          "startUrls": {
            "title": "Public URLs",
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "description": "One to ten public HTTP(S) pages you control or have permission to test.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "description": "Public HTTP(S) page to audit.",
                  "type": "string"
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "confirmPermission": {
            "title": "I have permission to test these URLs",
            "type": "boolean",
            "description": "Required for every URL except the prefilled publisher-owned demo. The Actor does not bypass authentication, robots rules, rate limits, or anti-bot controls.",
            "default": false
          },
          "device": {
            "title": "Lighthouse device profile",
            "enum": [
              "mobile",
              "desktop"
            ],
            "type": "string",
            "description": "Use Lighthouse's standard mobile or desktop configuration.",
            "default": "mobile"
          },
          "baselines": {
            "title": "Optional baselines",
            "type": "array",
            "description": "Previous scores/metrics keyed by the exact requested URL. Omit to create a first snapshot.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "Baseline URL",
                  "description": "Exact requested URL this baseline belongs to.",
                  "type": "string"
                },
                "scores": {
                  "title": "Baseline scores",
                  "description": "Previous Lighthouse category scores from 0 to 100.",
                  "type": "object",
                  "properties": {
                    "performance": {
                      "title": "Performance",
                      "description": "Previous performance score.",
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "accessibility": {
                      "title": "Accessibility",
                      "description": "Previous automated accessibility score.",
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "bestPractices": {
                      "title": "Best practices",
                      "description": "Previous best-practices score.",
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "seo": {
                      "title": "SEO",
                      "description": "Previous automated SEO score.",
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    }
                  }
                },
                "metrics": {
                  "title": "Baseline metrics",
                  "description": "Previous Lighthouse numeric loading metrics.",
                  "type": "object",
                  "properties": {
                    "lcpMs": {
                      "title": "LCP (ms)",
                      "description": "Previous Largest Contentful Paint in milliseconds.",
                      "type": "number",
                      "minimum": 0
                    },
                    "cls": {
                      "title": "CLS",
                      "description": "Previous Cumulative Layout Shift value.",
                      "type": "number",
                      "minimum": 0
                    },
                    "tbtMs": {
                      "title": "TBT (ms)",
                      "description": "Previous Total Blocking Time in milliseconds.",
                      "type": "number",
                      "minimum": 0
                    },
                    "fcpMs": {
                      "title": "FCP (ms)",
                      "description": "Previous First Contentful Paint in milliseconds.",
                      "type": "number",
                      "minimum": 0
                    },
                    "speedIndexMs": {
                      "title": "Speed Index (ms)",
                      "description": "Previous Speed Index in milliseconds.",
                      "type": "number",
                      "minimum": 0
                    }
                  }
                }
              },
              "required": [
                "url"
              ]
            },
            "default": []
          },
          "thresholds": {
            "title": "Regression thresholds",
            "type": "object",
            "description": "A regression is reported only when a drop/increase exceeds these values.",
            "properties": {
              "maxScoreDrop": {
                "title": "Maximum score drop",
                "description": "Allowed category-score drop before regression.",
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "maxLcpIncreaseMs": {
                "title": "Maximum LCP increase (ms)",
                "description": "Allowed LCP increase before regression.",
                "type": "number",
                "minimum": 0
              },
              "maxClsIncrease": {
                "title": "Maximum CLS increase",
                "description": "Allowed CLS increase before regression.",
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "maxTbtIncreaseMs": {
                "title": "Maximum TBT increase (ms)",
                "description": "Allowed TBT increase before regression.",
                "type": "number",
                "minimum": 0
              }
            },
            "default": {
              "maxScoreDrop": 5,
              "maxLcpIncreaseMs": 500,
              "maxClsIncrease": 0.05,
              "maxTbtIncreaseMs": 200
            }
          },
          "minimumScores": {
            "title": "Optional minimum category scores",
            "type": "object",
            "description": "Set any Lighthouse category floor from 0 to 100. Zero disables that floor.",
            "properties": {
              "performance": {
                "title": "Performance minimum",
                "description": "Performance floor; zero disables it.",
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "accessibility": {
                "title": "Accessibility minimum",
                "description": "Automated accessibility floor; zero disables it.",
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "bestPractices": {
                "title": "Best practices minimum",
                "description": "Best-practices floor; zero disables it.",
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "seo": {
                "title": "SEO minimum",
                "description": "Automated SEO floor; zero disables it.",
                "type": "number",
                "minimum": 0,
                "maximum": 100
              }
            },
            "default": {
              "performance": 0,
              "accessibility": 0,
              "bestPractices": 0,
              "seo": 0
            }
          },
          "failRunOnRegression": {
            "title": "Fail Actor run on regression",
            "type": "boolean",
            "description": "Useful as a CI gate. Results and summary are stored before the run fails.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}