{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot & PDF Generator API",
    "description": "Website screenshot API: full-page, viewport or element captures, and webpage-to-PDF export. Removes cookie banners, blocks ads, loads lazy images. Device presets, retina scale, dark mode. Pay per use, no subscription.",
    "version": "1.0",
    "x-build-id": "VUaPvfCuMBJMHxyh4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/power_on~screenshot-url-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-power_on-screenshot-url-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/power_on~screenshot-url-pdf/runs": {
      "post": {
        "operationId": "runs-sync-power_on-screenshot-url-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/power_on~screenshot-url-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-power_on-screenshot-url-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",
            "minItems": 1,
            "type": "array",
            "description": "Pages to capture. One screenshot (or PDF) is produced per URL.",
            "default": [
              "https://example.com"
            ],
            "items": {
              "type": "string"
            }
          },
          "device": {
            "title": "Device preset",
            "enum": [
              "desktop",
              "laptop",
              "tablet",
              "mobile",
              "custom"
            ],
            "type": "string",
            "description": "Viewport, user agent and pixel density. Choose 'Custom' to set width and height yourself.",
            "default": "desktop"
          },
          "width": {
            "title": "Custom width (px)",
            "minimum": 200,
            "maximum": 4000,
            "type": "integer",
            "description": "Viewport width in pixels. Used only when the device preset is \"Custom\".",
            "default": 1920
          },
          "height": {
            "title": "Custom height (px)",
            "minimum": 200,
            "maximum": 4000,
            "type": "integer",
            "description": "Viewport height in pixels. Used only when the device preset is \"Custom\", and ignored for full-page captures.",
            "default": 1080
          },
          "scaleFactor": {
            "title": "Pixel density",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Pixel density of the output: 1 for standard, 2 for retina, 3 for extra high resolution.",
            "default": 1
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the entire scrollable page instead of just the visible viewport.",
            "default": true
          },
          "selector": {
            "title": "Element selector",
            "type": "string",
            "description": "Optional CSS selector. When set, only that element is captured."
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "Output type. PNG for lossless quality, JPEG or WebP for smaller files, PDF for a printable document.",
            "default": "png"
          },
          "quality": {
            "title": "Image quality (JPEG/WebP)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality for JPEG and WebP, from 1 to 100. Ignored for PNG and PDF.",
            "default": 85
          },
          "transparentBackground": {
            "title": "Transparent background (PNG)",
            "type": "boolean",
            "description": "Keeps the page background transparent instead of white. PNG only, and only works if the page itself has no background.",
            "default": false
          },
          "dismissCookieBanners": {
            "title": "Cookie banners",
            "enum": [
              "hide",
              "reject",
              "accept",
              "off"
            ],
            "type": "string",
            "description": "Cookie and consent overlays ruin screenshots. 'Hide' removes them from the page without clicking anything, which is the most reliable and does not accept any tracking.",
            "default": "hide"
          },
          "blockAds": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Faster, more consistent screenshots and no empty ad slots.",
            "default": true
          },
          "hideSelectors": {
            "title": "Hide elements",
            "type": "array",
            "description": "CSS selectors to hide before capturing, e.g. sticky headers or chat widgets.",
            "items": {
              "type": "string"
            }
          },
          "customCss": {
            "title": "Custom CSS",
            "type": "string",
            "description": "Injected before the capture."
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Renders the page as if the visitor preferred a dark colour scheme.",
            "default": false
          },
          "locale": {
            "title": "Locale",
            "type": "string",
            "description": "Browser language, e.g. en-US, it-IT, de-DE.",
            "default": "en-US"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string",
            "description": "IANA name, e.g. Europe/Rome."
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle",
              "commit"
            ],
            "type": "string",
            "description": "How long to wait for the page before capturing. \"Network idle\" is the most complete and the slowest.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for element",
            "type": "string",
            "description": "Wait until this CSS selector appears before capturing."
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Wait a little longer after loading, for animations or late content.",
            "default": 0
          },
          "scrollToBottom": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "Scrolls through the page first so lazy-loaded images appear in a full-page capture.",
            "default": true
          },
          "timeoutSecs": {
            "title": "Timeout per URL (s)",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "How long to give a single URL before giving up on it.",
            "default": 60
          },
          "concurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many URLs to capture at the same time.",
            "default": 4
          },
          "retries": {
            "title": "Retries per URL",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many times to retry a URL that failed before recording it as an error.",
            "default": 2
          },
          "headers": {
            "title": "Extra HTTP headers",
            "type": "object",
            "description": "Extra HTTP headers sent with every request, as a JSON object."
          },
          "cookies": {
            "title": "Cookies",
            "type": "array",
            "description": "Playwright cookie objects, for pages behind a login."
          },
          "basicAuthUsername": {
            "title": "HTTP Basic auth — username",
            "type": "string",
            "description": "Username for HTTP Basic authentication, for staging sites behind a password."
          },
          "basicAuthPassword": {
            "title": "HTTP Basic auth — password",
            "type": "string",
            "description": "Password for HTTP Basic authentication."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Use a proxy for geo-specific or blocked pages.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}