{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API & URL to PDF: Full-Page, Bulk",
    "description": "Take full-page website screenshots and PDFs of any URL list or sitemap in bulk. Desktop, tablet and mobile sizes, cookie banners and ads removed, PNG, JPEG, WebP or PDF output, plus visual change detection for page monitoring.",
    "version": "1.0",
    "x-build-id": "Rn0t6r3Ws4pDN9gen"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mosaicked_sponge~website-screenshot-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mosaicked_sponge-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/mosaicked_sponge~website-screenshot-pdf/runs": {
      "post": {
        "operationId": "runs-sync-mosaicked_sponge-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/mosaicked_sponge~website-screenshot-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-mosaicked_sponge-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",
        "properties": {
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Public web pages to capture, one per line. \"example.com\" is read as https://example.com. Localhost, private-network, login-walled and adult pages are refused.",
            "items": {
              "type": "string"
            }
          },
          "sitemapUrls": {
            "title": "Sitemap URLs (optional)",
            "type": "array",
            "description": "Capture every page listed in these sitemap.xml files (sitemap indexes are followed one level). Capped by \"Max URLs\".",
            "items": {
              "type": "string"
            }
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "laptop",
              "tablet",
              "mobile",
              "iphone",
              "custom"
            ],
            "type": "string",
            "description": "Viewport and device emulation preset. Choose \"custom\" to use the viewport fields below.",
            "default": "desktop"
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole scrollable page (auto-scrolls first so lazy-loaded images appear). Full-page screenshots and PDFs are billed with an extra \"full page or PDF\" event.",
            "default": false
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "Output file format. PDF renders the page as a printable document.",
            "default": "png"
          },
          "quality": {
            "title": "JPEG/WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1-100. Ignored for PNG and PDF.",
            "default": 80
          },
          "selector": {
            "title": "Element selector (optional)",
            "type": "string",
            "description": "CSS selector of a single element to capture instead of the page, e.g. \"#pricing\"."
          },
          "viewportWidth": {
            "title": "Custom viewport width",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Used when Device is \"Custom\".",
            "default": 1280
          },
          "viewportHeight": {
            "title": "Custom viewport height",
            "minimum": 200,
            "maximum": 4000,
            "type": "integer",
            "description": "Used when Device is \"Custom\".",
            "default": 800
          },
          "deviceScaleFactor": {
            "title": "Custom pixel ratio",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Used when Device is \"Custom\" (1-3).",
            "default": 1
          },
          "isMobile": {
            "title": "Custom: emulate mobile",
            "type": "boolean",
            "description": "Used when Device is \"Custom\": mobile user agent, touch and meta-viewport.",
            "default": false
          },
          "maxHeight": {
            "title": "Max full-page height (px)",
            "minimum": 500,
            "maximum": 30000,
            "type": "integer",
            "description": "Very long pages are cut at this height.",
            "default": 15000
          },
          "blockCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hides consent pop-ups from OneTrust, Cookiebot, Usercentrics, Quantcast, Didomi, TrustArc, Osano, CookieYes and similar, and unlocks page scrolling.",
            "default": true
          },
          "blockAds": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Blocks requests to common ad/tracking networks and hides ad slots.",
            "default": true
          },
          "removeOverlays": {
            "title": "Remove full-screen overlays",
            "type": "boolean",
            "description": "Also hides other fixed full-screen pop-ups (newsletter modals and similar).",
            "default": true
          },
          "hideSelectors": {
            "title": "Hide these elements",
            "type": "array",
            "description": "Extra CSS selectors to hide, e.g. \".chat-widget\".",
            "items": {
              "type": "string"
            }
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Ask the site for its dark color scheme (prefers-color-scheme: dark).",
            "default": false
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "Navigation event to wait for before capturing. \"load\" works for most sites; \"networkidle\" waits for background requests to settle.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for selector (optional)",
            "type": "string",
            "description": "Wait until this CSS selector appears before capturing."
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Wait this long right before capturing (animations, fonts).",
            "default": 500
          },
          "navigationTimeoutSecs": {
            "title": "Navigation timeout (s)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time to wait for a page to load.",
            "default": 30
          },
          "maxRetries": {
            "title": "Retries per page",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "How many times to retry a page that failed to load. Failed pages are never charged.",
            "default": 1
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "capture",
              "changeDetection"
            ],
            "type": "string",
            "description": "Change detection compares each page with the last delivered capture for the same Monitor ID. Unchanged pages are not delivered and pay only the small comparison fee, not the screenshot fee. The first run delivers everything as the baseline.",
            "default": "capture"
          },
          "diffThresholdPercent": {
            "title": "Change threshold (% of pixels)",
            "type": "string",
            "description": "A page counts as changed when more than this percentage of pixels differ (PDFs: when the visible text changes). Example: 0.5",
            "default": "0.5"
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Runs with the same Monitor ID share baselines. Use one per schedule.",
            "default": "default"
          },
          "pdfFormat": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "Tabloid"
            ],
            "type": "string",
            "description": "Paper size for PDF output.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "PDF landscape",
            "type": "boolean",
            "description": "Render PDFs in landscape orientation.",
            "default": false
          },
          "pdfScreenMedia": {
            "title": "PDF looks like the screen",
            "type": "boolean",
            "description": "Render with screen styles instead of the site's print stylesheet.",
            "default": true
          },
          "userAgent": {
            "title": "Custom user agent",
            "type": "string",
            "description": "Leave empty for a current Chrome user agent matching the device."
          },
          "extraHeaders": {
            "title": "Extra HTTP headers",
            "type": "object",
            "description": "E.g. {\"Accept-Language\": \"de-DE\"}. Cookie and Authorization headers are ignored: this Actor does not log in or reuse sessions."
          },
          "captureErrorPages": {
            "title": "Capture HTTP error pages",
            "type": "boolean",
            "description": "By default pages answering 4xx/5xx are reported as failed and not charged.",
            "default": false
          },
          "skipLoginPages": {
            "title": "Skip login pages",
            "type": "boolean",
            "description": "Skip (and do not charge) pages that show a password field. Turn off only to capture your own public sign-in page.",
            "default": true
          },
          "maxUrls": {
            "title": "Max URLs",
            "minimum": 0,
            "type": "integer",
            "description": "Safety cap on URLs per run (0 = no limit).",
            "default": 500
          },
          "maxConcurrency": {
            "title": "Pages in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Default: 2 per GB of memory."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}