{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API - Full Page, Mobile, PDF & Element",
    "description": "Capture website screenshots from a list of URLs: full page, above the fold or fixed height, desktop/tablet/mobile, PNG/JPEG/WebP or PDF, one element by CSS selector. Cookie banners dismissed, sticky headers fixed, emojis rendered. Failed pages are free. $0.003 per screenshot.",
    "version": "1.0",
    "x-build-id": "5BkbMBAzEPYpwyUrt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kantolabs~website-screenshot/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kantolabs-website-screenshot",
        "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/kantolabs~website-screenshot/runs": {
      "post": {
        "operationId": "runs-sync-kantolabs-website-screenshot",
        "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/kantolabs~website-screenshot/run-sync": {
      "post": {
        "operationId": "run-sync-kantolabs-website-screenshot",
        "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": "Page URLs",
            "type": "array",
            "description": "Web pages to capture, one per line. 'example.com' is read as https://example.com. Each URL gives one screenshot (one dataset row). Pages that fail to load, answer an HTTP error or show a bot-protection page are free rows with the reason.",
            "default": [
              "https://example.com",
              "https://www.python.org"
            ],
            "items": {
              "type": "string"
            }
          },
          "captureMode": {
            "title": "What to capture",
            "enum": [
              "fullPage",
              "viewport",
              "fixedHeight"
            ],
            "type": "string",
            "description": "Full page = the whole scrolling page (up to 'Max height'). Viewport = only the visible screen ('above the fold'). Fixed height = the top of the page down to 'Fixed height' pixels.",
            "default": "fullPage"
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "laptop",
              "tablet",
              "mobile"
            ],
            "type": "string",
            "description": "Screen size and browser type. Desktop 1440x900, laptop 1280x800, tablet 820x1180 (2x), mobile 390x844 (2x, mobile browser, touch). Viewport width/height below override the preset size.",
            "default": "desktop"
          },
          "viewportWidth": {
            "title": "Viewport width (px)",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Custom browser width in CSS pixels. Leave empty to use the device preset."
          },
          "viewportHeight": {
            "title": "Viewport height (px)",
            "minimum": 200,
            "maximum": 2160,
            "type": "integer",
            "description": "Custom browser height in CSS pixels (this is the height of a 'Viewport only' screenshot). Leave empty to use the device preset."
          },
          "fixedHeight": {
            "title": "Fixed height (px)",
            "minimum": 100,
            "maximum": 16000,
            "type": "integer",
            "description": "Height of the screenshot when 'What to capture' is 'Fixed height from the top'.",
            "default": 2000
          },
          "maxHeight": {
            "title": "Max height for full page (px)",
            "minimum": 1000,
            "maximum": 30000,
            "type": "integer",
            "description": "Very long pages are cut at this height (the row then says truncated: true).",
            "default": 16000
          },
          "deviceScaleFactor": {
            "title": "Pixel density (scale)",
            "minimum": 1,
            "maximum": 3,
            "type": "number",
            "description": "1 = normal, 2 = retina/sharp (4x the pixels). Leave empty to use the device preset (desktop 1, tablet and mobile 2)."
          },
          "format": {
            "title": "Image format",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ],
            "type": "string",
            "description": "PNG = lossless, JPEG and WebP = much smaller files (see 'Quality').",
            "default": "png"
          },
          "quality": {
            "title": "JPEG / WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1-100. Ignored for PNG.",
            "default": 80
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "networkidle",
              "domcontentloaded"
            ],
            "type": "string",
            "description": "When the page counts as loaded. 'Load' suits most sites. 'Network idle' waits until requests stop (best for single-page apps; capped at 15 s so endless trackers never hang the run). 'DOM ready' is fastest.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for element (CSS selector)",
            "type": "string",
            "description": "Optional. Waits until this element is visible before capturing, e.g. '#main' or '.product-grid'. If it never appears, the row fails free."
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Optional pause right before the capture, for animations or late widgets. 0-60000.",
            "default": 0
          },
          "scrollToLoadLazyContent": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "Full page / fixed height: scrolls down quickly (at most 15 s) so lazy-loaded images appear, then back to the top before the capture.",
            "default": true
          },
          "dismissCookieBanners": {
            "title": "Dismiss cookie banners",
            "type": "boolean",
            "description": "Clicks 'Accept' on common consent managers (OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics, TrustArc...) and hides cookie layers that remain.",
            "default": true
          },
          "hidePopups": {
            "title": "Hide large pop-ups",
            "type": "boolean",
            "description": "Also hides any fixed overlay covering more than 30% of the screen (newsletter / sign-up modals). Off by default because a few sites use a fixed full-screen layout.",
            "default": false
          },
          "blockAdsAndTrackers": {
            "title": "Block ads, trackers and chat widgets",
            "type": "boolean",
            "description": "Blocks common ad, analytics and chat-widget scripts and video/audio files. Pages load faster and chat bubbles stay out of the image. Turn off to capture the page exactly as a visitor sees it, ads included.",
            "default": true
          },
          "unstickHeaders": {
            "title": "Fix sticky headers",
            "type": "boolean",
            "description": "Full page / fixed height: pins sticky and fixed headers to the top of the page so they are not drawn again further down the image.",
            "default": true
          },
          "hideSelectors": {
            "title": "Hide elements (CSS selectors)",
            "type": "array",
            "description": "Elements to hide before the capture, e.g. '.chat-widget', '#promo-bar'.",
            "items": {
              "type": "string"
            }
          },
          "elementSelector": {
            "title": "Capture one element (CSS selector)",
            "type": "string",
            "description": "Optional. Screenshot only this element (the first match), e.g. 'header', '#pricing', '.chart'. Overrides 'What to capture'. Not found = free row."
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Tells the site the visitor prefers a dark color scheme (only sites that support it change).",
            "default": false
          },
          "savePdf": {
            "title": "Also save a PDF",
            "type": "boolean",
            "description": "Also prints each page to a PDF (charged as a separate 'PDF' event, same price as a screenshot).",
            "default": false
          },
          "pdfFormat": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3"
            ],
            "type": "string",
            "description": "Paper size of the PDF.",
            "default": "A4"
          },
          "captureErrorPages": {
            "title": "Capture error pages",
            "type": "boolean",
            "description": "Off: pages answering HTTP 4xx/5xx or a bot-protection/CAPTCHA page are free rows without an image. On: they are captured and charged like any page (useful for uptime monitoring).",
            "default": false
          },
          "ignoreHttpsErrors": {
            "title": "Ignore HTTPS errors",
            "type": "boolean",
            "description": "Capture sites with expired or self-signed certificates.",
            "default": false
          },
          "pageTimeoutSecs": {
            "title": "Page timeout (seconds)",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Hard limit per page for loading and capturing. A page that is not done in time is a free row - one slow site never blocks the run.",
            "default": 60
          },
          "maxConcurrency": {
            "title": "Pages in parallel",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "0 = automatic (3 pages at the default 2 GB, 6 at 4 GB). Lower it for very heavy pages.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy (datacenter) is used by default. Turn it off to connect directly.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}