{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot, PDF & Visual Diff",
    "description": "Screenshot or PDF any list of URLs: desktop/tablet/mobile, full page or viewport, PNG/JPEG/WebP. Hides cookie banners, blocks ads, dark mode, lazy-load scroll. Visual diff flags changed pages with mismatch %, diff image and changed regions. Pay only for successful captures.",
    "version": "0.1",
    "x-build-id": "rKSAypNqDFlakGRuu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hanielazevedo~website-screenshot-pdf-visual-diff/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hanielazevedo-website-screenshot-pdf-visual-diff",
        "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/hanielazevedo~website-screenshot-pdf-visual-diff/runs": {
      "post": {
        "operationId": "runs-sync-hanielazevedo-website-screenshot-pdf-visual-diff",
        "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/hanielazevedo~website-screenshot-pdf-visual-diff/run-sync": {
      "post": {
        "operationId": "run-sync-hanielazevedo-website-screenshot-pdf-visual-diff",
        "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",
            "type": "array",
            "description": "Pages to capture. One row per URL × device. Bare domains get https:// added.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "devices": {
            "title": "Devices",
            "type": "array",
            "description": "One capture per URL per device.",
            "items": {
              "type": "string",
              "enum": [
                "desktop",
                "desktop-hd",
                "laptop",
                "tablet",
                "mobile",
                "mobile-small",
                "custom"
              ],
              "enumTitles": [
                "Desktop 1440×900",
                "Desktop HD 1920×1080",
                "Laptop 1280×800",
                "Tablet 820×1180 @2x",
                "Mobile 390×844 @3x (iPhone-size)",
                "Small mobile 360×740 @2x",
                "Custom (viewport fields below)"
              ]
            },
            "default": [
              "desktop"
            ]
          },
          "captureScreenshot": {
            "title": "Capture screenshot",
            "type": "boolean",
            "description": "Save an image of the page.",
            "default": true
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "On: the whole scrollable page (up to Max height). Off: only the first screen (viewport).",
            "default": true
          },
          "format": {
            "title": "Image format",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ],
            "type": "string",
            "description": "PNG is lossless; JPEG/WebP are much smaller.",
            "default": "png"
          },
          "quality": {
            "title": "JPEG/WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Ignored for PNG.",
            "default": 80
          },
          "maxHeight": {
            "title": "Max height (CSS px)",
            "minimum": 100,
            "maximum": 30000,
            "type": "integer",
            "description": "Full-page captures are cut at this height (row gets truncated: true). Stops infinite-scroll pages from producing giant images.",
            "default": 16000
          },
          "elementSelector": {
            "title": "Element selector",
            "type": "string",
            "description": "CSS selector: capture only this element (e.g. #pricing). Fails with SELECTOR_NOT_FOUND if missing."
          },
          "capturePdf": {
            "title": "Save as PDF",
            "type": "boolean",
            "description": "Save a print PDF of each page (charged as a separate 'pdf' event).",
            "default": false
          },
          "pdfFormat": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "A5",
              "Tabloid"
            ],
            "type": "string",
            "description": "Paper size for PDFs.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "PDF landscape",
            "type": "boolean",
            "description": "Landscape orientation for PDFs.",
            "default": false
          },
          "pdfPrintBackground": {
            "title": "PDF print backgrounds",
            "type": "boolean",
            "description": "Include background colours and images in PDFs.",
            "default": true
          },
          "pdfMargin": {
            "title": "PDF margin",
            "type": "string",
            "description": "CSS length for all sides: 0, 10mm, 0.5in, 20px.",
            "default": "10mm"
          },
          "pdfMedia": {
            "title": "PDF CSS media",
            "enum": [
              "screen",
              "print"
            ],
            "type": "string",
            "description": "Which CSS the PDF uses: the normal screen look or the site's print stylesheet.",
            "default": "screen"
          },
          "pdfScale": {
            "title": "PDF scale",
            "minimum": 0.1,
            "maximum": 2,
            "type": "number",
            "description": "Zoom of the PDF render (1 = 100%).",
            "default": 1
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle",
              "commit"
            ],
            "type": "string",
            "description": "networkidle waits up to the network-idle cap and then captures anyway, so chatty sites never hang.",
            "default": "load"
          },
          "networkIdleTimeoutMs": {
            "title": "Network-idle cap (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Longest wait for network idle before capturing anyway.",
            "default": 5000
          },
          "waitForSelector": {
            "title": "Wait for selector",
            "type": "string",
            "description": "CSS selector that must appear before capture (fails with WAIT_SELECTOR_TIMEOUT)."
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Fixed wait right before capture, for animations or late widgets.",
            "default": 0
          },
          "scrollToLoad": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "Scrolls down the page to trigger lazy loading, then back to the top before capture.",
            "default": true
          },
          "timeoutSecs": {
            "title": "Per-URL timeout (s)",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Per-URL timeout (s).",
            "default": 60
          },
          "maxRetries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries with exponential backoff for timeouts, connection errors, 5xx and crashes. 4xx and blocked pages are not retried.",
            "default": 2
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "3 is right for 2 GB memory; raise memory before raising this.",
            "default": 3
          },
          "cookieBanners": {
            "title": "Cookie banners",
            "enum": [
              "hide",
              "accept",
              "off"
            ],
            "type": "string",
            "description": "Cookie banners.",
            "default": "hide"
          },
          "hideSelectors": {
            "title": "Hide selectors",
            "type": "array",
            "description": "CSS selectors made invisible (layout kept), e.g. chat widgets, sticky headers.",
            "items": {
              "type": "string"
            }
          },
          "removeSelectors": {
            "title": "Remove selectors",
            "type": "array",
            "description": "CSS selectors removed from layout (display:none).",
            "items": {
              "type": "string"
            }
          },
          "blockAdsAndTrackers": {
            "title": "Block ads & trackers",
            "type": "boolean",
            "description": "Blocks requests to common ad/analytics hosts. Faster, cleaner shots.",
            "default": false
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Emulates prefers-color-scheme: dark (only sites that support it change).",
            "default": false
          },
          "customCss": {
            "title": "Custom CSS",
            "type": "string",
            "description": "Injected into every page before capture."
          },
          "disableAnimations": {
            "title": "Freeze animations",
            "type": "boolean",
            "description": "Stops CSS animations/transitions and the caret for stable, diff-friendly shots.",
            "default": true
          },
          "diffMode": {
            "title": "Visual diff",
            "enum": [
              "off",
              "previousRun",
              "baselineUrl"
            ],
            "type": "string",
            "description": "previousRun: keeps the last screenshot per URL+device+settings in a named key-value store and compares the next run against it. The first run only creates baselines.",
            "default": "off"
          },
          "diffThresholdPercent": {
            "title": "Changed if mismatch above (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Changed if mismatch above (%).",
            "default": 0.1
          },
          "pixelThreshold": {
            "title": "Pixel sensitivity",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "0 = any colour change counts; 0.1 ignores anti-aliasing/compression noise.",
            "default": 0.1
          },
          "updateBaseline": {
            "title": "Update baseline",
            "enum": [
              "always",
              "never"
            ],
            "type": "string",
            "description": "Update baseline.",
            "default": "always"
          },
          "baselineStoreName": {
            "title": "Baseline store name",
            "type": "string",
            "description": "Named key-value store this Actor creates in your account to keep baselines. Use different names for different monitors.",
            "default": "screenshot-baselines"
          },
          "baselineStore": {
            "title": "Or pick an existing baseline store",
            "type": "string",
            "description": "Optional. Overrides the name above. The Actor gets read/write access to this store only."
          },
          "comparePairs": {
            "title": "Compare pairs (baselineUrl mode)",
            "type": "array",
            "description": "[{\"url\":\"https://staging.example.com\",\"baselineUrl\":\"https://example.com\"}]. baselineUrl may be a page or an image URL (.png/.jpg/.webp)."
          },
          "viewportWidth": {
            "title": "Custom width",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Width for the 'custom' device.",
            "default": 1440
          },
          "viewportHeight": {
            "title": "Custom height",
            "minimum": 200,
            "maximum": 4000,
            "type": "integer",
            "description": "Height for the 'custom' device (also the viewport-capture height).",
            "default": 900
          },
          "deviceScaleFactor": {
            "title": "Custom pixel ratio",
            "minimum": 0.5,
            "maximum": 4,
            "type": "number",
            "description": "Pixel ratio for the 'custom' device (2 = retina).",
            "default": 1
          },
          "isMobile": {
            "title": "Custom is mobile",
            "type": "boolean",
            "description": "Emulate a touch phone (mobile layout, mobile user agent) for the 'custom' device.",
            "default": false
          },
          "userAgent": {
            "title": "User agent override",
            "type": "string",
            "description": "Replace the browser user agent for all devices."
          },
          "locale": {
            "title": "Locale",
            "type": "string",
            "description": "Browser language, e.g. pt-BR. Sent as Accept-Language.",
            "default": "en-US"
          },
          "timezoneId": {
            "title": "Time zone",
            "type": "string",
            "description": "e.g. Europe/Lisbon"
          },
          "captureErrorPages": {
            "title": "Capture 4xx/5xx pages",
            "type": "boolean",
            "description": "Off: error pages fail (free). On: they are captured and charged.",
            "default": false
          },
          "ignoreHttpsErrors": {
            "title": "Ignore HTTPS errors",
            "type": "boolean",
            "description": "Capture sites with expired or self-signed certificates.",
            "default": false
          },
          "proxyUrl": {
            "title": "Your proxy URL",
            "type": "string",
            "description": "Optional http://user:pass@host:port of your own proxy."
          },
          "maxUrls": {
            "title": "Max URLs",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Safety cap on the number of URLs processed.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}