{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot & PDF API: Full-Page PNG, JPEG, PDF",
    "description": "Website screenshot API: capture full-page or viewport screenshots (PNG, JPEG) or convert web pages to PDF in bulk with a real Chrome browser. Mobile and retina viewports, dark mode, element capture, lazy-load scrolling, ad blocking and cookie banner hiding. Failed pages are free.",
    "version": "0.1",
    "x-build-id": "vtbTNuUYSNZLliffk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/magenta_waterwheel~website-screenshot-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-magenta_waterwheel-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/magenta_waterwheel~website-screenshot-pdf/runs": {
      "post": {
        "operationId": "runs-sync-magenta_waterwheel-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/magenta_waterwheel~website-screenshot-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-magenta_waterwheel-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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "URLs",
            "type": "array",
            "description": "Web pages to capture. You can add URLs one by one, paste many at once, or upload a text file.",
            "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 for lossless screenshots, JPEG for smaller files, or PDF to print the page as a document.",
            "default": "png"
          },
          "fullPage": {
            "title": "Full-page screenshot",
            "type": "boolean",
            "description": "Capture the whole scrollable page instead of only the visible viewport. Ignored for PDF (PDFs always contain the whole page).",
            "default": true
          },
          "viewportWidth": {
            "title": "Viewport width (px)",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Browser window width. Use 390 for a phone-like view, 1280 or 1920 for desktop.",
            "default": 1280
          },
          "viewportHeight": {
            "title": "Viewport height (px)",
            "minimum": 200,
            "maximum": 2160,
            "type": "integer",
            "description": "Browser window height. With full-page off, this is the screenshot height.",
            "default": 800
          },
          "deviceScaleFactor": {
            "title": "Device scale factor",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Pixel density. Use 2 for sharp retina-quality screenshots. Files are about 4x larger, and screenshots above 1x have an extra high-resolution charge (see Pricing).",
            "default": 1
          },
          "colorScheme": {
            "title": "Color scheme",
            "enum": [
              "light",
              "dark"
            ],
            "type": "string",
            "description": "Ask the page to render in light or dark mode (works on sites that support prefers-color-scheme).",
            "default": "light"
          },
          "jpegQuality": {
            "title": "JPEG quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "JPEG quality from 1 to 100. Only used for JPEG.",
            "default": 80
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "When to consider the page loaded. \"Network idle\" waits for most background requests to finish, which is best for heavy single-page apps.",
            "default": "load"
          },
          "delaySecs": {
            "title": "Extra delay (seconds)",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Wait this many seconds after the page loads before capturing, for animations or late content. Maximum 10 seconds.",
            "default": 0
          },
          "scrollToBottom": {
            "title": "Scroll to bottom first",
            "type": "boolean",
            "description": "Scroll through the page before capturing so lazy-loaded images and sections appear in full-page screenshots and PDFs.",
            "default": false
          },
          "blockTrackers": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Block common ad, analytics, and tracking scripts (Google Analytics, Tag Manager, DoubleClick, Facebook Pixel, Hotjar, and similar) and streaming video files. Pages load faster and captures come out cleaner. Turn off to capture pages exactly as visitors see them, ads included.",
            "default": true
          },
          "hideSelectors": {
            "title": "Hide elements (CSS selectors)",
            "type": "array",
            "description": "CSS selectors of elements to hide before capturing, such as cookie banners, chat widgets or popups. Example: #onetrust-banner-sdk, .cookie-banner.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "selector": {
            "title": "Capture only this element (CSS selector)",
            "type": "string",
            "description": "Screenshot only the first element matching this CSS selector, for example #main or .pricing-table. Leave empty to capture the page. Ignored for PDF."
          },
          "pdfPaperFormat": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "Tabloid"
            ],
            "type": "string",
            "description": "Paper size for PDF output.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "Landscape PDF",
            "type": "boolean",
            "description": "Use landscape orientation for PDF output.",
            "default": false
          },
          "pdfPrintBackground": {
            "title": "Print backgrounds in PDF",
            "type": "boolean",
            "description": "Include background colors and images in PDF output.",
            "default": true
          },
          "failOnHttpError": {
            "title": "Skip pages with HTTP errors",
            "type": "boolean",
            "description": "Don't capture (or charge for) pages that return HTTP 4xx or 5xx, such as 404 Not Found. Turn off to capture error pages too.",
            "default": true
          },
          "navigationTimeoutSecs": {
            "title": "Page load timeout (seconds)",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time to wait for a page to load.",
            "default": 60
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum pages captured in parallel. The Actor also scales automatically based on available memory.",
            "default": 5
          },
          "maxRequestRetries": {
            "title": "Max retries per page",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many times to retry a page after a timeout, network error or HTTP 5xx error.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy, for example to capture a site as seen from another country. Not needed for most sites.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}