{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot & PDF API",
    "description": "Capture full-page screenshots (PNG, JPEG) and PDFs of any website. Hides cookie banners, blocks ads, emulates phones, tablets and dark mode. Run in batch or call it as a real-time HTTP API.",
    "version": "0.1",
    "x-build-id": "Ucodywhw1B7ebL9US"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datadock-labs~website-screenshot-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datadock-labs-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/datadock-labs~website-screenshot-pdf/runs": {
      "post": {
        "operationId": "runs-sync-datadock-labs-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/datadock-labs~website-screenshot-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-datadock-labs-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": "Web pages to capture. You can paste URLs, upload a text file or link a remote list.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "pdf"
            ],
            "type": "string",
            "description": "PNG is lossless, JPEG is smaller, PDF produces a printable document.",
            "default": "png"
          },
          "fullPage": {
            "title": "Full-page screenshot",
            "type": "boolean",
            "description": "Capture the whole scrollable page instead of only the visible viewport.",
            "default": true
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "iphone-15-pro",
              "iphone-se",
              "pixel-7",
              "galaxy-s9",
              "ipad-pro-11",
              "ipad-mini"
            ],
            "type": "string",
            "description": "Emulate a phone or tablet (viewport, pixel density, user agent and touch). Desktop uses the viewport size below.",
            "default": "desktop"
          },
          "viewportWidth": {
            "title": "Viewport width",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Browser window width for the desktop device.",
            "default": 1366
          },
          "viewportHeight": {
            "title": "Viewport height",
            "minimum": 240,
            "maximum": 4320,
            "type": "integer",
            "description": "Browser window height for the desktop device. With full-page off, this is the screenshot height.",
            "default": 768
          },
          "scaleFactor": {
            "title": "Pixel density (retina)",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "1 = normal, 2 = retina (twice the pixels), 3 = extra sharp. Desktop device only.",
            "default": 1
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hide cookie-consent and GDPR pop-ups of the most common consent platforms (nothing is clicked or accepted).",
            "default": true
          },
          "blockAds": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Block requests to common ad, analytics and session-recording services. Pages load faster and look cleaner.",
            "default": true
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Tell the website the visitor prefers a dark color scheme (works on sites that support it).",
            "default": false
          },
          "hideSelectors": {
            "title": "Hide elements",
            "type": "array",
            "description": "CSS selectors of elements to hide, for example chat widgets or sticky headers.",
            "items": {
              "type": "string"
            }
          },
          "customCss": {
            "title": "Custom CSS",
            "type": "string",
            "description": "CSS injected into the page before the capture."
          },
          "customJs": {
            "title": "Custom JavaScript",
            "type": "string",
            "description": "JavaScript run in the page before the capture (for example to click a tab). Async code and await are supported; it is stopped after 15 seconds."
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle",
              "commit"
            ],
            "type": "string",
            "description": "When navigation counts as finished. 'load' fits most pages; 'networkidle' waits for late requests too.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for element",
            "type": "string",
            "description": "CSS selector that must be visible before the capture."
          },
          "delayMs": {
            "title": "Extra delay",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Additional wait after the page is ready, for animations or late content.",
            "default": 0
          },
          "lazyLoad": {
            "title": "Load lazy images",
            "type": "boolean",
            "description": "Scroll through the page before full-page and PDF captures so lazy-loaded images appear.",
            "default": true
          },
          "timeoutSecs": {
            "title": "Page timeout",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time to load one page. Slow pages are still captured with whatever was rendered.",
            "default": 30
          },
          "selector": {
            "title": "Capture only this element",
            "type": "string",
            "description": "CSS selector of a single element to capture (for example a chart or a product card). Images only."
          },
          "jpegQuality": {
            "title": "JPEG quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1-100. Lower values give smaller files.",
            "default": 80
          },
          "omitBackground": {
            "title": "Transparent background (PNG)",
            "type": "boolean",
            "description": "Make the default white page background transparent.",
            "default": false
          },
          "maxHeight": {
            "title": "Maximum page height",
            "minimum": 500,
            "maximum": 20000,
            "type": "integer",
            "description": "Very long pages are cut at this height to keep files usable.",
            "default": 16000
          },
          "pdfFormat": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "A3",
              "A5",
              "Letter",
              "Legal",
              "Tabloid"
            ],
            "type": "string",
            "description": "Paper size of the PDF.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "Landscape",
            "type": "boolean",
            "description": "Landscape page orientation.",
            "default": false
          },
          "pdfPrintBackground": {
            "title": "Print backgrounds",
            "type": "boolean",
            "description": "Include background colors and images.",
            "default": true
          },
          "pdfMarginMm": {
            "title": "Margins",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Page margin on all sides.",
            "default": 10
          },
          "pdfMedia": {
            "title": "CSS media",
            "enum": [
              "print",
              "screen"
            ],
            "type": "string",
            "description": "'print' uses the site's print stylesheet, 'screen' makes the PDF look like the website on screen.",
            "default": "print"
          },
          "skipHttpErrors": {
            "title": "Skip error pages",
            "type": "boolean",
            "description": "Do not capture (and do not charge for) pages that answer with HTTP 400 or higher.",
            "default": false
          },
          "userAgent": {
            "title": "User agent",
            "type": "string",
            "description": "Override the browser user agent string."
          },
          "maxRetries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "How many times to retry a page that fails to load.",
            "default": 1
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many pages are captured at the same time. Increase memory when you raise this.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional proxy, for example to see a page from another country."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}