{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot & PDF API with Visual Change Monitor",
    "description": "Full page or viewport screenshots and PDFs from URLs, sitemaps or datasets. Device presets, cookie banner hiding, and visual change alerts with pixel diff.",
    "version": "1.0",
    "x-build-id": "4qxLnyqryXIjKRfqM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zhtech~website-screenshot-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zhtech-website-screenshot-monitor",
        "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/zhtech~website-screenshot-monitor/runs": {
      "post": {
        "operationId": "runs-sync-zhtech-website-screenshot-monitor",
        "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/zhtech~website-screenshot-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-zhtech-website-screenshot-monitor",
        "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 to capture",
            "type": "array",
            "description": "Page URLs or plain domains, one per line, e.g. \"https://example.com/pricing\" or \"example.com\". Leave empty to use a sitemap or dataset below. With no input at all the Actor captures https://example.com and https://apify.com as a demo.",
            "items": {
              "type": "string"
            }
          },
          "sitemapUrls": {
            "title": "Sitemap URLs",
            "type": "array",
            "description": "Optional. XML sitemaps (index files and .xml.gz work) or a site home page, in which case the sitemaps listed in its robots.txt (or /sitemap.xml) are used. URLs are queued in batches, so sitemaps with thousands of pages are fine.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset ID with URLs",
            "type": "string",
            "description": "Optional. ID or name of an Apify dataset (for example the output of another Actor). Each item's URL field is captured."
          },
          "datasetUrlField": {
            "title": "Dataset URL field",
            "type": "string",
            "description": "Which field of each dataset item holds the URL.",
            "default": "url"
          },
          "includeUrlPatterns": {
            "title": "Only sitemap or dataset URLs matching",
            "type": "array",
            "description": "Optional filter for sitemap and dataset URLs. Plain text (\"/blog/\"), globs (\"https://example.com/docs/*\") or a regex in slashes (\"/\\/products\\/\\d+/\"). URLs you type in the list above are always captured.",
            "items": {
              "type": "string"
            }
          },
          "maxUrls": {
            "title": "Max URLs",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper limit for the number of pages captured in this run (all sources together).",
            "default": 100
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "PNG is lossless (best for monitoring and design review). JPEG and WebP are much smaller. PDF prints the page to a document.",
            "default": "png"
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole page, not just the first screen. The page is scrolled first so lazy loaded images and sections appear, then captured (pages taller than Chrome's limit are captured in slices and stitched). Charged at the full page price.",
            "default": false
          },
          "selector": {
            "title": "Capture only this element (CSS selector)",
            "type": "string",
            "description": "Optional. Captures just the first visible element that matches, e.g. \"#pricing\", \"main\" or \".hero\". If nothing matches, the row says selector_not_found and is not charged."
          },
          "quality": {
            "title": "JPEG / WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1 to 100. Ignored for PNG and PDF.",
            "default": 80
          },
          "maxFullPageHeight": {
            "title": "Max full page height (CSS px)",
            "minimum": 500,
            "maximum": 60000,
            "type": "integer",
            "description": "Stops endless pages (infinite scroll feeds) from producing gigantic images. Taller pages are cut here and the row has truncated = true.",
            "default": 20000
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "laptop",
              "tablet",
              "phone"
            ],
            "type": "string",
            "description": "Desktop 1920x1080, Laptop 1366x768, Tablet 820x1180 (2x), Phone 390x844 (2x, mobile layout and touch).",
            "default": "desktop"
          },
          "viewportWidth": {
            "title": "Custom viewport width",
            "minimum": 0,
            "maximum": 3840,
            "type": "integer",
            "description": "Optional. Overrides the device width in CSS pixels. 0 = use the device preset.",
            "default": 0
          },
          "viewportHeight": {
            "title": "Custom viewport height",
            "minimum": 0,
            "maximum": 4320,
            "type": "integer",
            "description": "Optional. Overrides the device height in CSS pixels. 0 = use the device preset.",
            "default": 0
          },
          "deviceScaleFactor": {
            "title": "Pixel density (device scale factor)",
            "minimum": 0,
            "maximum": 4,
            "type": "number",
            "description": "Optional. 2 gives retina sharp images (4x the pixels). 0 = use the device preset.",
            "default": 0
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Tells the page the visitor prefers a dark color scheme (prefers-color-scheme: dark). Sites with a dark theme switch to it; sites without one look the same.",
            "default": false
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hides consent popups from common platforms (OneTrust, Cookiebot, Usercentrics, Didomi, Quantcast and many more) plus fixed overlays that talk about cookies or consent. It only hides them visually; it never clicks accept or reject for you.",
            "default": true
          },
          "hideAds": {
            "title": "Hide ads",
            "type": "boolean",
            "description": "Blocks requests to common ad networks and hides ad slots, so captures are cleaner and faster.",
            "default": true
          },
          "hideChatWidgets": {
            "title": "Hide chat widgets",
            "type": "boolean",
            "description": "Hides chat bubbles such as Intercom, Drift, HubSpot, Crisp, Tidio, Zendesk and Tawk.",
            "default": false
          },
          "hideSelectors": {
            "title": "Hide these elements (CSS selectors)",
            "type": "array",
            "description": "Optional. Anything else you want removed from the picture, e.g. \".newsletter-modal\", \"#promo-bar\".",
            "items": {
              "type": "string"
            }
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "domcontentloaded",
              "load",
              "networkidle"
            ],
            "type": "string",
            "description": "Page loaded (default) waits for the load event. Network idle also waits until requests calm down (best for dashboards and single page apps). Both are best effort with a time cap, so a chatty page never fails the capture.",
            "default": "load"
          },
          "delayMs": {
            "title": "Extra delay before capture (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Pause after loading, for animations and late content.",
            "default": 1000
          },
          "waitForSelector": {
            "title": "Wait for element (CSS selector)",
            "type": "string",
            "description": "Optional. Waits up to 15 seconds for this element to be visible before capturing."
          },
          "scrollDelayMs": {
            "title": "Scroll step delay for full page (ms)",
            "minimum": 0,
            "maximum": 3000,
            "type": "integer",
            "description": "Pause between scroll steps while loading lazy content. Raise it for slow image CDNs.",
            "default": 200
          },
          "navigationTimeoutSecs": {
            "title": "Page load timeout (seconds)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "How long to wait for the page to start rendering. Timed out pages are reported and not charged.",
            "default": 30
          },
          "pdfFormat": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "A5",
              "Tabloid"
            ],
            "type": "string",
            "description": "Only used when the format is PDF.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "Landscape",
            "type": "boolean",
            "description": "Landscape orientation for PDF output.",
            "default": false
          },
          "pdfPrintBackground": {
            "title": "Print backgrounds",
            "type": "boolean",
            "description": "Include background colors and images in the PDF.",
            "default": true
          },
          "pdfMediaType": {
            "title": "PDF look",
            "enum": [
              "screen",
              "print"
            ],
            "type": "string",
            "description": "Screen makes the PDF look like the website. Print uses the site's print stylesheet (often plain text).",
            "default": "screen"
          },
          "pdfMarginMm": {
            "title": "PDF margin (mm)",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Margin on all sides.",
            "default": 0
          },
          "monitorMode": {
            "title": "Visual change monitor",
            "type": "boolean",
            "description": "Compares every capture with the previous one for the same URL and settings (stored in a named key-value store that persists between runs). The first run saves baselines. Later runs output only pages that changed, with the changed percentage and a diff image. Schedule the Actor (daily, hourly) to get alerts.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Baseline store name",
            "type": "string",
            "description": "Named key-value store that keeps the last capture of each page. Use a different name per project or client to keep monitors separate.",
            "default": "screenshot-monitor"
          },
          "changeThresholdPercent": {
            "title": "Changed if more than (% of pixels)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "A page counts as changed when more than this share of its pixels differ (and at least 10 pixels changed). 0 catches any visible change, even one price or word (a changed ID line measured 0.055% in tests). Raise to 1 to 5 for busy pages with rotating content.",
            "default": 0
          },
          "pixelThreshold": {
            "title": "Pixel color sensitivity",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "How different two pixels must be to count as changed (0 = exact, 1 = very lenient). 0.1 is a good default.",
            "default": 0.1
          },
          "monitorIgnoreSelectors": {
            "title": "Ignore these areas (CSS selectors)",
            "type": "array",
            "description": "Optional. Elements that change on every visit (dates, carousels, stock tickers, \"x people viewing\") are blanked out before comparing, e.g. \".carousel\", \"#live-counter\".",
            "items": {
              "type": "string"
            }
          },
          "outputUnchanged": {
            "title": "Also output unchanged pages",
            "type": "boolean",
            "description": "By default unchanged pages produce no row (they are billed at the small monitor-unchanged price). Turn on to get a row for every page.",
            "default": false
          },
          "saveDiffImage": {
            "title": "Save diff image",
            "type": "boolean",
            "description": "For changed pages, save an image with the changed pixels highlighted in red.",
            "default": true
          },
          "updateBaseline": {
            "title": "Update the baseline",
            "enum": [
              "on-change",
              "never"
            ],
            "type": "string",
            "description": "On change: the next run compares with the latest changed version (alerts once per change). Never: always compare with the first capture (alerts every run until you reset the store).",
            "default": "on-change"
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many pages load at once. 3 is polite and fits 2 GB of memory; use more memory for higher values.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Off by default (direct connection). Datacenter proxy can help with rate limits or geo specific content. Proxies are never used to get past bot protection.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}