{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot & PDF Generator",
    "description": "Screenshot any website or HTML as PNG, JPEG, WebP or PDF. Full page with lazy-loaded images, 13 devices in one run, cookie banners refused and hidden, ads blocked, real PDF layout options. Batch, sitemap or a live HTTP API.",
    "version": "1.1",
    "x-build-id": "M0tuJQiGJnxYsstCt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/webthreenity~website-screenshot-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-webthreenity-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/webthreenity~website-screenshot-pdf/runs": {
      "post": {
        "operationId": "runs-sync-webthreenity-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/webthreenity~website-screenshot-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-webthreenity-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",
        "properties": {
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Pages to capture. Plain URLs, one per line. `{ \"url\": \"...\" }` objects are accepted too, so input written for Apify's Website Screenshot Generator works unchanged.",
            "items": {
              "type": "string"
            }
          },
          "html": {
            "title": "HTML instead of URLs",
            "type": "string",
            "description": "Render this HTML instead of a URL. Handy for invoices, reports, social cards or email previews. Use absolute URLs for images and stylesheets."
          },
          "sitemapUrl": {
            "title": "Sitemap URL",
            "type": "string",
            "description": "Capture the pages listed in a sitemap.xml (sitemap indexes and .gz files work). Added to the URLs above."
          },
          "maxSitemapPages": {
            "title": "Max pages from the sitemap",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many sitemap pages.",
            "default": 100
          },
          "format": {
            "title": "File format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "PDF uses the PDF options below.",
            "default": "png"
          },
          "devices": {
            "title": "Devices",
            "type": "array",
            "description": "Every URL is captured once per device. Pick several to get desktop, tablet and phone versions in one run.",
            "items": {
              "type": "string",
              "enum": [
                "desktop",
                "laptop",
                "macbook",
                "desktop_2k",
                "ipad",
                "ipad_landscape",
                "iphone",
                "iphone_pro_max",
                "iphone_se",
                "pixel",
                "galaxy",
                "og_image",
                "square",
                "custom"
              ],
              "enumTitles": [
                "Desktop 1920×1080",
                "Laptop 1366×768",
                "MacBook Retina 1440×900 @2x",
                "Desktop 2K 2560×1440",
                "iPad Pro 11",
                "iPad Pro 11 landscape",
                "iPhone 16",
                "iPhone 16 Pro Max",
                "iPhone SE",
                "Pixel 9",
                "Galaxy S24",
                "Social card 1200×630",
                "Square 1080×1080",
                "Custom size (below)"
              ]
            },
            "default": [
              "desktop"
            ]
          },
          "width": {
            "title": "Custom width",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Used with the Custom size device.",
            "default": 1280
          },
          "height": {
            "title": "Custom height",
            "minimum": 200,
            "maximum": 4320,
            "type": "integer",
            "description": "Used with the Custom size device. With full page on, this is only the window height.",
            "default": 800
          },
          "deviceScaleFactor": {
            "title": "Custom pixel density",
            "minimum": 1,
            "maximum": 3,
            "type": "number",
            "description": "Used with the Custom size device. 2 gives a sharp Retina image.",
            "default": 1
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole scrollable page instead of the first screen. Social card and square devices always capture one screen.",
            "default": true
          },
          "maxHeight": {
            "title": "Max page height",
            "minimum": 1000,
            "maximum": 60000,
            "type": "integer",
            "description": "Very long pages are cut at this height.",
            "default": 20000
          },
          "selector": {
            "title": "Capture one element",
            "type": "string",
            "description": "CSS selector. Only the first matching element is captured, for example `#pricing` or `.hero`."
          },
          "quality": {
            "title": "JPEG / WebP quality",
            "minimum": 10,
            "maximum": 100,
            "type": "integer",
            "description": "Lower means smaller files. 85 looks the same as the original for most pages.",
            "default": 85
          },
          "transparentBackground": {
            "title": "Transparent background",
            "type": "boolean",
            "description": "PNG and WebP only. Pages with their own background colour stay opaque.",
            "default": false
          },
          "colorScheme": {
            "title": "Colour scheme",
            "enum": [
              "light",
              "dark"
            ],
            "type": "string",
            "description": "Dark asks the site for its dark mode, if it has one.",
            "default": "light"
          },
          "cookieBanners": {
            "title": "Cookie banners",
            "enum": [
              "reject",
              "accept",
              "hide",
              "keep"
            ],
            "type": "string",
            "description": "Refuse clicks the 'Reject' or 'Necessary only' button of 300+ consent tools, then hides anything left. Accept clicks 'Accept all'. Hide only hides banners without clicking. Keep leaves them on the page.",
            "default": "reject"
          },
          "blockAds": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Uses EasyList, EasyPrivacy and uBlock Origin filters. Faster pages and cleaner images.",
            "default": true
          },
          "hideSelectors": {
            "title": "Hide these elements",
            "type": "array",
            "description": "CSS selectors to remove before the capture, for example a chat widget or a promo bar.",
            "items": {
              "type": "string"
            }
          },
          "customCss": {
            "title": "Custom CSS",
            "type": "string",
            "description": "Added to the page before the capture."
          },
          "customJs": {
            "title": "Custom JavaScript",
            "type": "string",
            "description": "Runs in the page before the capture. Can be async. Example: `document.querySelector('.tab-2').click()`"
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "When the page counts as loaded. Network idle is slower but safer for heavy JavaScript sites.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for element",
            "type": "string",
            "description": "Wait until this CSS selector is visible before capturing."
          },
          "delayMs": {
            "title": "Extra delay",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Wait this long after the page is ready, for late animations or charts.",
            "default": 0
          },
          "scrollToLoad": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "Scrolls through the page first so lazy-loaded images and sections appear in full-page captures and PDFs.",
            "default": true
          },
          "timeoutSecs": {
            "title": "Page timeout",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "Give up on a page after this long. Failed pages are not charged.",
            "default": 45
          },
          "pdfFormat": {
            "title": "Paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "A5",
              "Tabloid"
            ],
            "type": "string",
            "description": "Paper size of each PDF page.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "Landscape",
            "type": "boolean",
            "description": "Turn the paper sideways. Good for wide tables and dashboards.",
            "default": false
          },
          "pdfMargin": {
            "title": "Margins",
            "type": "string",
            "description": "One value for all sides (`10mm`) or four values top, right, bottom, left (`20mm 15mm 20mm 15mm`). Units: mm, cm, in, px.",
            "default": "10mm"
          },
          "pdfMedia": {
            "title": "Look",
            "enum": [
              "screen",
              "print"
            ],
            "type": "string",
            "description": "Screen keeps the website's normal look. Print uses the site's print stylesheet, if it has one.",
            "default": "screen"
          },
          "pdfSinglePage": {
            "title": "One long page",
            "type": "boolean",
            "description": "The whole website on one tall page, with no page breaks (up to 200 inches). Paper size and margins are ignored.",
            "default": false
          },
          "pdfPageNumbers": {
            "title": "Page numbers",
            "type": "boolean",
            "description": "Adds 'Page 1 of 3' at the bottom of every page.",
            "default": false
          },
          "pdfPrintBackground": {
            "title": "Print backgrounds",
            "type": "boolean",
            "description": "Keep background colours and images, like on screen.",
            "default": true
          },
          "pdfScale": {
            "title": "Scale",
            "minimum": 0.1,
            "maximum": 2,
            "type": "number",
            "description": "Zoom the content, from 0.1 to 2.",
            "default": 1
          },
          "cookies": {
            "title": "Cookies",
            "type": "array",
            "description": "Log in by passing session cookies: `[{ \"name\": \"session\", \"value\": \"...\", \"domain\": \".example.com\" }]`."
          },
          "headers": {
            "title": "Extra HTTP headers",
            "type": "object",
            "description": "Sent with every request, for example `{ \"Authorization\": \"Bearer ...\" }`."
          },
          "userAgent": {
            "title": "User agent",
            "type": "string",
            "description": "Overrides the device's user agent."
          },
          "locale": {
            "title": "Language",
            "type": "string",
            "description": "Browser language, for example `fr-FR` or `en-US`.",
            "default": "en-US"
          },
          "timezone": {
            "title": "Time zone",
            "type": "string",
            "description": "IANA time zone, for example `Europe/Paris`."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Off by default. Datacenter proxies cost nothing extra. Residential proxies are charged per MB of traffic they carry, shown in each result as residentialTrafficMb (see Pricing).",
            "default": {
              "useApifyProxy": false
            }
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 0,
            "maximum": 16,
            "type": "integer",
            "description": "0 picks the right number for the run's memory: 2 pages per CPU core (Apify gives 1 core per 4 GB). Higher values are capped at 4 per core.",
            "default": 0
          },
          "maxRetries": {
            "title": "Retries per page",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "How many more times to try a page that failed to load.",
            "default": 1
          },
          "includeBase64": {
            "title": "Include the file in the dataset",
            "type": "boolean",
            "description": "Adds the file as a base64 data URL to each dataset row. Handy for AI agents and no-code tools. Files over 5 MB are skipped.",
            "default": false
          },
          "url": {
            "title": "URL (single)",
            "type": "string",
            "description": "Same as one entry in URLs."
          },
          "device": {
            "title": "Device (single)",
            "type": "string",
            "description": "Same as one entry in Devices."
          },
          "viewportWidth": {
            "title": "Viewport width (compatibility)",
            "type": "integer",
            "description": "Accepted for compatibility. Same as the Custom size device with this width."
          },
          "scrollToBottom": {
            "title": "Scroll to bottom (compatibility)",
            "type": "boolean",
            "description": "Accepted for compatibility."
          },
          "delay": {
            "title": "Delay (compatibility)",
            "type": "integer",
            "description": "Accepted for compatibility. Same as Extra delay."
          },
          "selectorsToHide": {
            "title": "Selectors to hide (compatibility)",
            "type": "string",
            "description": "Accepted for compatibility. Comma-separated."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}