{
  "openapi": "3.0.1",
  "info": {
    "title": "PageSpeed Budget Monitor: Core Web Vitals pass/fail & changes",
    "description": "Check many pages against performance budgets (score, LCP, CLS, TBT, optional real-user INP/LCP) with Google's PageSpeed Insights API and your own key. Pass / fail / unknown per page, and the change since your last run.",
    "version": "0.1",
    "x-build-id": "NYL1IuEqcRvCM0vfL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/asunoki~pagespeed-budget-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-asunoki-pagespeed-budget-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/asunoki~pagespeed-budget-monitor/runs": {
      "post": {
        "operationId": "runs-sync-asunoki-pagespeed-budget-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/asunoki~pagespeed-budget-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-asunoki-pagespeed-budget-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Pages to check",
            "type": "array",
            "description": "Public page URLs (up to 500 different URLs per run). Each page is tested once per device. Duplicates are removed. Cost: one charged event per page × device that was measured; pages that could not be measured are free.",
            "items": {
              "type": "string"
            }
          },
          "apiKey": {
            "title": "Google API key",
            "type": "string",
            "description": "Your own free Google API key. In the key's Google Cloud project enable \"PageSpeed Insights API\" and \"Chrome UX Report API\", and restrict the key to those two APIs (step-by-step guide in the README, section \"Your Google API key\"). Secret: stored encrypted by Apify, sent to Google only in a request header, never written to results, files or the log. Without a key Google's shared quota is usually used up and the pages fail with quota_exceeded (not charged)."
          },
          "strategies": {
            "title": "Device",
            "type": "array",
            "description": "mobile, desktop or both. Each page × device is one test and, when measured, one charged event (e.g. 10 pages × both devices = 20 events).",
            "items": {
              "type": "string",
              "enum": [
                "mobile",
                "desktop"
              ],
              "enumTitles": [
                "Mobile",
                "Desktop"
              ]
            },
            "default": [
              "mobile"
            ]
          },
          "minPerformanceScore": {
            "title": "Minimum performance score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Lighthouse performance score (0-100) a page must reach. Default 50.",
            "default": 50
          },
          "maxLcpMs": {
            "title": "Max LCP (lab, ms)",
            "minimum": 0,
            "type": "integer",
            "description": "Largest Contentful Paint in the lab test, milliseconds. Default 2500 (Google \"good\").",
            "default": 2500
          },
          "maxCls": {
            "title": "Max CLS (lab)",
            "type": "string",
            "description": "Decimal number, e.g. 0.1 (Google \"good\" threshold).",
            "default": "0.1"
          },
          "maxTbtMs": {
            "title": "Max TBT (lab, ms)",
            "minimum": 0,
            "type": "integer",
            "description": "Total Blocking Time in the lab test, milliseconds. Default 200.",
            "default": 200
          },
          "maxFieldInpMs": {
            "title": "Max INP (real users, p75 ms) — optional",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Real-user INP p75 (28 days), milliseconds. Empty = not checked. Google \"good\" = 200. Pages and sites without real-user data get unknown for this check (never pass, never fail)."
          },
          "maxFieldLcpMs": {
            "title": "Max LCP (real users, p75 ms) — optional",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Real-user LCP p75 (28 days), milliseconds. Empty = not checked. Google \"good\" = 2500. No real-user data = unknown."
          },
          "comparisonMode": {
            "title": "Compare with",
            "enum": [
              "none",
              "input",
              "dataset"
            ],
            "type": "string",
            "description": "Leave empty to choose automatically: pasted baseline values, else a selected dataset, else no comparison."
          },
          "baseline": {
            "title": "Baseline values",
            "type": "array",
            "description": "List of {\"url\", \"strategy\", \"performanceScore\", \"lcpMs\", \"cls\", \"tbtMs\"} from your own records (for example last month's report.csv). Optional: \"lighthouseVersion\", \"finalUrl\", \"checkedAt\"."
          },
          "baselineDatasetId": {
            "title": "Compare with dataset",
            "type": "string",
            "description": "A results dataset of an earlier run that you still hold. Read-only: the Actor reads it for this run and copies nothing."
          },
          "maxConcurrency": {
            "title": "Parallel checks",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Tests running at the same time (1-8). Lower it if the run stops with rate_limited (Google's per-minute limit).",
            "default": 4
          },
          "htmlReport": {
            "title": "HTML report for clients",
            "type": "boolean",
            "description": "Also save report.html (one page, no external files) in the key-value store: status, lab values, real-user values and changes, readable on a phone.",
            "default": true
          },
          "reportTitle": {
            "title": "Report title",
            "type": "string",
            "description": "Shown at the top of report.html, e.g. the client or site name. Optional."
          },
          "fieldSource": {
            "title": "Real-user (field) data source",
            "enum": [
              "auto",
              "crux",
              "psi",
              "none"
            ],
            "type": "string",
            "description": "Real-user data is the 28-day p75 from the Chrome UX Report. Used for the optional real-user budgets and shown for information. Pages with too little traffic have no page data (the origin is used instead); with no data at all the row says fieldStatus = no_field_data and real-user checks are unknown.",
            "default": "auto"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}