{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API & URL to PDF: Bulk Full-Page Screenshots",
    "description": "Take website screenshots in bulk: full-page or viewport (PNG, JPEG, WebP) and URL to PDF for a list of URLs or a sitemap, on desktop, tablet and mobile. Detect visual changes between runs with diff images. One row per page with a file link. No compute fees; failed pages are free.",
    "version": "0.1",
    "x-build-id": "r9aYclG2ct3WBuc2E"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/actorfactory~website-screenshot/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-actorfactory-website-screenshot",
        "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/actorfactory~website-screenshot/runs": {
      "post": {
        "operationId": "runs-sync-actorfactory-website-screenshot",
        "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/actorfactory~website-screenshot/run-sync": {
      "post": {
        "operationId": "run-sync-actorfactory-website-screenshot",
        "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": "Page URLs",
            "type": "array",
            "description": "Pages to capture, one per line (full URLs with https://), e.g. https://www.example.com/pricing. Each page is captured once per device. You can also give a sitemap below, or both.",
            "items": {
              "type": "string"
            }
          },
          "sitemapUrl": {
            "title": "Sitemap URL",
            "type": "string",
            "description": "Optional. A sitemap to take page URLs from (XML, sitemap index, .xml.gz or plain text), e.g. https://www.example.com/sitemap.xml. Sitemap indexes are followed. Pages are captured in sitemap order, up to the limit below."
          },
          "maxUrlsFromSitemap": {
            "title": "Maximum URLs from the sitemap",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many page URLs to take from the sitemap.",
            "default": 50
          },
          "output": {
            "title": "Output",
            "enum": [
              "screenshot",
              "pdf",
              "both"
            ],
            "type": "string",
            "description": "What to save for each page: an image, a PDF (the page's print layout, A4 or Letter, with backgrounds), or both. A PDF is made once per URL, whatever the number of devices.",
            "default": "screenshot"
          },
          "devices": {
            "title": "Devices",
            "type": "array",
            "description": "Screen sizes to capture. Each device gives its own row and image. Only the screen size and touch support change; the browser's user agent stays the same.",
            "items": {
              "type": "string",
              "enum": [
                "desktop",
                "tablet",
                "mobile"
              ],
              "enumTitles": [
                "Desktop (viewport below, default 1440 x 900)",
                "Tablet (820 x 1180, touch)",
                "Mobile (390 x 844, touch)"
              ]
            },
            "default": [
              "desktop"
            ]
          },
          "fullPage": {
            "title": "Full-page screenshot",
            "type": "boolean",
            "description": "Capture the whole scrollable page instead of only the visible screen. Long pages are cut at the maximum page height below.",
            "default": false
          },
          "maxPageHeight": {
            "title": "Maximum page height (px)",
            "minimum": 500,
            "maximum": 16000,
            "type": "integer",
            "description": "Full-page screenshots stop at this height in CSS pixels (truncated = true in the row). Chrome's limit is 16,000 device pixels, so with pixel ratio 2 the cap is 8,000.",
            "default": 10000
          },
          "scrollToLoad": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "For full-page screenshots: scroll through the page first (up to 15 s) so lazy-loaded images and sections appear.",
            "default": true
          },
          "selector": {
            "title": "Element selector",
            "type": "string",
            "description": "Optional CSS selector (e.g. #pricing, header, .product-card) to capture one element instead of the page. If nothing matches, the row reports SELECTOR_NOT_FOUND and is free. Screenshot output only."
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ],
            "type": "string",
            "description": "File format of the screenshots. JPEG and WebP files are 3 to 10 times smaller than PNG, useful for long full-page captures.",
            "default": "png"
          },
          "imageQuality": {
            "title": "JPEG / WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality for JPEG and WebP (ignored for PNG).",
            "default": 80
          },
          "viewportWidth": {
            "title": "Desktop viewport width (px)",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Browser window width for the desktop device, e.g. 1280, 1440 or 1920.",
            "default": 1440
          },
          "viewportHeight": {
            "title": "Desktop viewport height (px)",
            "minimum": 240,
            "maximum": 2160,
            "type": "integer",
            "description": "Browser window height for the desktop device (the screenshot height when Full-page is off).",
            "default": 900
          },
          "pixelRatio": {
            "title": "Pixel ratio",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Device pixel ratio for every device: 1 = standard, 2 = retina (twice the width and height in pixels), 3 = high-density phone screens.",
            "default": 1
          },
          "pdfFormat": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3"
            ],
            "type": "string",
            "description": "Paper size for PDFs (10 mm margins, backgrounds printed).",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "PDF landscape",
            "type": "boolean",
            "description": "Print PDFs in landscape orientation.",
            "default": false
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "When the page counts as ready to capture.",
            "default": "load"
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Extra time to wait before capturing, e.g. 2000 for pages with animations or late widgets.",
            "default": 0
          },
          "waitForSelector": {
            "title": "Wait for element",
            "type": "string",
            "description": "Optional CSS selector to wait for before capturing, e.g. .product-grid or #chart canvas. Useful for single-page apps and late-loading content. If no visible element matches within the page load timeout, the row reports WAIT_FOR_SELECTOR_TIMEOUT and is free."
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hide the consent banners of common consent managers (OneTrust, Cookiebot, Usercentrics, Didomi, Quantcast, TrustArc, CookieYes and others) with CSS. Nothing is clicked or accepted.",
            "default": true
          },
          "hideSelectors": {
            "title": "Hide elements",
            "type": "array",
            "description": "Optional CSS selectors of elements to hide before capturing, e.g. chat widgets or newsletter pop-ups: #intercom-container, .newsletter-modal.",
            "items": {
              "type": "string"
            }
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Ask the page for its dark theme (prefers-color-scheme: dark). Only sites that support a dark theme change.",
            "default": false
          },
          "navigationTimeoutSecs": {
            "title": "Page load timeout (s)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for a page to load. If it has started rendering by then, what is on screen is captured (with a warning); if nothing arrived, the row reports TIMEOUT and is free.",
            "default": 30
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 0,
            "maximum": 16,
            "type": "integer",
            "description": "How many pages to open at once. 0 = automatic (one per GB of memory, up to 8). At most 2 pages of the same site are open at a time.",
            "default": 0
          },
          "detectChanges": {
            "title": "Detect visual changes",
            "type": "boolean",
            "description": "Compare each screenshot with the previous capture of the same page and device (kept in a key-value store in your account) and mark it as new, unchanged or changed, with the share of pixels that changed and a diff image that shows the changed areas in red. Needs screenshot output. Comparing is free.",
            "default": false
          },
          "changeThreshold": {
            "title": "Change threshold (% of pixels)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "A page counts as changed when at least this share of its pixels differs from the previous capture. 0.1 catches a changed price or headline on a full page; raise it to 1-5 for pages with rotating banners, ads or live counters, or hide those with Hide elements.",
            "default": 0.1
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Name of the key-value store that keeps the last screenshot of every page and device (letters, digits and hyphens). Use one name per project or client. Changing the device, viewport, pixel ratio, full-page or element setting starts a fresh history for that page.",
            "default": "screenshot-monitor"
          },
          "maxCaptures": {
            "title": "Maximum captures",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many successful captures (one capture = one page on one device). You are charged per saved screenshot and PDF; failed pages are free.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}