{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot & PDF Capture + Change Alerts",
    "description": "Take website screenshots of any URL list: full page, viewport or one page element, in PNG, JPEG or WebP at desktop, tablet and phone sizes. Optional URL to PDF. Each row has a file link. Visual change detection compares with the last run and returns a diff image.",
    "version": "0.1",
    "x-build-id": "et3F6gzyN7yaytnxV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maliksaid~website-screenshot-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maliksaid-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/maliksaid~website-screenshot-pdf/runs": {
      "post": {
        "operationId": "runs-sync-maliksaid-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/maliksaid~website-screenshot-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-maliksaid-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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Web pages to capture, one per line. A URL without https:// gets it added. Pages that robots.txt disallows are skipped and listed with a reason.",
            "default": [
              "https://crawlee.dev",
              "https://books.toscrape.com"
            ],
            "items": {
              "type": "string"
            }
          },
          "htmlDocuments": {
            "title": "HTML documents",
            "type": "array",
            "description": "Optional. Raw HTML to capture as an image or PDF, one document per entry, up to 2 MB each and 5 MB in total per run. Use it for invoices, reports or social cards that have no public URL. To capture only HTML, clear the URLs list. Remote images and fonts load as usual, and each remote host's robots.txt applies. Local files never load.",
            "default": []
          },
          "viewports": {
            "title": "Viewports",
            "type": "array",
            "description": "Screen sizes to capture each URL at. Use desktop (1440x900), laptop (1280x800), tablet (768x1024), phone (390x844) or a size such as 1920x1080. Each URL and viewport pair is one capture.",
            "default": [
              "desktop",
              "phone"
            ],
            "items": {
              "type": "string"
            }
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "On: capture the whole scrolling page. Off: capture only the visible viewport (above the fold).",
            "default": true
          },
          "format": {
            "title": "Image format",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ],
            "type": "string",
            "description": "File type of each screenshot. PNG is lossless. JPEG and WebP files are smaller.",
            "default": "png"
          },
          "quality": {
            "title": "JPEG and WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Image quality from 1 to 100 for JPEG and WebP. PNG ignores it.",
            "default": 80
          },
          "scale": {
            "title": "Pixel density (scale)",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "1 is a normal screen. 2 gives sharp images like a retina screen, and 3 like a high-end phone. Files are larger. To keep memory safe, a full page at 2 or 3 stops at the same pixel count as a default desktop capture: about 2,000 page pixels tall for desktop at 2, and about 3,280 for a phone at 3. The row then says truncated: true.",
            "default": 1
          },
          "colorScheme": {
            "title": "Colour scheme",
            "enum": [
              "light",
              "dark"
            ],
            "type": "string",
            "description": "Show the page in light or dark mode. Sites that support dark mode switch to their dark theme.",
            "default": "light"
          },
          "locale": {
            "title": "Locale",
            "type": "string",
            "description": "Optional browser language and region, such as de-DE, fr-FR or ar-SA. It also sets the Accept-Language header. Combine it with a proxy country to see a page as local visitors see it."
          },
          "timezoneId": {
            "title": "Time zone",
            "type": "string",
            "description": "Optional browser time zone, such as Europe/Berlin or Asia/Riyadh. Pages that show local times or opening hours use it."
          },
          "savePdf": {
            "title": "Also save a PDF",
            "type": "boolean",
            "description": "Save one PDF of each URL as well, printed with backgrounds. Each PDF counts as one capture.",
            "default": false
          },
          "pdfFormat": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3"
            ],
            "type": "string",
            "description": "Paper size of the PDF.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "PDF landscape",
            "type": "boolean",
            "description": "Print the PDF in landscape orientation.",
            "default": false
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hide common cookie consent banners (OneTrust, Cookiebot, Usercentrics, Didomi, CookieYes and others) with CSS before the capture. Nothing is clicked or accepted.",
            "default": true
          },
          "hideSelectors": {
            "title": "Hide elements (CSS selectors)",
            "type": "array",
            "description": "CSS selectors of elements to hide before the capture, for example chat widgets or ads. Example: #intercom-container",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maskSelectors": {
            "title": "Mask elements",
            "type": "array",
            "description": "CSS selectors of moving parts to cover with a grey box, such as a clock, a rotating banner or a price ticker. The layout stays the same, so masked parts never count as a change. Masking also hides personal data in a capture.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "blockAds": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Block requests to common ad and tracker hosts of other sites before the page loads. Pages load faster, and change detection reports fewer false changes from rotating ads.",
            "default": false
          },
          "captureSelector": {
            "title": "Capture one element (CSS selector)",
            "type": "string",
            "description": "Capture only the first element that matches this CSS selector, for example #pricing. Empty: capture the page. PDFs ignore it.",
            "default": ""
          },
          "waitForSelector": {
            "title": "Wait for element (CSS selector)",
            "type": "string",
            "description": "Wait up to 15 seconds for this element to appear before the capture. If it never appears, the capture goes ahead and the row says so.",
            "default": ""
          },
          "waitSecs": {
            "title": "Extra wait (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Wait this long after the page loads and before the capture, for animations and late content.",
            "default": 1
          },
          "scrollToLoad": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "For full-page captures, scroll down the page first so lazy-loaded images appear.",
            "default": true
          },
          "maxPageHeight": {
            "title": "Maximum page height (pixels)",
            "minimum": 500,
            "maximum": 16000,
            "type": "integer",
            "description": "Full-page captures stop at this height. Very long pages are cut, and the row says truncated: true.",
            "default": 8000
          },
          "compareWithPrevious": {
            "title": "Visual change detection",
            "type": "boolean",
            "description": "Compare each screenshot with the one from the last run that used the same state key. Each row gets changed, diffPercent and, for changed pages, a diff image with changed pixels in red. Schedule the Actor with this on to watch pages for visual changes.",
            "default": false
          },
          "stateKey": {
            "title": "Change detection state key",
            "type": "string",
            "description": "Name of the stored baseline screenshots. Use a different key for each separate watch list.",
            "default": "default"
          },
          "changeThreshold": {
            "title": "Change threshold (% of pixels)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "A page counts as changed when more than this share of pixels differs, in percent. Example: 0.1 means 1 pixel in 1,000.",
            "default": 0.1
          },
          "maxCaptures": {
            "title": "Maximum captures",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many files (screenshots plus PDFs). The default keeps test runs short. Set 0 for no limit.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy (optional, extra charge)",
            "type": "object",
            "description": "Optional. Use Apify Proxy and pick a country to see the page as visitors in that country see it, for example local prices, language or region banners. Each capture made through a proxy adds the \"Proxy capture\" charge on top of the normal capture price. Off by default. The proxy is for country choice only: a page with a bot check is still skipped.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}