{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API: Full Page PNG, JPEG & PDF",
    "description": "Bulk website screenshots and HTML to PDF: full-page PNG, JPEG or PDF, element capture, mobile/retina, wait for selector, cookie banners hidden, page text for LLMs. Direct file links. No API key, no login. MCP-ready for AI agents. Pay per result, errors are free. $4.80 per 1,000 screenshots.",
    "version": "0.1",
    "x-build-id": "DxzSdk5xkmyk3bXZe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/actose~website-screenshot-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-actose-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/actose~website-screenshot-pdf/runs": {
      "post": {
        "operationId": "runs-sync-actose-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/actose~website-screenshot-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-actose-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": "Web pages to capture, one per line. 'https://' is added if missing. Only public http/https pages.",
            "items": {
              "type": "string"
            }
          },
          "html": {
            "title": "Raw HTML (optional)",
            "type": "string",
            "description": "Paste a full HTML document to render it instead of (or in addition to) URLs — e.g. an invoice or report to turn into a PDF. Use absolute URLs for images and stylesheets."
          },
          "htmlName": {
            "title": "Name for the raw HTML file",
            "type": "string",
            "description": "Used to build the file name of the raw HTML capture.",
            "default": "html"
          },
          "htmlPages": {
            "title": "Batch of HTML documents (optional)",
            "type": "array",
            "description": "For batch HTML-to-PDF/PNG: a JSON array of objects {\"name\": \"invoice-001\", \"html\": \"<html>...</html>\"} (plain strings are accepted too)."
          },
          "formats": {
            "title": "Output formats",
            "type": "array",
            "description": "One file is produced per format for every page (the page is loaded only once). Each file is one billed capture.",
            "items": {
              "type": "string",
              "enum": [
                "png",
                "jpeg",
                "pdf"
              ],
              "enumTitles": [
                "PNG image",
                "JPEG image",
                "PDF document"
              ]
            },
            "default": [
              "png"
            ]
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole scrollable page instead of only the visible viewport (PNG/JPEG).",
            "default": true
          },
          "elementSelector": {
            "title": "Capture only this element (CSS selector)",
            "type": "string",
            "description": "If set, PNG/JPEG captures contain only the first element matching this selector, e.g. '#pricing' or 'main'. Ignored for PDF."
          },
          "jpegQuality": {
            "title": "JPEG quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1–100. Lower means smaller files.",
            "default": 80
          },
          "maxPageHeight": {
            "title": "Max page height (px)",
            "minimum": 500,
            "maximum": 50000,
            "type": "integer",
            "description": "Full-page captures taller than this are cropped (infinite-scroll pages would otherwise never end).",
            "default": 20000
          },
          "viewportWidth": {
            "title": "Viewport width",
            "minimum": 240,
            "maximum": 3840,
            "type": "integer",
            "description": "Browser window width in CSS pixels. Ignored if a device is selected.",
            "default": 1280
          },
          "viewportHeight": {
            "title": "Viewport height",
            "minimum": 240,
            "maximum": 2160,
            "type": "integer",
            "description": "Browser window height in CSS pixels (= image height when 'Full page' is off). Ignored if a device is selected.",
            "default": 800
          },
          "deviceScaleFactor": {
            "title": "Pixel density (retina)",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "1 = normal, 2 = retina (twice the pixels, sharper and bigger files), 3 = max.",
            "default": 1
          },
          "device": {
            "title": "Emulate a device",
            "enum": [
              "desktop",
              "iPhone 13",
              "iPhone 14 Pro Max",
              "Pixel 7",
              "Galaxy S9+",
              "iPad Mini",
              "iPad Pro 11"
            ],
            "type": "string",
            "description": "Mobile/tablet emulation (viewport, pixel density, user agent, touch). Leave empty for a desktop browser with the viewport above.",
            "default": "desktop"
          },
          "colorScheme": {
            "title": "Color scheme",
            "enum": [
              "light",
              "dark"
            ],
            "type": "string",
            "description": "Sites that support it will render in light or dark mode.",
            "default": "light"
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "domcontentloaded",
              "load",
              "networkidle"
            ],
            "type": "string",
            "description": "When the page counts as loaded. 'Network idle' is best for heavy JavaScript apps but slower.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for element (CSS selector)",
            "type": "string",
            "description": "Wait until this element is visible before capturing, e.g. '.chart canvas' or '#content'. If it never appears, the capture fails and is not charged."
          },
          "delayMs": {
            "title": "Extra delay before capture",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Additional wait after loading, for animations and late content.",
            "default": 1000
          },
          "scrollToBottom": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "Scroll through the page before a full-page capture or PDF so lazy-loaded images appear.",
            "default": true
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hide common cookie/consent pop-ups (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast, and more) with CSS. Nothing is clicked or accepted.",
            "default": true
          },
          "hideSelectors": {
            "title": "Hide these elements (CSS selectors)",
            "type": "array",
            "description": "Extra elements to hide: chat widgets, newsletter pop-ups, sticky headers...",
            "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": "Landscape",
            "type": "boolean",
            "description": "Landscape orientation for PDF.",
            "default": false
          },
          "pdfPrintBackground": {
            "title": "Print backgrounds",
            "type": "boolean",
            "description": "Include background colors and images in the PDF.",
            "default": true
          },
          "pdfUseScreenMedia": {
            "title": "Use screen styles",
            "type": "boolean",
            "description": "Render the PDF with the on-screen CSS instead of the site's print CSS (looks more like the website).",
            "default": false
          },
          "pdfSinglePage": {
            "title": "One long page (no page breaks)",
            "type": "boolean",
            "description": "Produce a single tall PDF page as wide as the viewport, like a full-page screenshot but with selectable text. Ignores paper size.",
            "default": false
          },
          "pdfMargin": {
            "title": "PDF margin",
            "type": "string",
            "description": "Margin on every side, with a CSS unit: '0', '10mm', '0.5in', '20px'.",
            "default": "0"
          },
          "captureErrorPages": {
            "title": "Capture HTTP error pages",
            "type": "boolean",
            "description": "By default pages answering with HTTP 4xx/5xx are reported as failed (not charged). Enable to capture them anyway (charged).",
            "default": false
          },
          "navigationTimeoutSecs": {
            "title": "Page timeout",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum time for loading a page and for waiting for the element.",
            "default": 60
          },
          "maxRetries": {
            "title": "Retries per page",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many times a failed page is retried (timeouts, network errors, HTTP 429/5xx).",
            "default": 2
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Pages processed at the same time. 2 is safe with the default 1 GB of memory; give the run 2 GB or more before going higher.",
            "default": 2
          },
          "onlyNew": {
            "title": "Only new pages (scheduled runs)",
            "type": "boolean",
            "description": "Skip URLs/HTML documents already captured successfully (same format) in a previous run with this option on. Remembered in the named key-value store 'website-screenshot-pdf-state'. Skipped files are not loaded and not charged. Leave off for monitoring snapshots of the same pages.",
            "default": false
          },
          "extractText": {
            "title": "Add page text for LLMs",
            "type": "boolean",
            "description": "Also return the visible text of the page in 'pageText' (clean plain text, up to 100,000 characters), ready for LLMs, RAG and AI agents. No extra charge.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}