{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot & PDF API – Full Page, Mobile & Batch",
    "description": "Website screenshot API: capture full-page or element screenshots (PNG, JPEG, WebP) and PDFs of any URL or raw HTML. Desktop, tablet and mobile presets, cookie-banner hiding, dark mode, lazy-load scrolling and batch URLs. Each row has a direct file URL.",
    "version": "1.0",
    "x-build-id": "6gaTuJNk2xyGdLtqp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/openharvest~website-screenshot-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-openharvest-website-screenshot-api",
        "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/openharvest~website-screenshot-api/runs": {
      "post": {
        "operationId": "runs-sync-openharvest-website-screenshot-api",
        "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/openharvest~website-screenshot-api/run-sync": {
      "post": {
        "operationId": "run-sync-openharvest-website-screenshot-api",
        "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": "Web pages to capture, one per line. <code>example.com</code> without https:// also works. Duplicates are skipped. Leave empty to capture only the HTML below.",
            "items": {
              "type": "string"
            }
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "<code>png</code> = lossless image, <code>jpeg</code> = small photo-style image, <code>webp</code> = smallest image, <code>pdf</code> = printable PDF document (charged as a 'pdf' event).",
            "default": "png"
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole scrollable page instead of only the first screen (viewport). Lazy-loaded images are scrolled into view first. Very long pages are cut at 'Max height'. Charged as a 'full-page-screenshot' event.",
            "default": false
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "desktop-hd",
              "laptop",
              "tablet",
              "mobile",
              "android"
            ],
            "type": "string",
            "description": "Screen size and browser type. <code>desktop</code> 1440×900, <code>desktop-hd</code> 1920×1080, <code>laptop</code> 1366×768, <code>tablet</code> iPad 820×1180, <code>mobile</code> iPhone 390×844, <code>android</code> Pixel 412×915 (mobile presets use a mobile user agent and touch).",
            "default": "desktop"
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hide cookie-consent banners and their dark backdrops (OneTrust, Cookiebot, Usercentrics, Didomi, Quantcast, TrustArc, CookieYes, Complianz and other common consent tools). Nothing is clicked or accepted - banners are only hidden from the image.",
            "default": true
          },
          "selector": {
            "title": "Capture only this element (CSS selector)",
            "type": "string",
            "description": "Optional. Capture only the first visible element matching this CSS selector, e.g. <code>#main</code>, <code>.pricing-table</code> or <code>header</code>. If no element matches, you get a free error row."
          },
          "html": {
            "title": "Raw HTML (optional)",
            "type": "string",
            "description": "Optional. Render this HTML document instead of (or in addition to) the URLs - useful for invoices, reports, email templates or Open Graph cards. External CSS, images and fonts referenced with absolute URLs are loaded."
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Ask the site for its dark color scheme (prefers-color-scheme: dark). Works on sites that support dark mode.",
            "default": false
          },
          "quality": {
            "title": "JPEG / WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality from 1 to 100 for JPEG and WebP. Lower = smaller files. Ignored for PNG and PDF.",
            "default": 80
          },
          "viewportWidth": {
            "title": "Viewport width (px)",
            "minimum": 0,
            "maximum": 3840,
            "type": "integer",
            "description": "Optional custom browser width in CSS pixels. 0 = use the device preset.",
            "default": 0
          },
          "viewportHeight": {
            "title": "Viewport height (px)",
            "minimum": 0,
            "maximum": 4000,
            "type": "integer",
            "description": "Optional custom browser height in CSS pixels (also the image height when 'Full page' is off). 0 = use the device preset.",
            "default": 0
          },
          "scaleFactor": {
            "title": "Scale factor (retina)",
            "minimum": 0.5,
            "maximum": 3,
            "type": "number",
            "description": "Device pixel ratio. 1 = normal, 2 = sharp retina image with 2× width and height (4× file size). Allowed 0.5 to 3.",
            "default": 1
          },
          "maxHeight": {
            "title": "Max height for full page (px)",
            "minimum": 500,
            "maximum": 30000,
            "type": "integer",
            "description": "Full-page screenshots of endless pages are cut at this height (CSS pixels). Max 30,000 (WebP max 16,000 divided by the scale factor). The row then has <code>truncated: true</code>.",
            "default": 10000
          },
          "hideOverlays": {
            "title": "Hide pop-ups and chat widgets",
            "type": "boolean",
            "description": "Also hide newsletter pop-ups, modal dialogs, full-screen overlays and chat widgets (Intercom, HubSpot, Drift, Zendesk, Crisp, Tidio…). Off by default because it may hide fixed elements you want to keep.",
            "default": false
          },
          "hideSelectors": {
            "title": "Hide these elements (CSS selectors)",
            "type": "array",
            "description": "Optional. Extra CSS selectors to hide before capturing, e.g. <code>.ad-banner</code>, <code>#sticky-header</code>.",
            "items": {
              "type": "string"
            }
          },
          "pdfFormat": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "A5",
              "Tabloid"
            ],
            "type": "string",
            "description": "Paper size for PDF output.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "PDF landscape",
            "type": "boolean",
            "description": "Use landscape orientation for PDF output.",
            "default": false
          },
          "pdfMedia": {
            "title": "PDF style",
            "enum": [
              "print",
              "screen"
            ],
            "type": "string",
            "description": "<code>print</code> uses the site's print stylesheet (clean, like Ctrl+P). <code>screen</code> keeps the on-screen look (menus, colors).",
            "default": "print"
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "networkidle",
              "domcontentloaded"
            ],
            "type": "string",
            "description": "When the page counts as loaded. <code>load</code> (recommended) waits for the load event plus a short network-quiet period, <code>networkidle</code> waits longer for busy single-page apps, <code>domcontentloaded</code> is fastest. Waiting never fails the capture - slow trackers are simply ignored.",
            "default": "load"
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Extra wait after loading, before the capture - for animations, charts or slow widgets. Max 30,000.",
            "default": 0
          },
          "scrollToBottom": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "Scroll through the page before a full-page, element or PDF capture so lazy-loaded images and sections appear (up to about 6 s).",
            "default": true
          },
          "blockAds": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Do not load common ad, tracking and analytics scripts (Google Ads, Criteo, Taboola, Hotjar…). Pages load faster; ad slots stay empty. Turn off if you need to see the ads.",
            "default": true
          },
          "blockMedia": {
            "title": "Block video and audio",
            "type": "boolean",
            "description": "Do not download video/audio streams (faster and cheaper; video posters still show).",
            "default": true
          },
          "captureErrorPages": {
            "title": "Capture error pages",
            "type": "boolean",
            "description": "By default pages that answer with HTTP 4xx/5xx (not found, blocked) produce a free error row and are not captured. Turn on to capture and pay for them anyway.",
            "default": false
          },
          "navigationTimeoutSecs": {
            "title": "Page load timeout (s)",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time to open one page. Each page is tried up to 3 times.",
            "default": 45
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Optional. How many pages are captured at the same time. Empty = automatic (1 per GB of memory). Full-page captures of heavy pages need about 1 GB each."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify datacenter proxy is used by default. Choose the RESIDENTIAL group (and a country) for sites that block datacenter traffic or to see a country-specific version of a page.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}