{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API – Bulk Full-Page Screenshots & PDF",
    "description": "Capture full-page or viewport screenshots (PNG, JPEG, WebP) and PDFs of any list of URLs with headless Chrome. Desktop, laptop, tablet and iPhone viewports, element capture by CSS selector, cookie-banner hiding, ad blocking, dark mode, custom CSS/JS. Pay only per successful capture.",
    "version": "0.1",
    "x-build-id": "IuJAH2NIv1ngMpd3g"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~website-screenshot/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-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/gazidev~website-screenshot/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-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/gazidev~website-screenshot/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Pages to capture, one per line. `https://` is added if missing. Duplicates are skipped. Invalid URLs get a free error row.",
            "default": [
              "https://example.com",
              "https://en.wikipedia.org/wiki/Web_scraping"
            ],
            "items": {
              "type": "string"
            }
          },
          "outputType": {
            "title": "Output",
            "enum": [
              "screenshot",
              "pdf",
              "both"
            ],
            "type": "string",
            "description": "`screenshot` = image only, `pdf` = PDF only, `both` = image and PDF of each page (charged as one screenshot + one PDF).",
            "default": "screenshot"
          },
          "viewport": {
            "title": "Viewport / device",
            "enum": [
              "desktop",
              "laptop",
              "macbook",
              "tablet",
              "mobile",
              "android",
              "og-image",
              "custom"
            ],
            "type": "string",
            "description": "Browser window size. `desktop` 1920×1080, `laptop` 1366×768, `macbook` 1440×900 @2x (retina), `tablet` iPad-like 820×1180 @2x, `mobile` iPhone-like 390×844 @2x (touch + mobile user agent), `android` Pixel-like 412×915, `og-image` 1200×630 (social preview card). `custom` uses the width/height below.",
            "default": "desktop"
          },
          "viewportWidth": {
            "title": "Custom width (px)",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Only for viewport `custom`. 200-3840.",
            "default": 1280
          },
          "viewportHeight": {
            "title": "Custom height (px)",
            "minimum": 200,
            "maximum": 4320,
            "type": "integer",
            "description": "Only for viewport `custom`. 200-4320.",
            "default": 800
          },
          "isMobile": {
            "title": "Custom: mobile emulation",
            "type": "boolean",
            "description": "Only for viewport `custom`: enable touch and mobile meta-viewport handling.",
            "default": false
          },
          "deviceScaleFactor": {
            "title": "Device scale factor (override)",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Pixel density override (1-4). Leave empty to use the preset's value (mobile, tablet, macbook = 2; android = 2.625; others = 1). Use 3 for true iPhone sharpness. Higher = sharper but bigger images."
          },
          "fullPage": {
            "title": "Full-page screenshot",
            "type": "boolean",
            "description": "Capture the whole scrollable page instead of only the visible viewport.",
            "default": true
          },
          "format": {
            "title": "Image format",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ],
            "type": "string",
            "description": "`png` (lossless), `jpeg` (small, uses quality) or `webp` (smallest, uses quality).",
            "default": "png"
          },
          "quality": {
            "title": "JPEG/WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1-100. Ignored for PNG.",
            "default": 80
          },
          "selector": {
            "title": "Capture only this element (CSS selector)",
            "type": "string",
            "description": "Optional, e.g. `#main`, `header`, `.pricing-table`. The first visible match is captured. If it does not appear within 15 s you get a free error row."
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners & consent popups",
            "type": "boolean",
            "description": "Hides common consent managers (OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics, TrustArc, Sourcepoint, CookieYes, Complianz, ...) and fixed boxes that mention cookies/consent, using CSS only. Nothing is clicked or accepted.",
            "default": true
          },
          "blockAds": {
            "title": "Block ads & trackers",
            "type": "boolean",
            "description": "Blocks requests to about 75 common ad, analytics and tracking domains (DoubleClick, Google Analytics/Tag Manager, Facebook pixel, Hotjar, Taboola, Criteo, ...). Pages load faster and screenshots are cleaner.",
            "default": true
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Emulate `prefers-color-scheme: dark`. Sites that support dark mode render dark.",
            "default": false
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle",
              "commit"
            ],
            "type": "string",
            "description": "When the page counts as loaded. `load` (default) also waits up to 3 s for the network to go quiet. `networkidle` is strict (no requests for 500 ms). If the wait times out but the page has content, it is still captured, with a `warning`.",
            "default": "load"
          },
          "delaySecs": {
            "title": "Extra delay before capture (s)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Wait this many seconds after loading, e.g. for animations, charts or slow widgets. 0-30.",
            "default": 0
          },
          "scrollToLoad": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "For full-page screenshots, scroll through the page first (max 8 s) so lazy-loaded images and sections render.",
            "default": true
          },
          "maxHeight": {
            "title": "Max page height (px)",
            "minimum": 500,
            "maximum": 16000,
            "type": "integer",
            "description": "Full-page captures are cut at this height (CSS pixels, max 16,000) so endless feeds do not produce giant images. Images are also limited to 16,383 device pixels in height (WebP format limit; keeps memory bounded), so at 2x scale the cut is at about 8,190 CSS px.",
            "default": 16000
          },
          "pdfFormat": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "Tabloid"
            ],
            "type": "string",
            "description": "Used when Output includes PDF.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "PDF landscape",
            "type": "boolean",
            "description": "Landscape orientation for PDFs.",
            "default": false
          },
          "pdfMedia": {
            "title": "PDF CSS media",
            "enum": [
              "print",
              "screen"
            ],
            "type": "string",
            "description": "`print` uses the site's print stylesheet (clean, text-focused). `screen` makes the PDF look like the website on screen.",
            "default": "print"
          },
          "customCss": {
            "title": "Custom CSS",
            "type": "string",
            "description": "Injected before capture, e.g. `.chat-widget { display: none !important; }`."
          },
          "customJs": {
            "title": "Custom JavaScript",
            "type": "string",
            "description": "Runs in the page before capture (async function body, `await` allowed), e.g. `document.querySelector('#tab-2').click(); await new Promise(r => setTimeout(r, 500));`. If it throws, you get a free error row."
          },
          "navigationTimeoutSecs": {
            "title": "Navigation timeout (s)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Max time to load a page (5-180).",
            "default": 45
          },
          "maxRetries": {
            "title": "Retries per URL",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Extra attempts on timeouts and network errors (0-3). DNS errors are not retried.",
            "default": 1
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Pages captured in parallel in one shared browser (1-10). 3 is right for 2 GB memory; use 5-6 with 4 GB.",
            "default": 3
          },
          "maxUrls": {
            "title": "Max URLs",
            "minimum": 0,
            "type": "integer",
            "description": "Capture at most this many URLs (0 = all).",
            "default": 0
          },
          "userAgent": {
            "title": "Custom user agent",
            "type": "string",
            "description": "Optional. Overrides the browser/device user agent."
          },
          "ignoreHttpsErrors": {
            "title": "Ignore HTTPS certificate errors",
            "type": "boolean",
            "description": "Capture sites with expired or self-signed certificates.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Most sites work without a proxy. Datacenter Apify Proxy or your own proxy URLs are supported (residential is not).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}