{
  "openapi": "3.0.1",
  "info": {
    "title": "Lighthouse & Accessibility Audit for AI Agents",
    "description": "Lighthouse scores, Core Web Vitals and axe-core accessibility violations for any URL, on mobile and desktop in one call, as the median of 3 runs. Returns PASS/FAIL against your thresholds and the top 5 fixes in plain language. Built for AI agents and MCP.",
    "version": "0.1",
    "x-build-id": "9WQ3bNyhqQwIE5NpP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fluidfaith~lighthouse-gate/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fluidfaith-lighthouse-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/fluidfaith~lighthouse-gate/runs": {
      "post": {
        "operationId": "runs-sync-fluidfaith-lighthouse-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/fluidfaith~lighthouse-gate/run-sync": {
      "post": {
        "operationId": "run-sync-fluidfaith-lighthouse-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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Page URLs",
            "maxItems": 50,
            "type": "array",
            "description": "Full http(s) URLs of the pages to audit, one per line (up to 50). Only public web addresses: localhost, private networks and internal hosts are refused.",
            "items": {
              "type": "string"
            }
          },
          "formFactors": {
            "title": "Form factors",
            "type": "array",
            "description": "Audit as a phone (Lighthouse mobile: Moto G Power, slow 4G, 4x CPU slowdown), as a desktop, or both. Each form factor is billed separately.",
            "items": {
              "type": "string",
              "enum": [
                "mobile",
                "desktop"
              ],
              "enumTitles": [
                "Mobile",
                "Desktop"
              ]
            },
            "default": [
              "mobile",
              "desktop"
            ]
          },
          "runsPerUrl": {
            "title": "Lighthouse runs per URL",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Lighthouse runs per URL per form factor. The median is reported with the spread (max minus min). 3 gives stable scores; 1 is about 3 times faster. Billed once either way.",
            "default": 3
          },
          "thresholds": {
            "title": "Minimum scores",
            "type": "object",
            "description": "Minimum median score per category, 0 to 100. A score below its minimum makes the verdict FAIL. Set a category to 0 to ignore it. Keys: performance, accessibility, seo, bestPractices.",
            "default": {
              "performance": 90,
              "accessibility": 90,
              "seo": 90,
              "bestPractices": 90
            }
          },
          "vitalsThresholds": {
            "title": "Core Web Vitals limits",
            "type": "object",
            "description": "Maximum median Largest Contentful Paint (lcpMs), Cumulative Layout Shift (cls) and Total Blocking Time (tbtMs, the lab stand-in for INP). Defaults are Google's \"good\" limits. Set one to 0 to ignore it.",
            "default": {
              "lcpMs": 2500,
              "cls": 0.1,
              "tbtMs": 200
            }
          },
          "mustPassAudits": {
            "title": "Audits that must pass",
            "type": "array",
            "description": "Lighthouse audit ids that make the verdict FAIL whenever they fail, whatever the category score. Default: page title, meta description, HTTP status, indexable, viewport tag, image alt text. Use an empty list to turn this off.",
            "default": [
              "document-title",
              "meta-description",
              "http-status-code",
              "is-crawlable",
              "viewport-insight",
              "image-alt"
            ],
            "items": {
              "type": "string"
            }
          },
          "includeAxe": {
            "title": "Run axe-core",
            "type": "boolean",
            "description": "Also run axe-core (WCAG 2.2 A and AA plus best-practice rules) and return the violations grouped by impact, with the failing elements.",
            "default": true
          },
          "axeFailOn": {
            "title": "Fail on axe violations",
            "enum": [
              "none",
              "critical",
              "serious",
              "moderate",
              "minor"
            ],
            "type": "string",
            "description": "Make the verdict FAIL when axe-core finds a violation at this impact or worse.",
            "default": "serious"
          },
          "saveReports": {
            "title": "Save full reports",
            "type": "boolean",
            "description": "Save the median run's full Lighthouse report (JSON and HTML) to the key-value store and return the links. The dataset rows stay small either way.",
            "default": true
          },
          "navigationTimeoutSecs": {
            "title": "Page load timeout (seconds)",
            "minimum": 10,
            "maximum": 90,
            "type": "integer",
            "description": "How long each Lighthouse run waits for the page to load. A page that never loads is reported as ERROR and not charged.",
            "default": 45
          },
          "maxConcurrency": {
            "title": "URLs in parallel",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "How many URLs to audit at the same time. 1 gives the most stable performance scores; 2 or 3 is faster but runs share the CPU, so performance numbers get noisier.",
            "default": 1
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Use an Apify proxy if a site blocks data-center traffic. Performance timings through a proxy include the proxy's own latency."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}