{
  "openapi": "3.0.1",
  "info": {
    "title": "Batch PageSpeed & Core Web Vitals — Mobile+Desktop+CrUX",
    "description": "Batch Google PageSpeed Insights via the official PSI API: mobile + desktop Lighthouse scores, LCP/CLS/TBT/FCP lab metrics and CrUX field data (LCP/CLS/INP p75). Markdown + CSV report. URL list, sitemap or dataset input. Bring your own free Google API key. Failed URLs free. 256 MB.",
    "version": "0.1",
    "x-build-id": "PI3Oaj9mWfe95s4pM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ingenious_quip_bxq~batch-pagespeed-cwv/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ingenious_quip_bxq-batch-pagespeed-cwv",
        "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/ingenious_quip_bxq~batch-pagespeed-cwv/runs": {
      "post": {
        "operationId": "runs-sync-ingenious_quip_bxq-batch-pagespeed-cwv",
        "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/ingenious_quip_bxq~batch-pagespeed-cwv/run-sync": {
      "post": {
        "operationId": "run-sync-ingenious_quip_bxq-batch-pagespeed-cwv",
        "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 to test",
            "type": "array",
            "description": "Pages to test. Accepts {\"url\": \"...\"} objects (same shape as Sitemap / URL-status dataset rows), plain strings, and remote lists (requestsFromUrl).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sitemapUrl": {
            "title": "Sitemap URL",
            "type": "string",
            "description": "Optional. sitemap.xml (urlset or sitemap index, .gz ok) or a plain-text URL list. Capped by Max URLs. For very large sites run Sitemap URL Discovery first and pass its dataset id."
          },
          "datasetId": {
            "title": "Source dataset ID",
            "type": "string",
            "description": "Optional. Apify dataset ID from Sitemap URL Discovery or URL Status Checker. Reads the `url` field; rows with httpStatus >= 400 are skipped."
          },
          "keyValueStoreId": {
            "title": "Source key-value store ID",
            "type": "string",
            "description": "Optional. Load URLs from a KV record such as DOC_TO_MARKDOWN_INPUT."
          },
          "keyValueRecordKey": {
            "title": "Record key",
            "type": "string",
            "description": "Key inside the source key-value store. Ignored unless a store ID is set.",
            "default": "DOC_TO_MARKDOWN_INPUT"
          },
          "googlePagespeedApiKey": {
            "title": "Google PageSpeed Insights API key (recommended)",
            "type": "string",
            "description": "Your own Google API key with the 'PageSpeed Insights API' enabled (created for free in Google Cloud Console → APIs & Services → Credentials → Create API key, then enable PageSpeed Insights API). WITHOUT a key Google's shared keyless quota usually returns HTTP 429 'Quota exceeded' — those URL × strategy rows are marked failed and are NOT charged. Stored encrypted; never logged."
          },
          "strategies": {
            "title": "Strategies",
            "type": "array",
            "description": "Lighthouse device emulation. Each selected strategy is one PSI call and one billable report per URL.",
            "items": {
              "type": "string",
              "enum": [
                "mobile",
                "desktop"
              ],
              "enumTitles": [
                "Mobile",
                "Desktop"
              ]
            },
            "default": [
              "mobile",
              "desktop"
            ]
          },
          "categories": {
            "title": "Lighthouse categories",
            "type": "array",
            "description": "Performance is always included. Adding Accessibility / Best practices / SEO adds those scores (same price, slightly slower calls).",
            "items": {
              "type": "string",
              "enum": [
                "performance",
                "accessibility",
                "best-practices",
                "seo"
              ],
              "enumTitles": [
                "Performance",
                "Accessibility",
                "Best practices",
                "SEO"
              ]
            },
            "default": [
              "performance"
            ]
          },
          "locale": {
            "title": "Locale",
            "type": "string",
            "description": "Optional locale for audit titles (e.g. en, de, ja). Empty = Google default (en)."
          },
          "maxUrls": {
            "title": "Max URLs",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many unique URLs (0 = no limit). Total reports = URLs × strategies.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Parallel PSI calls. PSI takes 10–30 s per call and Google rate-limits per key per minute, so 2–3 is usually safe.",
            "default": 2
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "Retries for per-minute HTTP 429, 5xx and timeouts (exponential backoff). A per-day quota 429 is not retried.",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "PSI request timeout (seconds)",
            "minimum": 30,
            "maximum": 300,
            "type": "integer",
            "description": "Timeout for each PSI API call.",
            "default": 120
          },
          "stopOnDailyQuota": {
            "title": "Stop on daily quota",
            "type": "boolean",
            "description": "When Google reports the DAILY quota is exhausted, skip the remaining calls (free) instead of hammering the API.",
            "default": true
          },
          "topOpportunities": {
            "title": "Top opportunities per report",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many Lighthouse opportunities (sorted by estimated savings) to keep per row. 0 = none.",
            "default": 5
          },
          "includeFailedInCsv": {
            "title": "Include failed rows in CSV",
            "type": "boolean",
            "description": "REPORT.csv also lists failed URL × strategy rows with errorClass / errorMessage.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}