{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API: Full-Page, Mobile & PDF",
    "description": "Capture full-page or viewport screenshots of any list of URLs as PNG, JPEG or PDF. Desktop, laptop, tablet and mobile presets, dark mode, wait-for-selector, and built-in ad and cookie-banner blocking. Returns a shareable image URL per page.",
    "version": "0.1",
    "x-build-id": "YI8PexG0ocpWgTyhp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datawright-labs~website-screenshot/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datawright-labs-website-screenshot",
        "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/datawright-labs~website-screenshot/runs": {
      "post": {
        "operationId": "runs-sync-datawright-labs-website-screenshot",
        "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/datawright-labs~website-screenshot/run-sync": {
      "post": {
        "operationId": "run-sync-datawright-labs-website-screenshot",
        "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": "Pages to capture, one per line. URLs without a scheme get https:// added.",
            "default": [
              "https://example.com"
            ],
            "items": {
              "type": "string"
            }
          },
          "viewports": {
            "title": "Viewport presets",
            "type": "array",
            "description": "Each URL is captured once per selected viewport. desktop = 1920x1080, laptop = 1366x768, tablet = 810x1080 (iPad, 2x), mobile = 390x844 (iPhone 13, 3x, mobile user agent). Choose custom to use the width/height below.",
            "items": {
              "type": "string",
              "enum": [
                "desktop",
                "laptop",
                "tablet",
                "mobile",
                "custom"
              ],
              "enumTitles": [
                "Desktop 1920x1080",
                "Laptop 1366x768",
                "Tablet 810x1080",
                "Mobile 390x844",
                "Custom size"
              ]
            },
            "default": [
              "desktop"
            ]
          },
          "customWidth": {
            "title": "Custom width (px)",
            "minimum": 0,
            "maximum": 3840,
            "type": "integer",
            "description": "Used with the custom viewport.",
            "default": 0
          },
          "customHeight": {
            "title": "Custom height (px)",
            "minimum": 0,
            "maximum": 4320,
            "type": "integer",
            "description": "Used with the custom viewport.",
            "default": 0
          },
          "deviceScaleFactor": {
            "title": "Pixel density override",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "0 = use the preset's density (tablet 2x, mobile 3x, others 1x). Set 1 for smaller files, 2 for retina-quality desktop captures.",
            "default": 0
          },
          "fullPage": {
            "title": "Full-page capture",
            "type": "boolean",
            "description": "Capture the whole scrollable page instead of just the visible viewport. For PDF this produces a single long page.",
            "default": false
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "pdf"
            ],
            "type": "string",
            "description": "PNG (lossless), JPEG (smaller files) or PDF.",
            "default": "png"
          },
          "maxFullPageHeight": {
            "title": "Max full-page height (px)",
            "minimum": 1000,
            "maximum": 30000,
            "type": "integer",
            "description": "Full-page captures of extremely long pages are cut at this height (CSS pixels) to avoid browser crashes. At 2x/3x pixel density the cap is also limited to 24,000 device pixels (e.g. 8,000 CSS px on the 3x mobile preset). Truncated rows get fullPageTruncated = true.",
            "default": 15000
          },
          "jpegQuality": {
            "title": "JPEG quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Only for JPEG.",
            "default": 80
          },
          "pdfPaperFormat": {
            "title": "PDF paper format",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "Tabloid"
            ],
            "type": "string",
            "description": "Only for PDF without full-page mode.",
            "default": "A4"
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Emulates prefers-color-scheme: dark. Only sites that support a dark theme will change.",
            "default": false
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "Navigation event to wait for before capturing.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for CSS selector",
            "type": "string",
            "description": "Optional. Wait until this element is visible before capturing, e.g. #main or .product-grid."
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Extra wait after the page is ready, for animations and late content.",
            "default": 1000
          },
          "scrollToBottom": {
            "title": "Scroll page to trigger lazy loading",
            "type": "boolean",
            "description": "Scroll through the page before capturing so lazy-loaded images appear. Recommended with full-page capture.",
            "default": false
          },
          "blockCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hide cookie/consent pop-ups using community filter lists plus built-in rules for common consent platforms. Most, not all, banners are removed.",
            "default": true
          },
          "blockAds": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Block ad and tracker requests (EasyList / EasyPrivacy based).",
            "default": true
          },
          "hideSelectors": {
            "title": "Hide these CSS selectors",
            "type": "array",
            "description": "Extra elements to hide, e.g. chat widgets: #intercom-container",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "timeoutSecs": {
            "title": "Page timeout (seconds)",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "Max time for navigation, selector wait and capture.",
            "default": 60
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Pages captured in parallel. Full-page and mobile (3x) captures of long pages use a lot of memory; raise memory before raising this.",
            "default": 2
          },
          "maxRetries": {
            "title": "Max retries per page",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries for timeouts and transient errors. DNS errors are not retried.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Use a proxy to capture geo-specific versions of pages or avoid blocking.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}