{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot & PDF Generator",
    "description": "Capture full-page website screenshots (PNG, JPEG, WebP) or PDFs from any list of URLs. Device presets, cookie-banner and ad removal, dark mode, element capture. Pay per capture, failed URLs are free.",
    "version": "1.0",
    "x-build-id": "7OycYF7nfCBn5IbUF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/arpitgoriya~website-screenshot-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-arpitgoriya-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/arpitgoriya~website-screenshot-pdf/runs": {
      "post": {
        "operationId": "runs-sync-arpitgoriya-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/arpitgoriya~website-screenshot-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-arpitgoriya-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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "URLs to capture",
            "type": "array",
            "description": "Web pages to screenshot or convert to PDF. Add them one by one, paste a list, or upload a text/CSV file with one URL per line. URLs without a scheme get https:// added. Duplicate URLs are captured (and charged) only once per run.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "File type to produce. PNG is lossless and sharp, JPEG and WebP are much smaller (use 'Image quality'), PDF produces a printable, text-selectable document with the page-size options below.",
            "default": "png"
          },
          "fullPage": {
            "title": "Full-page screenshot",
            "type": "boolean",
            "description": "Capture the entire scrollable page instead of just the visible viewport. Very long pages are cut at 'Max full-page height'. Ignored for PDF (PDFs always contain the whole page) and when 'Element selector' is set.",
            "default": false
          },
          "device": {
            "title": "Device preset",
            "enum": [
              "desktop",
              "laptop",
              "tablet",
              "mobile"
            ],
            "type": "string",
            "description": "Emulated device. Desktop = 1920×1080, Laptop = 1366×768, Tablet = 820×1180 (touch, 2× pixels), Mobile = 390×844 (touch, 2× pixels). Mobile and tablet presets also send a mobile Chrome user agent so sites serve their mobile layout. Use the viewport fields below to override the size.",
            "default": "desktop"
          },
          "viewportWidth": {
            "title": "Viewport width (px)",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Optional. Overrides the width of the device preset, in CSS pixels. Leave empty to use the preset."
          },
          "viewportHeight": {
            "title": "Viewport height (px)",
            "minimum": 200,
            "maximum": 2160,
            "type": "integer",
            "description": "Optional. Overrides the height of the device preset, in CSS pixels. For viewport screenshots this is the image height."
          },
          "deviceScaleFactor": {
            "title": "Pixel density (device scale factor)",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Optional. 1 = standard, 2 = retina/HiDPI (image is twice as wide and tall), 3 = high-end phones. Leave empty to use the preset (1 for desktop/laptop, 2 for tablet/mobile)."
          },
          "quality": {
            "title": "Image quality (JPEG/WebP)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality from 1 to 100 for JPEG and WebP. Higher looks better but makes bigger files. Ignored for PNG and PDF.",
            "default": 80
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle",
              "commit"
            ],
            "type": "string",
            "description": "When the page counts as loaded. 'load' works for most sites. 'networkidle' waits (max 10 s extra) until network requests settle, which helps JavaScript-heavy apps. 'domcontentloaded' is fastest.",
            "default": "load"
          },
          "delayMs": {
            "title": "Extra delay before capture",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Additional wait after the page loads, so animations, fonts and late content can finish. 0 to 60000 ms.",
            "default": 1000
          },
          "waitForSelector": {
            "title": "Wait for CSS selector",
            "type": "string",
            "description": "Optional. Wait until an element matching this CSS selector exists before capturing (for example '#main-chart' or '.product-grid'). The URL fails (and is not charged) if it never appears."
          },
          "scrollToBottom": {
            "title": "Scroll page to load lazy content",
            "type": "boolean",
            "description": "Before a full-page screenshot or PDF, scroll down the page step by step so lazy-loaded images and sections render, then return to the top. Max 15 seconds.",
            "default": true
          },
          "maxFullPageHeight": {
            "title": "Max full-page height (px)",
            "minimum": 500,
            "maximum": 50000,
            "type": "integer",
            "description": "Safety limit for very long or infinite-scroll pages. Full-page screenshots taller than this are cut at this height (the dataset item gets 'truncated: true').",
            "default": 15000
          },
          "pageLoadTimeoutSecs": {
            "title": "Page load timeout",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time to wait for a page to load. Slow pages fail after this time and are not charged.",
            "default": 45
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners & chat widgets",
            "type": "boolean",
            "description": "Best effort: hides common cookie-consent banners (OneTrust, Cookiebot, Usercentrics, Didomi, Quantcast and more), chat bubbles (Intercom, Drift, HubSpot, Zendesk, Crisp) and similar overlays with CSS. Nothing is clicked or accepted on your behalf.",
            "default": true
          },
          "blockAdsAndTrackers": {
            "title": "Block ads & trackers",
            "type": "boolean",
            "description": "Blocks requests to well-known ad, analytics and tracking networks (Google Ads, DoubleClick, Facebook Pixel, Hotjar, Taboola and more). Pages load faster and screenshots are cleaner. Requests to the captured site itself are never blocked.",
            "default": true
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Emulates the operating system's dark color scheme (prefers-color-scheme: dark). Sites that support dark mode render dark; others are unchanged.",
            "default": false
          },
          "selector": {
            "title": "Element selector (capture one element)",
            "type": "string",
            "description": "Optional CSS selector. When set, only the first matching element is captured (for example 'header', '#pricing' or '.chart'). Not used for PDF output."
          },
          "customCss": {
            "title": "Custom CSS",
            "type": "string",
            "description": "Optional CSS injected into every page before capture, for example to hide elements: '.popup, .newsletter { display: none !important; }'."
          },
          "customJs": {
            "title": "Custom JavaScript",
            "type": "string",
            "description": "Optional JavaScript run inside every page before capture (async/await allowed), for example: document.querySelector('.tab-2')?.click(); await new Promise(r => setTimeout(r, 500));"
          },
          "captureErrorPages": {
            "title": "Capture error pages (HTTP 4xx/5xx)",
            "type": "boolean",
            "description": "By default a URL that answers with an HTTP error (for example 404 or 500) is reported as failed and not charged. Turn on to screenshot the error page anyway (charged like any other capture).",
            "default": false
          },
          "pdfFormat": {
            "title": "PDF page size",
            "enum": [
              "A4",
              "A3",
              "A5",
              "Letter",
              "Legal",
              "Tabloid"
            ],
            "type": "string",
            "description": "Paper size of the generated PDF.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "Landscape orientation",
            "type": "boolean",
            "description": "Print the PDF in landscape instead of portrait.",
            "default": false
          },
          "pdfPrintBackground": {
            "title": "Print background colors & images",
            "type": "boolean",
            "description": "Include background colors and images in the PDF, so it looks like the website.",
            "default": true
          },
          "pdfMargin": {
            "title": "PDF margin",
            "type": "string",
            "description": "Margin on all four sides, as a CSS length: '0', '10mm', '0.5in', '1cm' or '20px'.",
            "default": "0"
          },
          "pdfMediaType": {
            "title": "PDF CSS media type",
            "enum": [
              "screen",
              "print"
            ],
            "type": "string",
            "description": "'screen' makes the PDF look like the website in a browser. 'print' uses the site's print stylesheet, which is often cleaner for articles and documentation.",
            "default": "screen"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages are captured in parallel. Higher is faster for long lists but needs more memory (roughly 400 MB per parallel page). Keep it moderate to be gentle with the websites you capture.",
            "default": 5
          },
          "maxRequestRetries": {
            "title": "Retries per URL",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many times a URL that timed out or returned a server error is retried before it is reported as failed. HTTP 4xx errors are not retried.",
            "default": 1
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Route traffic through Apify Proxy or your own proxies, for example to capture a page as seen from another country. Off by default (direct connection).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}