{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API — Full-Page PNG, JPEG, PDF, WebP",
    "description": "Screenshot any URL as PNG, JPEG, WebP or PDF. Full-page shots that work: sticky headers un-stuck, cookie banners and ads removed, lazy content settled. Device presets, dark mode, retina, authenticated pages, PDF controls, proxy. Charged only per successful screenshot — no startup fee.",
    "version": "0.2",
    "x-build-id": "DcfBeJ45Rgi2UO6su"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/runlayer~web-screenshot-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-runlayer-web-screenshot-pro",
        "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/runlayer~web-screenshot-pro/runs": {
      "post": {
        "operationId": "runs-sync-runlayer-web-screenshot-pro",
        "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/runlayer~web-screenshot-pro/run-sync": {
      "post": {
        "operationId": "run-sync-runlayer-web-screenshot-pro",
        "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 to capture",
            "type": "array",
            "description": "One or more public URLs. Each produces one image/PDF and one billable event. You may omit the https:// prefix.",
            "items": {
              "type": "string"
            }
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "png (lossless), jpeg or webp (smaller, use Quality), or pdf (full document).",
            "default": "png"
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the entire scrollable page instead of just the visible viewport.",
            "default": true
          },
          "device": {
            "title": "Device preset",
            "enum": [
              "Desktop",
              "Desktop HD",
              "iPhone",
              "Android",
              "iPad",
              "Custom"
            ],
            "type": "string",
            "description": "Emulate a common device (viewport, pixel density, mobile/touch). Choose Custom to set your own width/height/scale below.",
            "default": "Desktop"
          },
          "viewportWidth": {
            "title": "Viewport width (px)",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Browser width in pixels. Used only when Device preset = Custom.",
            "default": 1280
          },
          "viewportHeight": {
            "title": "Viewport height (px)",
            "minimum": 200,
            "maximum": 4320,
            "type": "integer",
            "description": "Browser height in pixels. Used only when Device preset = Custom. Full-page captures grow past this to fit the page.",
            "default": 800
          },
          "deviceScaleFactor": {
            "title": "Pixel density / retina (1–3)",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Device pixel ratio. 2 or 3 renders crisp @2x/@3x 'retina' images. Used only when Device preset = Custom.",
            "default": 1
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Emulate prefers-color-scheme: dark so sites render their dark theme.",
            "default": false
          },
          "blockCookieBanners": {
            "title": "Remove cookie / consent banners",
            "type": "boolean",
            "description": "Hide the common GDPR/cookie/consent overlays that otherwise ruin ~40% of screenshots.",
            "default": true
          },
          "clickAcceptCookies": {
            "title": "…or click 'Accept' instead of hiding",
            "type": "boolean",
            "description": "If a consent dialog exposes an Accept/Agree button, click it (dismisses banners that reappear after hiding).",
            "default": false
          },
          "blockAds": {
            "title": "Block ads & trackers",
            "type": "boolean",
            "description": "Remove common ad slots and tracking iframes before capture.",
            "default": true
          },
          "hideStickyHeaders": {
            "title": "Fix sticky/fixed headers on full-page (recommended)",
            "type": "boolean",
            "description": "On full-page shots, convert position:fixed/sticky elements so headers, nav bars and chat widgets appear once in place instead of floating over or repeating down the page. This is the classic full-page bug most tools don't solve.",
            "default": true
          },
          "hideSelectors": {
            "title": "Hide specific elements (CSS selectors)",
            "type": "array",
            "description": "Extra CSS selectors to hide before capture, e.g. '.newsletter-popup' or '#chat-widget'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "omitBackground": {
            "title": "Transparent background",
            "type": "boolean",
            "description": "Capture a transparent background where the page has none (PNG/WebP only).",
            "default": false
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "When to consider navigation done before capturing.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for element (CSS selector)",
            "type": "string",
            "description": "Wait until this element appears before capturing."
          },
          "delayMs": {
            "title": "Extra delay after load (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Fixed wait after the page settles, for late-rendering content or animations.",
            "default": 0
          },
          "selector": {
            "title": "Capture a single element (CSS selector)",
            "type": "string",
            "description": "Screenshot only the element matching this selector instead of the page (ignores Full page)."
          },
          "fullPageMaxHeight": {
            "title": "Max full-page height (px, 0 = unlimited)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Cap the height of full-page captures so pathologically long pages don't produce huge files. 0 = no cap.",
            "default": 0
          },
          "quality": {
            "title": "Image quality (1–100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality for JPEG/WebP. Higher = better & larger. Ignored for PNG/PDF.",
            "default": 85
          },
          "customCss": {
            "title": "Inject custom CSS",
            "type": "string",
            "description": "Extra CSS applied before capture (e.g. hide elements, tweak layout)."
          },
          "customJs": {
            "title": "Inject custom JavaScript",
            "type": "string",
            "description": "JavaScript run in the page before capture (e.g. click a tab, dismiss a modal). Runs after load."
          },
          "blockResources": {
            "title": "Block resource types (faster captures)",
            "type": "array",
            "description": "Skip loading these resource types to speed up capture. Blocking 'image'/'media' changes appearance; 'font' rarely does.",
            "items": {
              "type": "string",
              "enum": [
                "image",
                "font",
                "media",
                "stylesheet"
              ],
              "enumTitles": [
                "Images",
                "Fonts",
                "Media (video/audio)",
                "Stylesheets"
              ]
            },
            "default": []
          },
          "timeoutMs": {
            "title": "Navigation timeout (ms)",
            "minimum": 5000,
            "maximum": 120000,
            "type": "integer",
            "description": "Max time to wait for a page to load before capturing whatever has rendered.",
            "default": 45000
          },
          "cookies": {
            "title": "Cookies",
            "type": "array",
            "description": "Cookies to set before loading — capture logged-in/paywalled pages you have access to. Array of objects like [{\"name\":\"session\",\"value\":\"abc\"}]; domain defaults to each target URL. Only use cookies for accounts you own."
          },
          "headers": {
            "title": "Custom HTTP headers",
            "type": "object",
            "description": "Extra request headers, e.g. {\"Authorization\":\"Bearer …\"}."
          },
          "httpUsername": {
            "title": "HTTP Basic auth — username",
            "type": "string",
            "description": "Username for HTTP Basic authentication (optional)."
          },
          "httpPassword": {
            "title": "HTTP Basic auth — password",
            "type": "string",
            "description": "Password for HTTP Basic authentication. Stored encrypted."
          },
          "geolocation": {
            "title": "Geolocation",
            "type": "object",
            "description": "Emulate a GPS position, e.g. {\"latitude\":48.85,\"longitude\":2.35}. Grants the page geolocation permission."
          },
          "timezoneId": {
            "title": "Timezone",
            "type": "string",
            "description": "IANA timezone to emulate, e.g. America/New_York or Europe/London."
          },
          "locale": {
            "title": "Locale",
            "type": "string",
            "description": "Locale/language to emulate, e.g. en-US or de-DE (also sets Accept-Language)."
          },
          "pdfFormat": {
            "title": "PDF page size",
            "enum": [
              "A3",
              "A4",
              "A5",
              "Letter",
              "Legal",
              "Tabloid"
            ],
            "type": "string",
            "description": "Paper size for PDF output.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "PDF landscape orientation",
            "type": "boolean",
            "description": "Render the PDF in landscape instead of portrait.",
            "default": false
          },
          "pdfScale": {
            "title": "PDF scale",
            "type": "string",
            "description": "Rendering scale, 0.1–2 (1 = 100%).",
            "default": "1"
          },
          "pdfMargin": {
            "title": "PDF margin",
            "type": "string",
            "description": "Margin on all sides, e.g. 0, 1cm, 0.5in.",
            "default": "0"
          },
          "pdfPrintBackground": {
            "title": "PDF print background",
            "type": "boolean",
            "description": "Include background colors/images in the PDF.",
            "default": true
          },
          "pageRanges": {
            "title": "PDF page ranges",
            "type": "string",
            "description": "Restrict PDF to certain pages, e.g. 1-3."
          },
          "proxyConfiguration": {
            "title": "Proxy (improves reliability on protected sites)",
            "type": "object",
            "description": "Off by default (fast, works on most sites). Enable Apify Proxy — including residential — to capture bot-protected sites that block datacenter IPs.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}