{
  "openapi": "3.0.1",
  "info": {
    "title": "Site Speed Audit for Agencies: Mobile, Desktop & Regressions",
    "description": "Audit whole sites or URL lists on mobile and desktop with the open-source Lighthouse engine: median-of-N stable scores, regression alerts vs last run, performance budgets for CI and a client-ready HTML report per site. No Google API key. Not affiliated with Google.",
    "version": "1.0",
    "x-build-id": "TTtFCtZgja7MejQ9H"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hani-tools~site-speed-audit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hani-tools-site-speed-audit",
        "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/hani-tools~site-speed-audit/runs": {
      "post": {
        "operationId": "runs-sync-hani-tools-site-speed-audit",
        "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/hani-tools~site-speed-audit/run-sync": {
      "post": {
        "operationId": "run-sync-hani-tools-site-speed-audit",
        "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",
        "properties": {
          "urls": {
            "title": "Page URLs",
            "type": "array",
            "description": "Individual pages to audit (e.g. home page, pricing page). Use full URLs; \"https://\" is added if missing.",
            "items": {
              "type": "string"
            }
          },
          "sitemapUrls": {
            "title": "Sitemap URLs",
            "type": "array",
            "description": "Sitemaps (sitemap.xml, sitemap index or .xml.gz). Pages are sampled per path pattern up to \"Max pages per site\". robots.txt is respected for these pages by default.",
            "items": {
              "type": "string"
            }
          },
          "startDomains": {
            "title": "Domains",
            "type": "array",
            "description": "Domains such as \"client.com\". The sitemap is found via robots.txt or /sitemap.xml; without a sitemap, links on the home page are used (no deep crawl).",
            "items": {
              "type": "string"
            }
          },
          "maxUrlsPerSite": {
            "title": "Max pages per site (sitemaps/domains)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper limit of discovered pages audited per site. Directly listed URLs are not limited.",
            "default": 50
          },
          "samplePerPathPattern": {
            "title": "Pages per path pattern",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Template sampling for sitemaps/domains: take at most this many pages from each first-level path (e.g. 3 from /blog/*, 3 from /products/*). 0 = no per-pattern limit.",
            "default": 3
          },
          "includeUrlPatterns": {
            "title": "Only include URLs containing",
            "type": "array",
            "description": "Optional filters for discovered URLs. Plain text is matched as a substring; * works as a wildcard.",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Exclude URLs containing",
            "type": "array",
            "description": "Skip discovered URLs that contain any of these (e.g. /tag/, /page/).",
            "items": {
              "type": "string"
            }
          },
          "groups": {
            "title": "Site labels (optional)",
            "type": "object",
            "description": "Optional labels shown next to each site in reports, e.g. {\"client-a.com\": \"Client A\"}."
          },
          "devices": {
            "title": "Devices",
            "type": "array",
            "description": "Mobile (Lighthouse mobile emulation, slow 4G + 4x CPU slowdown) and/or desktop. Each page x device is one audit.",
            "items": {
              "type": "string",
              "enum": [
                "mobile",
                "desktop"
              ],
              "enumTitles": [
                "Mobile",
                "Desktop"
              ]
            },
            "default": [
              "mobile",
              "desktop"
            ]
          },
          "runsPerUrl": {
            "title": "Runs per page and device (median)",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "1 = fastest and cheapest. 3 or 5 = the median run is reported, which is much more stable (2 is rounded up to 3, 4 to 5). Each additional run is billed as an extra-run event. Extra runs are skipped for a page when one measurement took longer than 36 s (shown in lighthouseWarnings / extraRunsSkipped).",
            "default": 1
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Score categories to measure. Performance is always included.",
            "items": {
              "type": "string",
              "enum": [
                "performance",
                "accessibility",
                "best-practices",
                "seo"
              ],
              "enumTitles": [
                "Performance",
                "Accessibility",
                "Best practices",
                "SEO"
              ]
            },
            "default": [
              "performance",
              "accessibility",
              "best-practices",
              "seo"
            ]
          },
          "throttling": {
            "title": "Throttling method",
            "enum": [
              "simulated",
              "devtools"
            ],
            "type": "string",
            "description": "\"simulated\" (Lighthouse default, fastest and most repeatable) or \"devtools\" (applies real network/CPU throttling; slower).",
            "default": "simulated"
          },
          "maxAuditSeconds": {
            "title": "Max time per measurement (seconds)",
            "minimum": 20,
            "maximum": 180,
            "type": "integer",
            "description": "Hard limit for one measurement of one page on one device, including browser start-up. Pages that need longer are stopped, reported as \"timeout_limit\" and NOT charged. 45 s covers typical pages on the 1-CPU machine; very heavy pages (big news/media home pages) can need 60–180 s – raise this limit if you need them measured.",
            "default": 45
          },
          "pageLoadTimeoutSecs": {
            "title": "Page load wait (seconds)",
            "minimum": 10,
            "maximum": 165,
            "type": "integer",
            "description": "How long Lighthouse waits for the page to finish loading. Automatically kept at least 15 s below \"Max time per measurement\" (minimum 10 s) so there is time left for the analysis.",
            "default": 30
          },
          "compareWithPrevious": {
            "title": "Compare with previous run",
            "type": "boolean",
            "description": "Store results in a named key-value store and flag regressions against the previous runs with the same baseline name.",
            "default": true
          },
          "baselineName": {
            "title": "Baseline name",
            "type": "string",
            "description": "Runs with the same baseline name are compared with each other (e.g. \"my-agency-portfolio\"). Stored in the named key-value store \"site-speed-baselines-<name>\" in your account.",
            "default": "default"
          },
          "regressionThresholds": {
            "title": "Regression thresholds",
            "type": "object",
            "description": "Score-point drops (or LCP milliseconds increase) that count as a regression, compared with the median of up to the last 3 runs. Keys: performance, accessibility, bestPractices, seo, lcpMs.",
            "default": {
              "performance": 8,
              "accessibility": 3,
              "seo": 3,
              "lcpMs": 500
            }
          },
          "budgets": {
            "title": "Performance budgets",
            "type": "object",
            "description": "Optional pass/fail limits per audit. Minimum scores: performance, accessibility, bestPractices, seo. Maximum values: lcpMs, fcpMs, tbtMs, cls, speedIndexMs, ttfbMs, totalBytes."
          },
          "failRunOnBudgetBreach": {
            "title": "Fail the run when a budget is breached",
            "type": "boolean",
            "description": "Useful in CI pipelines. All results and reports are still saved.",
            "default": false
          },
          "webhookUrl": {
            "title": "Alert webhook URL",
            "type": "string",
            "description": "Optional. Receives a JSON POST when a regression or budget failure is found (e.g. Slack/Zapier/n8n incoming webhook)."
          },
          "reportEnabled": {
            "title": "Create HTML client reports",
            "type": "boolean",
            "description": "One branded HTML report per site plus a portfolio overview (billed once per site as a site-report event).",
            "default": true
          },
          "brandName": {
            "title": "Agency name",
            "type": "string",
            "description": "Shown in the report header and footer."
          },
          "logoUrl": {
            "title": "Logo URL",
            "type": "string",
            "description": "Public https URL of your logo (PNG/SVG)."
          },
          "accentColor": {
            "title": "Accent colour",
            "type": "string",
            "description": "Hex colour used in the report, e.g. #2255aa.",
            "default": "#2255aa"
          },
          "saveRawReports": {
            "title": "Save original Lighthouse HTML reports",
            "type": "boolean",
            "description": "Also store the full Lighthouse HTML report for every page/device (link in rawReportUrl).",
            "default": false
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt for discovered pages",
            "type": "boolean",
            "description": "Pages found via sitemaps/domains that robots.txt disallows are skipped (never charged).",
            "default": true
          },
          "enforceRobotsForListedUrls": {
            "title": "Also skip listed URLs disallowed by robots.txt",
            "type": "boolean",
            "description": "By default, URLs you list yourself are audited with a warning only.",
            "default": false
          },
          "perHostDelaySecs": {
            "title": "Delay between requests to the same host (seconds)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Politeness delay between page loads on the same host.",
            "default": 2
          },
          "maxRetries": {
            "title": "Retries per failed measurement",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Transient failures (timeouts, crashes, 429/5xx) are retried this many times. Retries are never charged.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}