{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk PageSpeed Insights & Core Web Vitals Checker",
    "description": "Audit hundreds of URLs, or a whole site from its sitemap, with Google PageSpeed Insights: Lighthouse scores, lab Core Web Vitals, real-user CrUX field data with pass/fail, and the top fixes per page. Mobile and desktop. Uses your own free Google API key. No start fee.",
    "version": "0.1",
    "x-build-id": "MMIsAqbSpA6bv4lsv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/open-data-tools~pagespeed-bulk/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-open-data-tools-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/open-data-tools~pagespeed-bulk/runs": {
      "post": {
        "operationId": "runs-sync-open-data-tools-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/open-data-tools~pagespeed-bulk/run-sync": {
      "post": {
        "operationId": "run-sync-open-data-tools-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": "Page URLs",
            "type": "array",
            "description": "Pages to audit, one per line. https:// is added if missing. Duplicates are removed.",
            "items": {
              "type": "string"
            }
          },
          "sitemapUrls": {
            "title": "Audit a whole site from its sitemap",
            "type": "array",
            "description": "Optional. A domain (example.com) finds its sitemap through robots.txt; a sitemap URL (sitemap.xml, sitemap index, .xml.gz, .txt) is read directly. Page URLs found are added to the audit, up to the limit below per entry.",
            "items": {
              "type": "string"
            }
          },
          "maxUrlsPerSitemap": {
            "title": "Max pages per sitemap entry",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "Stop after this many page URLs from each sitemap entry. Filters below apply first.",
            "default": 100
          },
          "includePatterns": {
            "title": "Only sitemap URLs matching (regex)",
            "type": "array",
            "description": "Keep only sitemap URLs matching at least one regular expression (case-insensitive). Example: /blog/",
            "items": {
              "type": "string"
            }
          },
          "excludePatterns": {
            "title": "Skip sitemap URLs matching (regex)",
            "type": "array",
            "description": "Drop sitemap URLs matching any of these regular expressions. Example: /tag/",
            "items": {
              "type": "string"
            }
          },
          "apiKey": {
            "title": "Google PageSpeed Insights API key",
            "type": "string",
            "description": "Your own free key: 25,000 audits per day at no cost from Google. Create it in 2 minutes at console.cloud.google.com (APIs & Services > Library > PageSpeed Insights API > Enable, then Credentials > Create credentials > API key). Without a key the Actor tries Google's shared keyless quota, which is usually exhausted. Stored encrypted."
          },
          "strategies": {
            "title": "Devices",
            "type": "array",
            "description": "Mobile, desktop or both. Each device is a separate audit (and a separate row).",
            "items": {
              "type": "string",
              "enum": [
                "mobile",
                "desktop"
              ],
              "enumTitles": [
                "Mobile",
                "Desktop"
              ]
            },
            "default": [
              "mobile"
            ]
          },
          "categories": {
            "title": "Lighthouse categories",
            "type": "array",
            "description": "Scores to return. Core Web Vitals lab metrics and field data come with every audit.",
            "items": {
              "type": "string",
              "enum": [
                "performance",
                "accessibility",
                "best-practices",
                "seo"
              ],
              "enumTitles": [
                "Performance",
                "Accessibility",
                "Best practices",
                "SEO"
              ]
            },
            "default": [
              "performance",
              "accessibility",
              "best-practices",
              "seo"
            ]
          },
          "maxOpportunities": {
            "title": "Top opportunities per page",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "How many of the biggest performance fixes (estimated savings) to list per page. 0 turns this off.",
            "default": 5
          },
          "minPerformanceScore": {
            "title": "Flag pages scoring below",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Optional performance budget (0-100). Pages below it get belowThreshold = true, so you can filter or alert on them. 0 turns it off.",
            "default": 0
          },
          "locale": {
            "title": "Report language",
            "type": "string",
            "description": "Optional locale for audit titles, such as en, de, fr, es, pt-BR. Default English."
          },
          "saveFullReport": {
            "title": "Save full Lighthouse JSON",
            "type": "boolean",
            "description": "Also store each page's complete Lighthouse report in the run's key-value store and link it in fullReportUrl.",
            "default": false
          },
          "concurrency": {
            "title": "Parallel audits",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Audits run at the same time. Google allows about 4 requests per second per key; each audit takes 5-30 s, so 5-10 is safe.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}