{
  "openapi": "3.0.1",
  "info": {
    "title": "PWA Install Readiness and Manifest Asset Gate",
    "description": "Reads the manifest link from the HTML head of each origin, reads the web app manifest, then verifies every declared icon, screenshot and shortcut icon with one HEAD and one ranged GET. It reports the true pixel size read from the file header against the d",
    "version": "0.1",
    "x-build-id": "zw6gtvogFXiQ6TLh7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kingii98~pwa-install-readiness-and-manifest-asset-gate/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kingii98-pwa-install-readiness-and-manifest-asset-gate",
        "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/kingii98~pwa-install-readiness-and-manifest-asset-gate/runs": {
      "post": {
        "operationId": "runs-sync-kingii98-pwa-install-readiness-and-manifest-asset-gate",
        "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/kingii98~pwa-install-readiness-and-manifest-asset-gate/run-sync": {
      "post": {
        "operationId": "run-sync-kingii98-pwa-install-readiness-and-manifest-asset-gate",
        "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": [
          "origins"
        ],
        "properties": {
          "origins": {
            "title": "Origins or page URLs",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "1 to 100 public site origins or page URLs. The Actor reads the manifest link from the HTML head of each one. Private, loopback and reserved addresses are refused, and so are URLs that hold credentials.",
            "default": [
              "https://squoosh.app/"
            ],
            "items": {
              "type": "string"
            }
          },
          "requiredIconSizes": {
            "title": "Required icon sizes (profile)",
            "type": "array",
            "description": "Square icon edges that the manifest must cover with a reachable general-purpose icon. An icon that declares a larger square covers a smaller requirement.",
            "default": [
              "192",
              "512"
            ],
            "items": {
              "type": "string"
            }
          },
          "requireMaskableIcon": {
            "title": "Require a maskable icon (profile)",
            "type": "boolean",
            "description": "The manifest must declare at least one reachable icon with purpose \"maskable\". Without one, Android crops the icon into the adaptive shape.",
            "default": true
          },
          "requiredScreenshotFormFactors": {
            "title": "Required screenshot form factors (profile)",
            "type": "array",
            "description": "Form factors that the screenshots must cover for the rich install dialog. A screenshot with no form_factor member counts as narrow. An empty list turns the rule off.",
            "items": {
              "type": "string",
              "enum": [
                "narrow",
                "wide"
              ],
              "enumTitles": [
                "narrow (phone)",
                "wide (desktop)"
              ]
            },
            "default": [
              "narrow",
              "wide"
            ]
          },
          "requiredShortcutCount": {
            "title": "Required shortcut count (profile)",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many shortcuts the manifest must declare for the long-press menu. 0 turns the rule off.",
            "default": 0
          },
          "allowedDisplayModes": {
            "title": "Allowed display modes (profile)",
            "type": "array",
            "description": "The display modes that count as installable. The manifest passes when display, or an entry of display_override, holds one of them.",
            "items": {
              "type": "string",
              "enum": [
                "standalone",
                "fullscreen",
                "minimal-ui",
                "window-controls-overlay"
              ]
            },
            "default": [
              "standalone",
              "fullscreen",
              "minimal-ui",
              "window-controls-overlay"
            ]
          },
          "rules": {
            "title": "Rules",
            "type": "array",
            "description": "The rules that decide the verdict. An empty list runs every rule.",
            "items": {
              "type": "string",
              "enum": [
                "manifest_link",
                "manifest_reachable",
                "manifest_parsable",
                "manifest_content_type",
                "name",
                "short_name",
                "start_url",
                "scope",
                "display",
                "background_color",
                "theme_color",
                "icon_sizes",
                "icon_assets",
                "maskable_icon",
                "screenshots",
                "shortcuts",
                "shortcut_icon_assets",
                "service_worker",
                "secure_origin"
              ]
            },
            "default": [
              "manifest_link",
              "manifest_reachable",
              "manifest_parsable",
              "manifest_content_type",
              "name",
              "short_name",
              "start_url",
              "scope",
              "display",
              "background_color",
              "theme_color",
              "icon_sizes",
              "icon_assets",
              "maskable_icon",
              "screenshots",
              "shortcuts",
              "shortcut_icon_assets",
              "service_worker",
              "secure_origin"
            ]
          },
          "serviceWorkerPaths": {
            "title": "Service worker script paths",
            "type": "array",
            "description": "Candidate paths for the service worker script, tried in order. A registration found inside an inline script of the page is tried first. Each path is resolved against the page URL.",
            "default": [
              "/sw.js",
              "/service-worker.js",
              "/serviceworker.js"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxAssets": {
            "title": "Maximum assets for one run",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on the number of verified assets in one run. Assets above the cap are counted in the origin record and are not verified or charged.",
            "default": 200
          },
          "assetHeaderBytes": {
            "title": "Asset header read size (bytes)",
            "minimum": 32,
            "maximum": 8192,
            "type": "integer",
            "description": "How many bytes of each asset the ranged GET reads. 64 bytes is enough for PNG, GIF, WebP, BMP and ICO. Raise it to about 4096 when your icons are JPEG or SVG, because their size sits deeper in the file.",
            "default": 64
          },
          "maxRedirects": {
            "title": "Maximum redirects",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Hop limit for one request. A chain that does not end inside this limit is reported as unreachable.",
            "default": 5
          },
          "timeoutSeconds": {
            "title": "Request timeout (seconds)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Timeout for one HTTP request.",
            "default": 20
          },
          "maxDocumentBytes": {
            "title": "Maximum document bytes",
            "minimum": 65536,
            "maximum": 10485760,
            "type": "integer",
            "description": "Hard cap on the bytes read from one HTML page or one manifest. A larger document is cut.",
            "default": 2097152
          },
          "concurrency": {
            "title": "Concurrent asset probes",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many asset probes run at the same time. Keep this low, so your CDN is not put under load.",
            "default": 4
          },
          "userAgent": {
            "title": "User agent",
            "pattern": "^[\\x20-\\x7E]*$",
            "type": "string",
            "description": "User-Agent header sent with every request, so your host can identify this Actor in its logs. ASCII characters only.",
            "default": "PwaInstallGate/0.1 (+https://apify.com)"
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}