{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API: Full Page Screenshot & URL to PDF",
    "description": "Website screenshot API: full page screenshot with lazy-loaded content, cookie banner removal (EU consent popups), iPhone/Pixel/iPad presets, element crop, dark mode, PNG/JPEG/WebP and URL to PDF / HTML to PDF. Batch URLs, direct file links, pay only for successful captures.",
    "version": "1.0",
    "x-build-id": "MwskYGB1Li61qpcel"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/polderbyte~website-screenshot-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-polderbyte-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/polderbyte~website-screenshot-pdf/runs": {
      "post": {
        "operationId": "runs-sync-polderbyte-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/polderbyte~website-screenshot-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-polderbyte-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": "One URL per line, e.g. https://www.example.com/pricing. A bare domain (example.com) gets https://. Each URL gives one image or PDF and one dataset row. Duplicates are removed; local and private addresses are not allowed.",
            "default": [
              "https://apify.com",
              "https://www.wikipedia.org"
            ],
            "items": {
              "type": "string"
            }
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "PNG (lossless), JPEG or WebP (smaller files, see Quality), or PDF (the whole page as a printable document, see the PDF options).",
            "default": "png"
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "desktop-hd",
              "laptop",
              "ipad",
              "iphone-15",
              "pixel-8",
              "custom"
            ],
            "type": "string",
            "description": "Screen size, pixel density and user agent to emulate. Phones and tablets get the mobile layout at their real pixel density (an iPhone 15 screenshot is 1179 px wide). Choose Custom to set your own viewport below.",
            "default": "desktop"
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole scrollable page instead of only the first screen. Lazy-loaded images and sections are loaded first (see 'Scroll to load lazy content'). Charged as a full-page screenshot.",
            "default": false
          },
          "selector": {
            "title": "Capture only this element (CSS selector)",
            "type": "string",
            "description": "Optional. Crop the screenshot to the first element matching this CSS selector, e.g. #pricing, .hero or article. If the element is missing or hidden, the URL fails and is not charged."
          },
          "hideCookieBanners": {
            "title": "Remove cookie banners",
            "type": "boolean",
            "description": "Accepts the cookie banner (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast, CookieYes, Complianz, Sourcepoint and about 20 more, plus 'Accept all / Alles accepteren / Akkoord / Tout accepter / Alle akzeptieren' buttons in 10+ languages), follows consent walls back to the page, and hides whatever banner is left.",
            "default": true
          },
          "darkMode": {
            "title": "Dark mode",
            "enum": [
              "off",
              "site",
              "force"
            ],
            "type": "string",
            "description": "Site dark theme = the browser asks for dark mode (prefers-color-scheme: dark), so sites with a dark theme show it. Force dark = additionally darkens sites that have no dark theme (Chromium's automatic dark mode).",
            "default": "off"
          },
          "blockAds": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Blocks requests to more than 100 common ad, analytics and tracking hosts (Google Ads, Meta pixel, Criteo, Taboola, Hotjar, ...). Pages load faster and lighter; ad slots stay empty.",
            "default": false
          },
          "viewportWidth": {
            "title": "Viewport width (Custom device)",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Width in CSS pixels, used only when Device is Custom.",
            "default": 1440
          },
          "viewportHeight": {
            "title": "Viewport height (Custom device)",
            "minimum": 200,
            "maximum": 4320,
            "type": "integer",
            "description": "Height in CSS pixels, used only when Device is Custom. For a full-page capture this is the first screen; the image grows with the page.",
            "default": 900
          },
          "deviceScaleFactor": {
            "title": "Pixel density (device scale factor)",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Optional. 2 gives a sharp 'retina' image twice as wide and high. Leave empty for the device's own density (1 for desktop and laptop)."
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "When the page counts as loaded. Load (default) suits most sites. Network idle also waits until no requests are running for 0.5 s (max 15 s), handy for dashboards and single-page apps. If a page never finishes loading, it is captured anyway when the timeout gets close.",
            "default": "load"
          },
          "delaySecs": {
            "title": "Extra delay (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Wait this many extra seconds before capturing, e.g. for animations, charts or a slow widget.",
            "default": 0
          },
          "scrollToBottom": {
            "title": "Scroll to load lazy content",
            "type": "boolean",
            "description": "Before a full-page, element or PDF capture, scroll through the whole page (or its main scroll area) so lazy-loaded images, infinite-scroll sections and scroll animations appear. Then scroll back to the top.",
            "default": true
          },
          "maxHeight": {
            "title": "Max page height (pixels)",
            "minimum": 1000,
            "maximum": 50000,
            "type": "integer",
            "description": "Full-page captures are cut off at this height in CSS pixels (the row then has truncated = true). Stops endless infinite-scroll pages. WebP files are limited to 16,383 image pixels per side.",
            "default": 20000
          },
          "customCss": {
            "title": "Custom CSS",
            "type": "string",
            "description": "Optional CSS injected before the capture, e.g. to hide a chat widget: #intercom-container { display: none !important; }"
          },
          "locale": {
            "title": "Browser language",
            "type": "string",
            "description": "Language and region the browser reports (Accept-Language and navigator.language), e.g. en-US, nl-BE, fr-FR or de-DE. Multilingual sites pick their language from this.",
            "default": "en-US"
          },
          "quality": {
            "title": "JPEG/WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1-100. Lower = smaller files. Ignored for PNG and PDF.",
            "default": 80
          },
          "pdfFormat": {
            "title": "Paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "A5",
              "Tabloid"
            ],
            "type": "string",
            "description": "Paper size of the PDF.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "Landscape",
            "type": "boolean",
            "description": "Print in landscape orientation.",
            "default": false
          },
          "pdfMargin": {
            "title": "Margins",
            "type": "string",
            "description": "Margin on all four sides, with a unit: mm, cm, in or px, e.g. 10mm, 1cm, 0.5in or 0 for none.",
            "default": "10mm"
          },
          "pdfPrintBackground": {
            "title": "Print backgrounds",
            "type": "boolean",
            "description": "Include background colours and images, so the PDF looks like the website.",
            "default": true
          },
          "pdfMedia": {
            "title": "Page style",
            "enum": [
              "screen",
              "print"
            ],
            "type": "string",
            "description": "Screen = the PDF looks like the website. Print = use the site's print stylesheet, if it has one (often without menus and ads).",
            "default": "screen"
          },
          "pdfScalePercent": {
            "title": "Scale (%)",
            "minimum": 10,
            "maximum": 200,
            "type": "integer",
            "description": "Zoom of the page on paper. 100 lays the page out at paper width; lower values (e.g. 60) fit a wider, desktop-like layout on the page.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Pages in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many URLs are captured at the same time in the shared browser. Lowered automatically to about one page per GB of run memory (Apify gives 1 CPU core per 4 GB, and capturing is CPU-bound); PDFs need about 1 GB each.",
            "default": 4
          },
          "timeoutSecs": {
            "title": "Timeout per URL (seconds)",
            "minimum": 15,
            "maximum": 300,
            "type": "integer",
            "description": "A URL that takes longer fails with status 'error' and is not charged. Heavy full pages on small memory (2 GB = half a CPU core) can need 60 s or more.",
            "default": 90
          },
          "maxRetries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Retries for a page that fails to load (timeouts, connection errors). DNS errors, downloads and HTTP errors are not retried.",
            "default": 1
          },
          "maxItems": {
            "title": "Max URLs",
            "minimum": 1,
            "type": "integer",
            "description": "Capture at most this many URLs per run. Keeps the cost of a run predictable.",
            "default": 1000
          },
          "keyValueStoreName": {
            "title": "Save files to a named key-value store",
            "type": "string",
            "description": "Optional. Files then go to this named store (kept until you delete it) instead of the run's own store (deleted after your plan's data retention). Keys get a date-time prefix, so repeated runs build a history, which is useful for monitoring and archiving. Letters, digits and '-' only."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}