{
  "openapi": "3.0.1",
  "info": {
    "title": "Lighthouse Audit Tool — Performance, SEO & Accessibility Scores",
    "description": "Run Google Lighthouse audits on any URL. Get performance, accessibility, best practices, and SEO scores. Extract Core Web Vitals, diagnostics, and optimization opportunities. Batch audit multiple URLs.",
    "version": "1.0",
    "x-build-id": "HOe8BaSTnWjkpJNoS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/junipr~lighthouse-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-junipr-lighthouse-checker",
        "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/junipr~lighthouse-checker/runs": {
      "post": {
        "operationId": "runs-sync-junipr-lighthouse-checker",
        "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/junipr~lighthouse-checker/run-sync": {
      "post": {
        "operationId": "run-sync-junipr-lighthouse-checker",
        "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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "URLs to Audit",
            "minItems": 1,
            "maxItems": 3,
            "type": "array",
            "description": "List of URLs to audit. Must include protocol (https://). Max 3.",
            "items": {
              "type": "string"
            },
            "default": [
              "https://crawlee.dev"
            ]
          },
          "device": {
            "title": "Device Emulation",
            "enum": [
              "mobile",
              "desktop",
              "both"
            ],
            "type": "string",
            "description": "Device emulation mode. 'both' runs two audits per URL (mobile + desktop).",
            "default": "mobile"
          },
          "categories": {
            "title": "Audit Categories",
            "type": "array",
            "description": "Lighthouse categories to audit. Default: all four main categories. Valid values: performance, accessibility, best-practices, seo",
            "items": {
              "type": "string"
            },
            "default": [
              "performance",
              "accessibility",
              "best-practices",
              "seo"
            ]
          },
          "throttling": {
            "title": "Throttling Mode",
            "enum": [
              "simulated",
              "devtools",
              "none"
            ],
            "type": "string",
            "description": "Network throttling: 'simulated' (fast, default), 'devtools' (slower but more accurate), 'none'.",
            "default": "simulated"
          },
          "locale": {
            "title": "Report Locale",
            "type": "string",
            "description": "Lighthouse report locale for audit descriptions (e.g., 'en', 'es', 'de', 'ja').",
            "default": "en"
          },
          "performanceThreshold": {
            "title": "Performance Threshold",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Minimum acceptable Performance score (0-100). 0 = no threshold.",
            "default": 0
          },
          "accessibilityThreshold": {
            "title": "Accessibility Threshold",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Minimum acceptable Accessibility score (0-100). 0 = no threshold.",
            "default": 0
          },
          "bestPracticesThreshold": {
            "title": "Best Practices Threshold",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Minimum acceptable Best Practices score (0-100). 0 = no threshold.",
            "default": 0
          },
          "seoThreshold": {
            "title": "SEO Threshold",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Minimum acceptable SEO score (0-100). 0 = no threshold.",
            "default": 0
          },
          "failOnThreshold": {
            "title": "Fail on Threshold Breach",
            "type": "boolean",
            "description": "If true and any URL is below any threshold, the actor exits with error. Useful for CI/CD.",
            "default": false
          },
          "includeAuditDetails": {
            "title": "Include Audit Details",
            "type": "boolean",
            "description": "Include individual audit pass/fail details (not just category scores).",
            "default": false
          },
          "includeOpportunities": {
            "title": "Include Opportunities",
            "type": "boolean",
            "description": "Include optimization opportunities with estimated savings.",
            "default": false
          },
          "includeDiagnostics": {
            "title": "Include Diagnostics",
            "type": "boolean",
            "description": "Include diagnostic audit results.",
            "default": false
          },
          "includeScreenshot": {
            "title": "Capture Screenshot",
            "type": "boolean",
            "description": "Capture and store a screenshot of each URL (saved to Key-Value Store).",
            "default": false
          },
          "generateHtmlReport": {
            "title": "Generate HTML Report",
            "type": "boolean",
            "description": "Generate and store full Lighthouse HTML report per URL (saved to Key-Value Store).",
            "default": false
          },
          "includeRawLighthouse": {
            "title": "Include Raw Lighthouse JSON",
            "type": "boolean",
            "description": "Include the full raw Lighthouse JSON result. Warning: very large output.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Maximum concurrent Lighthouse audits. Keep low — Lighthouse is resource-intensive.",
            "default": 1
          },
          "auditTimeout": {
            "title": "Audit Timeout (ms)",
            "minimum": 30000,
            "maximum": 180000,
            "type": "integer",
            "description": "Timeout for each Lighthouse audit in milliseconds.",
            "default": 90000
          },
          "retryOnFailure": {
            "title": "Retry on Failure",
            "type": "boolean",
            "description": "Retry failed audits once. Handles transient Chromium/network issues.",
            "default": true
          },
          "waitUntil": {
            "title": "Wait Until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle0",
              "networkidle2"
            ],
            "type": "string",
            "description": "When to consider page loaded: 'load', 'domcontentloaded', 'networkidle0', 'networkidle2'.",
            "default": "load"
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings for accessing URLs behind firewalls or geo-restricted content.",
            "default": {}
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}