{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot & PDF API - Full Page, Mobile, Bulk",
    "description": "Capture screenshots or PDFs of web pages. Input: URLs; format (PNG, JPEG, WebP, PDF), full page or viewport, device preset, element selector, dark mode. Returns per URL: file URL, title, HTTP status, size. Hides cookie banners, loads lazy images. Charged only for successful captures.",
    "version": "1.0",
    "x-build-id": "2c5c0CWP1O4Hx64Pp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kadi_bence~website-screenshot/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kadi_bence-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/kadi_bence~website-screenshot/runs": {
      "post": {
        "operationId": "runs-sync-kadi_bence-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/kadi_bence~website-screenshot/run-sync": {
      "post": {
        "operationId": "run-sync-kadi_bence-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": "URLs",
            "type": "array",
            "description": "Web pages to capture, one per line, e.g. https://example.com/pricing or just example.com (https:// is added). Duplicates are skipped, max 50,000 per run. You can paste a CSV column. Only capture pages you are allowed to.",
            "items": {
              "type": "string"
            }
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "PNG = lossless, sharp text. JPEG / WebP = much smaller files (WebP smallest). PDF = printable document with selectable text. Every format costs the same.",
            "default": "png"
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "On: the whole scrollable page. Off: only the visible viewport (\"above the fold\"). Ignored for PDF and when a CSS selector is set.",
            "default": true
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "laptop",
              "tablet",
              "mobile"
            ],
            "type": "string",
            "description": "Desktop 1920x1080, Laptop 1366x768, Tablet 820x1180 (2x pixels, touch, mobile user agent), Mobile 412x915 (2x pixels, touch, Android Chrome user agent). Sites that serve a mobile layout will show it.",
            "default": "desktop"
          },
          "viewportWidth": {
            "title": "Custom viewport width (px)",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Overrides the device width (200-3840), e.g. 1280. Leave empty to use the device preset."
          },
          "viewportHeight": {
            "title": "Custom viewport height (px)",
            "minimum": 200,
            "maximum": 4320,
            "type": "integer",
            "description": "Overrides the device height (200-4320), e.g. 800. For viewport screenshots this is the image height."
          },
          "deviceScaleFactor": {
            "title": "Pixel density (retina)",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "1 = normal, 2 = retina (twice the pixels in each direction), 3 = extra sharp. Empty = device default (desktop 1, tablet and mobile 2). Bigger images take longer."
          },
          "selector": {
            "title": "Capture only this element (CSS selector)",
            "type": "string",
            "description": "Optional. Capture only the first visible element matching this CSS selector, e.g. #pricing, .hero or table.results. If nothing matches, the row is an error and is not charged."
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "networkidle",
              "domcontentloaded"
            ],
            "type": "string",
            "description": "Load = page load event (max 8 s after the page is ready) plus up to 1.5 s for late network requests (good default). Network idle = wait until the network is quiet (up to 15 s; slower but safer for single-page apps). DOM ready = fastest, may miss images.",
            "default": "load"
          },
          "delayMs": {
            "title": "Extra delay before capture (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Extra wait after loading, e.g. 2000 for pages with intro animations or slow charts. Max 30000.",
            "default": 0
          },
          "waitForSelector": {
            "title": "Wait for element (CSS selector)",
            "type": "string",
            "description": "Optional. Wait until this element is visible before capturing (max 15 s), e.g. .chart-loaded. If it never appears, the row is an error and is not charged."
          },
          "scrollToLoad": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "Scrolls through the page (max 8 s) before a full-page, element or PDF capture so lazy-loaded images and sections render, then scrolls back to the top.",
            "default": true
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hides consent pop-ups from 35+ consent tools (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast...) and other cookie overlays with CSS. Nothing is clicked: no consent is given on your behalf.",
            "default": true
          },
          "blockAds": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Blocks requests to common ad and tracking networks and hides empty ad slots. Faster loads and cleaner screenshots.",
            "default": true
          },
          "hideSelectors": {
            "title": "Hide these elements (CSS selectors)",
            "type": "array",
            "description": "Optional. Extra elements to hide before capture (up to 50), e.g. chat widgets or newsletter pop-ups: #intercom-container, .newsletter-modal",
            "items": {
              "type": "string"
            }
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Tell the page the visitor prefers a dark color scheme (prefers-color-scheme: dark). Works on sites that support dark mode.",
            "default": false
          },
          "quality": {
            "title": "JPEG / WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "JPEG and WebP quality, 1-100, e.g. 70 for small thumbnails. Higher = sharper but bigger files. Ignored for PNG and PDF.",
            "default": 80
          },
          "pdfFormat": {
            "title": "PDF page size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "A5",
              "Tabloid"
            ],
            "type": "string",
            "description": "Paper size for PDF output, e.g. A4 (Europe) or Letter (US).",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "PDF landscape",
            "type": "boolean",
            "description": "Landscape instead of portrait PDF pages. Useful for wide dashboards and tables.",
            "default": false
          },
          "pdfMargin": {
            "title": "PDF margin",
            "type": "string",
            "description": "Margin on all four sides, e.g. 10mm, 0.5in, 1cm, 20px or 0.",
            "default": "10mm"
          },
          "pdfPrintBackground": {
            "title": "PDF background colors and images",
            "type": "boolean",
            "description": "Keep background colors and images in the PDF (as on screen).",
            "default": true
          },
          "pdfUseScreenCss": {
            "title": "PDF looks like the screen",
            "type": "boolean",
            "description": "On: the PDF uses the page's normal screen styles (looks like the website). Off: the page's print stylesheet is used (often plainer, without navigation).",
            "default": true
          },
          "fullPageMaxHeight": {
            "title": "Max full-page height (px)",
            "minimum": 500,
            "maximum": 30000,
            "type": "integer",
            "description": "Very long or infinite-scroll pages are cut at this height (CSS pixels) and the row gets truncated: true. WebP is also limited to 16,383 px and JPEG to 65,500 px (divided by the pixel density).",
            "default": 20000
          },
          "maxConcurrency": {
            "title": "Parallel tabs",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages are captured at the same time. 0 = automatic from the run memory (2 GB: 3 tabs, 4 GB: 6, 8 GB: 12). For more speed, give the run more memory: the price per screenshot stays the same.",
            "default": 0
          },
          "navigationTimeoutSecs": {
            "title": "Page load timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Give up on a page that does not load within this time (it is retried once). Failed pages are not charged.",
            "default": 45
          },
          "maxRetries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Retries after a timeout, network error or tab crash (HTTP errors like 404 are not retried). Failed pages are not charged.",
            "default": 1
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip pages that the site's robots.txt does not allow for automated access (RFC 9309). Skipped pages are listed and not charged. Keep this on unless you own the site.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Usually not needed. Use Apify Proxy (datacenter) to capture from other IP addresses. Residential proxies are not supported.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}