{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot & URL to PDF API (Bulk, Full Page)",
    "description": "Capture website screenshots (PNG, JPEG, WebP) and PDFs from a list of URLs. Files are stored in the default key-value store with public URLs. Failures become error rows; the run never fails as a whole.",
    "version": "1.0",
    "x-build-id": "gKhJz1elWnmk0ZIz9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sunburst077~website-screenshot-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sunburst077-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/sunburst077~website-screenshot-pdf/runs": {
      "post": {
        "operationId": "runs-sync-sunburst077-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/sunburst077~website-screenshot-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-sunburst077-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",
            "minItems": 0,
            "maxItems": 500,
            "uniqueItems": true,
            "type": "array",
            "description": "Pages to capture. Accepts a list of http(s) URLs. If omitted, the default list is used so Apify daily tests produce a non-empty dataset. You can also pass startUrls (Crawlee request-list format); both lists are merged and de-duplicated.",
            "items": {
              "type": "string"
            },
            "default": [
              "https://example.com",
              "https://docs.apify.com"
            ]
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional Crawlee-style start URL list (objects with a url field, or plain strings). Merged with urls. Use this if you are wiring the Actor from a crawler task. requestsFromUrl entries are ignored.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "outputs": {
            "title": "Output formats",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "One or more formats to produce for every URL. Each URL × format pair becomes one dataset row and one key-value store file. PNG is lossless. JPEG and WebP use imageQuality. PDF uses the paper options below.",
            "items": {
              "type": "string",
              "enum": [
                "png",
                "jpeg",
                "webp",
                "pdf"
              ],
              "enumTitles": [
                "PNG image",
                "JPEG image",
                "WebP image",
                "PDF document"
              ]
            },
            "default": [
              "png",
              "pdf"
            ]
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "When enabled, image captures include the full scrollable document instead of only the viewport. Ignored when selector is set (element capture is always the element's box). PDF always renders the print layout of the full document.",
            "default": true
          },
          "devicePreset": {
            "title": "Device preset",
            "enum": [
              "desktop",
              "laptop",
              "iphone",
              "ipad",
              "custom"
            ],
            "type": "string",
            "description": "Viewport, user-agent, and touch settings. desktop is 1920×1080, laptop is 1366×768, iphone is 390×844 (3× scale), ipad is 820×1180 (2× scale). Custom uses viewportWidth and viewportHeight with a desktop Chrome user-agent.",
            "default": "desktop"
          },
          "viewportWidth": {
            "title": "Viewport width",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Browser viewport width in CSS pixels. Applied when devicePreset is custom, or when you set a value other than the 1920×1080 default to override a preset. Typical range is 320–3840.",
            "default": 1920
          },
          "viewportHeight": {
            "title": "Viewport height",
            "minimum": 240,
            "maximum": 2160,
            "type": "integer",
            "description": "Browser viewport height in CSS pixels. Applied when devicePreset is custom, or when you set a value other than the 1920×1080 default to override a preset. Typical range is 240–2160.",
            "default": 1080
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "Playwright navigation wait condition. load waits for the load event (good default). domcontentloaded is faster but may miss late resources. networkidle waits until there are no more than two network connections for 500 ms — more complete, but can time out on pages with long-polling or analytics.",
            "default": "load"
          },
          "delayMs": {
            "title": "Extra delay after load",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Milliseconds to wait after navigation (and after cookie-banner / lazy-scroll steps) before taking the capture. Use this for animations, late hero images, or client-rendered charts.",
            "default": 0
          },
          "timeoutSecs": {
            "title": "Timeout per URL",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum seconds allowed for navigation of a single URL. A navigation timeout is retried once. Other failures become an error row and the Actor continues.",
            "default": 30
          },
          "selector": {
            "title": "Element selector",
            "type": "string",
            "description": "Optional CSS selector. When set, image captures screenshot only the first matching element instead of the page. If the selector matches nothing, that URL × format is recorded as an error row. PDF still renders the full document."
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Best-effort CSS and JavaScript heuristic that dismisses or hides common consent banners (OneTrust, Cookiebot, Quantcast, Didomi, Complianz, CookieYes, and generic cookie/consent dialogs). No third-party consent API is used. Some sites will still show a banner.",
            "default": true
          },
          "scrollToLoad": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "Scroll through the page in viewport-sized steps so lazy-loaded images and infinite placeholders can fetch before capture. Then scrolls back to the top. Adds time on long pages.",
            "default": false
          },
          "blockTrackers": {
            "title": "Block heavy trackers",
            "type": "boolean",
            "description": "Optionally abort requests to common analytics, tag-manager, and ad-pixel hosts (Google Analytics, GTM, Facebook, Hotjar, and similar). Can speed up capture and cut noise. Leave off if the page depends on those scripts to render.",
            "default": false
          },
          "imageQuality": {
            "title": "JPEG / WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality for JPEG and WebP captures, from 1 (smallest) to 100 (least compressed). PNG is always lossless and ignores this value.",
            "default": 80
          },
          "pdfFormat": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "Letter"
            ],
            "type": "string",
            "description": "Paper size used when outputs includes pdf. A4 is 210×297 mm. Letter is 8.5×11 in. Dimensions in the dataset row are reported in CSS pixels at 96 DPI.",
            "default": "A4"
          },
          "landscape": {
            "title": "PDF landscape",
            "type": "boolean",
            "description": "Print the PDF in landscape orientation. Ignored for image formats.",
            "default": false
          },
          "printBackground": {
            "title": "Print background graphics",
            "type": "boolean",
            "description": "Include CSS backgrounds and colors in the PDF. Turn off for a printer-friendly, mostly text document.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many pages to capture in parallel. The Actor reuses one Chromium browser. Keep this low on 1024 MB runs (1–2). Higher values use more memory and can OOM on 2048 MB if pages are huge.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy used by the browser. Defaults to no proxy so the Actor works on the Apify FREE plan. Automatic Apify Proxy is used only if you enable it here. On the FREE plan, Apify Proxy works only from Actors running on the platform (not from your laptop). Custom proxy URLs are also 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}