{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot & PDF API – Full-Page, Mobile, Batch",
    "version": "0.2",
    "x-build-id": "6tvWKhk57iKgJdyQx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/batuweb~website-screenshot/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-batuweb-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/batuweb~website-screenshot/runs": {
      "post": {
        "operationId": "runs-sync-batuweb-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/batuweb~website-screenshot/run-sync": {
      "post": {
        "operationId": "run-sync-batuweb-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",
        "properties": {
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Pages to capture. Only capture pages you are authorised to capture (your own sites, clients' sites with permission, or public pages whose terms allow it). Duplicates are removed.",
            "default": [
              {
                "url": "https://apify.com"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "format": {
            "title": "Format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "Output file type. PDF is billed as a separate 'PDF captured' event.",
            "default": "png"
          },
          "quality": {
            "title": "JPEG/WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1–100. Ignored for PNG and PDF.",
            "default": 80
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole scrollable page (up to 'Max full-page height'). Off = only the visible viewport.",
            "default": true
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "laptop",
              "tablet",
              "mobile",
              "custom"
            ],
            "type": "string",
            "description": "Viewport preset. Tablet and mobile also send a mobile user agent and enable touch.",
            "default": "desktop"
          },
          "viewportWidth": {
            "title": "Viewport width (px)",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Overrides the preset width (required for 'Custom', default 1366)."
          },
          "viewportHeight": {
            "title": "Viewport height (px)",
            "minimum": 200,
            "maximum": 4320,
            "type": "integer",
            "description": "Overrides the preset height (default 768 for 'Custom')."
          },
          "deviceScaleFactor": {
            "title": "Pixel ratio",
            "enum": [
              "1",
              "1.5",
              "2",
              "3"
            ],
            "type": "string",
            "description": "Device pixel ratio (retina = 2). Empty = preset default."
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Emulate prefers-color-scheme: dark (works on sites that support it).",
            "default": false
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hides ~45 common consent managers (OneTrust, Cookiebot, Usercentrics, Didomi, Sourcepoint, Borlabs …) by CSS. Nothing is clicked or consented.",
            "default": true
          },
          "selectorsToHide": {
            "title": "Extra CSS selectors to hide",
            "type": "string",
            "description": "One selector per line, e.g. chat widgets or popups."
          },
          "scrollToBottom": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "Scrolls through the page before a full-page or PDF capture so lazy-loaded images appear.",
            "default": true
          },
          "maxFullPageHeight": {
            "title": "Max full-page height (px)",
            "minimum": 500,
            "maximum": 16000,
            "type": "integer",
            "description": "Height limit for every mode: full-page images and element captures are cut at this height, PDFs get as many pages as fit into this length (at least one). Cut captures show truncated: true. WebP is also limited to 16,383 image pixels.",
            "default": 10000
          },
          "selector": {
            "title": "Capture only this element (CSS selector)",
            "type": "string",
            "description": "Screenshot only the first matching visible element, e.g. 'header' or '#pricing'. Image formats only."
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "Navigation event to wait for.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for selector",
            "type": "string",
            "description": "Optional CSS selector that must be visible before capturing."
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Wait this long after the page is ready (animations, charts).",
            "default": 0
          },
          "navigationTimeoutSecs": {
            "title": "Page timeout (s)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Max time for loading a page.",
            "default": 45
          },
          "pdfPaper": {
            "title": "PDF paper size",
            "enum": [
              "a4",
              "letter",
              "legal",
              "a3"
            ],
            "type": "string",
            "description": "Only for PDF.",
            "default": "a4"
          },
          "pdfLandscape": {
            "title": "PDF landscape",
            "type": "boolean",
            "description": "Only for PDF.",
            "default": false
          },
          "pdfPrintBackground": {
            "title": "PDF print backgrounds",
            "type": "boolean",
            "description": "Only for PDF.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Pages captured at the same time. Raise memory for >4.",
            "default": 3
          },
          "maxRetries": {
            "title": "Retries per URL",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Retries after timeouts or connection errors. Failed URLs are never charged.",
            "default": 1
          },
          "maxScreenshots": {
            "title": "Max captures",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many successful captures (0 = no limit). The run's max cost limit is also respected.",
            "default": 0
          },
          "captureErrorPages": {
            "title": "Capture error pages (HTTP 4xx/5xx)",
            "type": "boolean",
            "description": "Off: 404/500 pages become free error records. On: they are captured and charged.",
            "default": false
          },
          "ignoreRobotsTxt": {
            "title": "Ignore robots.txt (own sites only)",
            "type": "boolean",
            "description": "By default URLs (and redirect targets) disallowed by the site's robots.txt are skipped (free); an unreachable robots.txt counts as full disallow. Only enable for sites you own or are explicitly authorised to capture. robots.txt is not permission either way.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Off by default (direct, fastest). If you enable a proxy and it can't start, the run stops before any page is requested.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}