{
  "openapi": "3.0.1",
  "info": {
    "title": "PageSpeed Monitor: Why Did My Page Get Slower?",
    "description": "Audits whole websites from the sitemap with Lighthouse (mobile + desktop), remembers every page and reports confirmed slowdowns with the cause: new third-party scripts, heavier JavaScript, bigger files. Optional own PageSpeed API key for real-user data.",
    "version": "0.1",
    "x-build-id": "xdkzXCe9LBz2ZHyVK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ademkacar~pagespeed-core-web-vitals-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ademkacar-pagespeed-core-web-vitals-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/ademkacar~pagespeed-core-web-vitals-monitor/runs": {
      "post": {
        "operationId": "runs-sync-ademkacar-pagespeed-core-web-vitals-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/ademkacar~pagespeed-core-web-vitals-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-ademkacar-pagespeed-core-web-vitals-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",
        "properties": {
          "sitemapUrl": {
            "title": "Website or sitemap",
            "type": "string",
            "description": "A sitemap URL (e.g. https://www.example.com/sitemap.xml) or just the website (e.g. www.example.com). For a website the sitemap is found through robots.txt and /sitemap.xml. Sitemap indexes and .xml.gz files are supported."
          },
          "urls": {
            "title": "Single pages",
            "type": "array",
            "description": "Pages to audit, one per line. https:// is added when missing, duplicates are audited once. Can be combined with the sitemap.",
            "items": {
              "type": "string"
            }
          },
          "maxPages": {
            "title": "Max pages per run",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Stop after this many pages (each page is audited once per device).",
            "default": 50
          },
          "includePatterns": {
            "title": "Only pages matching",
            "type": "array",
            "description": "Optional path patterns for sitemap pages, e.g. /blog/** or /products/*. Empty = all pages.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludePatterns": {
            "title": "Skip pages matching",
            "type": "array",
            "description": "Optional path patterns to skip, e.g. /cart/** or /account/**.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxPagesPerGroup": {
            "title": "Sample per page type",
            "minimum": 0,
            "type": "integer",
            "description": "Pages are grouped by the first path segment (/products, /blog …). Audit at most this many pages per group, so a shop with 5,000 product pages does not cost 5,000 audits. 0 = no limit.",
            "default": 0
          },
          "devices": {
            "title": "Device",
            "enum": [
              "mobile",
              "desktop",
              "both"
            ],
            "type": "string",
            "description": "Mobile is what Google uses for ranking. Both = two audits per page.",
            "default": "mobile"
          },
          "pageSpeedApiKey": {
            "title": "Your PageSpeed Insights API key (optional)",
            "type": "string",
            "description": "With your own free Google key the audits run on Google's servers: much cheaper, and you also get real-user Core Web Vitals (CrUX). The key is only sent to Google and never stored or logged. Without a key, Lighthouse runs in this Actor's own Chrome."
          },
          "engine": {
            "title": "Audit engine",
            "enum": [
              "auto",
              "lighthouse",
              "psi"
            ],
            "type": "string",
            "description": "Auto = PageSpeed Insights API when you give a key, otherwise Lighthouse in this Actor's own Chrome.",
            "default": "auto"
          },
          "monitorName": {
            "title": "Monitor name",
            "pattern": "^[a-zA-Z0-9-]{1,40}$",
            "type": "string",
            "description": "Name of the history this run is compared with. Use one name per website or client (e.g. client-acme), so separate schedules do not mix. Letters, digits and dashes, up to 40 characters.",
            "default": "default"
          },
          "performanceThreshold": {
            "title": "Performance drop that counts (points)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "A page counts as slower when its performance score drops at least this much and more than it usually wobbles. LCP, CLS and TBT have their own fixed rules.",
            "default": 10
          },
          "confirmRegressions": {
            "title": "Confirm slowdowns with a second audit",
            "type": "boolean",
            "description": "Lighthouse scores wobble between runs. A suspected slowdown is audited again right away and only reported when confirmed. The second audit is free for you.",
            "default": true
          },
          "onlyChanges": {
            "title": "Only write changed pages to the dataset",
            "type": "boolean",
            "description": "Every page is still audited (and charged); unchanged pages are left out of the dataset. The summary always covers all pages.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook for slowdowns (optional)",
            "type": "string",
            "description": "Called only when a slowdown is confirmed. The JSON has a text field, so Slack and Microsoft Teams incoming webhooks work directly."
          },
          "language": {
            "title": "Language of causes and summary",
            "enum": [
              "en",
              "de"
            ],
            "type": "string",
            "description": "English or German texts for the causes and the summary. Field names stay English.",
            "default": "en"
          },
          "resetHistory": {
            "title": "Forget the history of this monitor",
            "type": "boolean",
            "description": "Start from scratch: this run becomes the new baseline.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}