{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot and PDF API - PNG, JPEG, PDF from any URL",
    "description": "Capture any public web page as PNG, JPEG or PDF with headless Chromium. Full-page, mobile and tablet presets, dark mode, wait-for-selector. One row per URL, private addresses refused, failed URLs never charged.",
    "version": "0.1",
    "x-build-id": "eulNQRHf9eoVxHh4z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/superslowsloth~website-screenshot-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-superslowsloth-website-screenshot-pdf",
        "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/superslowsloth~website-screenshot-pdf/runs": {
      "post": {
        "operationId": "runs-sync-superslowsloth-website-screenshot-pdf",
        "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/superslowsloth~website-screenshot-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-superslowsloth-website-screenshot-pdf",
        "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": "URLs",
            "type": "array",
            "description": "Public http(s) pages to capture, one per entry. Up to 100 per run. Private, loopback, link-local and cloud-metadata addresses are refused, and so is any page that redirects to one. A refused or failed URL gets a row explaining why and is not charged.",
            "items": {
              "type": "string"
            }
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "pdf"
            ],
            "type": "string",
            "description": "PNG is lossless and the default. JPEG is much smaller for photographic pages. PDF prints the page with the browser's print engine and is billed as its own event.",
            "default": "png"
          },
          "device": {
            "title": "Device preset",
            "enum": [
              "desktop",
              "mobile",
              "tablet"
            ],
            "type": "string",
            "description": "Sets the viewport, pixel density, touch support and user agent. Desktop is 1280x800 at 1x, mobile is 390x844 at 2x, tablet is 820x1180 at 2x. Viewport width and height below override the preset's size.",
            "default": "desktop"
          },
          "viewportWidth": {
            "title": "Viewport width (px)",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Overrides the device preset's width. Leave empty to use the preset. 200 to 3840."
          },
          "viewportHeight": {
            "title": "Viewport height (px)",
            "minimum": 200,
            "maximum": 4000,
            "type": "integer",
            "description": "Overrides the device preset's height. Leave empty to use the preset. 200 to 4000."
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole scrollable page instead of just the first screen. The page is scrolled once first so lazy-loaded images load. Images only; a PDF is always the whole document.",
            "default": false
          },
          "maxFullPageHeight": {
            "title": "Max full-page height (CSS px)",
            "minimum": 1000,
            "maximum": 16000,
            "type": "integer",
            "description": "A full-page capture taller than this is cut off at this height and the row says truncated. Chromium cannot render more than 16384 device pixels, so mobile and tablet presets (2x) are capped at 8192 CSS pixels whatever is set here.",
            "default": 12000
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "When navigation counts as finished. load waits for the load event, domcontentloaded is faster and may miss images, networkidle waits for 500 ms with no network traffic and fails on pages that never go quiet.",
            "default": "load"
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Extra time to wait after the page is ready and before capturing, for animations and late content. 0 to 30000.",
            "default": 0
          },
          "waitForSelector": {
            "title": "Wait for CSS selector",
            "type": "string",
            "description": "Wait until an element matching this CSS selector is visible before capturing. If it does not appear within the timeout the URL fails with a clear error and is not charged. Leave empty to skip."
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Ask the page for its dark colour scheme (prefers-color-scheme: dark). Pages without a dark theme look the same.",
            "default": false
          },
          "timeoutSecs": {
            "title": "Per-page timeout (s)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for each page to load, and again for the selector. 5 to 120. A page that never responds fails and is not charged. If the load event is not reached in time but the page has its document, it is captured as it stands and the row says wait_timed_out. The capture step itself always gets at least 30 s.",
            "default": 30
          },
          "captureErrorPages": {
            "title": "Capture HTTP error pages",
            "type": "boolean",
            "description": "By default a page that answers 4xx or 5xx fails with its status and is not charged. Turn on to capture the error page anyway; the row still reports the status.",
            "default": false
          },
          "pdfFormat": {
            "title": "PDF paper size",
            "enum": [
              "A3",
              "A4",
              "A5",
              "Letter",
              "Legal",
              "Tabloid"
            ],
            "type": "string",
            "description": "Paper size when the format is PDF. Ignored for images.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "PDF landscape",
            "type": "boolean",
            "description": "Print in landscape orientation. Ignored for images.",
            "default": false
          },
          "pdfPrintBackground": {
            "title": "PDF print backgrounds",
            "type": "boolean",
            "description": "Include background colours and images. Browsers leave them out of print by default, which makes many pages look blank; this is on unless you turn it off.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}