{
  "openapi": "3.0.1",
  "info": {
    "title": "PageSpeed & Lighthouse Bulk Checker with History",
    "description": "No API key needed: run Google PageSpeed Insights (Lighthouse) on a URL list, a sitemap or a CSV. Scores, lab metrics, real-user Core Web Vitals (LCP, INP, CLS), the top 5 fixes with estimated savings, and score history with regression flags. Built-in key: 100 audits a run; add yours for more.",
    "version": "1.0",
    "x-build-id": "LIHRUoueDuuM4OfQM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/brisaworks~pagespeed-bulk/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-brisaworks-pagespeed-bulk",
        "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/brisaworks~pagespeed-bulk/runs": {
      "post": {
        "operationId": "runs-sync-brisaworks-pagespeed-bulk",
        "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/brisaworks~pagespeed-bulk/run-sync": {
      "post": {
        "operationId": "run-sync-brisaworks-pagespeed-bulk",
        "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": "URLs",
            "type": "array",
            "description": "Pages to audit, one per line. You can also (or instead) give a sitemap, a CSV file or a dataset below.",
            "items": {
              "type": "string"
            }
          },
          "googleApiKey": {
            "title": "Google API key (optional)",
            "type": "string",
            "description": "Leave empty to use our built-in key: up to 100 audits per run, free of any Google setup. Past 100, or if the built-in key's daily Google quota is used up, the remaining URLs come back as free shared_quota_exhausted rows. Add your own free key (Google Cloud, PageSpeed Insights API enabled, 25,000 audits a day) for larger runs: your key has no cap here. The key is never logged or saved."
          },
          "sitemapUrl": {
            "title": "Sitemap URL",
            "type": "string",
            "description": "An XML sitemap or sitemap index (.xml or .xml.gz), e.g. https://example.com/sitemap.xml. The Actor reads up to Max URLs page addresses from it (following up to 20 child sitemaps) and audits each one."
          },
          "fileUrl": {
            "title": "CSV or text file URL",
            "type": "string",
            "description": "A public CSV or plain-text file with one URL per row, e.g. a Google Sheet published as CSV. A column named url, link, loc, page or address is used; otherwise the first cell that looks like a URL in each row. Up to Max URLs are read."
          },
          "datasetId": {
            "title": "Apify dataset",
            "type": "string",
            "description": "A dataset from another run, e.g. a crawl of your site. The URL is read from the field below, or from the first of url, loc, link, href, page, loadedUrl that holds one. Up to Max URLs are read."
          },
          "datasetUrlField": {
            "title": "Dataset URL field",
            "type": "string",
            "description": "Optional: the dataset field that holds the URL, if it is not one of the usual names."
          },
          "maxUrls": {
            "title": "Max URLs per source",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Most URLs taken from each of the sitemap, the file and the dataset (the URLs list above is always audited in full). Each URL costs one audit per device. Without your own key, a run audits at most 100 URL/device pairs.",
            "default": 100
          },
          "mobile": {
            "title": "Mobile",
            "type": "boolean",
            "description": "Audit with the mobile strategy.",
            "default": true
          },
          "desktop": {
            "title": "Desktop",
            "type": "boolean",
            "description": "Also audit with the desktop strategy (one more audit per URL).",
            "default": false
          },
          "includeSeo": {
            "title": "SEO score",
            "type": "boolean",
            "description": "Add the Lighthouse SEO category.",
            "default": false
          },
          "includeAccessibility": {
            "title": "Accessibility score",
            "type": "boolean",
            "description": "Add the Lighthouse accessibility category.",
            "default": false
          },
          "includeBestPractices": {
            "title": "Best-practices score",
            "type": "boolean",
            "description": "Add the Lighthouse best-practices category.",
            "default": false
          },
          "locale": {
            "title": "Locale",
            "type": "string",
            "description": "Optional locale for formatted results, e.g. en, es."
          },
          "compareWithPrevious": {
            "title": "Compare with previous run",
            "type": "boolean",
            "description": "Keep each URL's last performance score and add previousPerformanceScore, scoreDelta and a regression flag. Schedule the Actor for monitoring.",
            "default": false
          },
          "regressionThreshold": {
            "title": "Regression threshold (points)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Flag a regression when the performance score drops by at least this many points.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}