{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API: full page, mobile, PDF",
    "description": "Screenshots of any public URL as PNG, JPEG, WebP or PDF. Full page with lazy-load scrolling, device presets, cookie banner removal, dark mode, CSS selector crop. Charged only for successful captures.",
    "version": "1.0",
    "x-build-id": "amLDMceb3ahCnHQId"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pxdata~website-screenshot-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pxdata-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/pxdata~website-screenshot-api/runs": {
      "post": {
        "operationId": "runs-sync-pxdata-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/pxdata~website-screenshot-api/run-sync": {
      "post": {
        "operationId": "run-sync-pxdata-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "URLs",
            "maxItems": 1000,
            "type": "array",
            "description": "Pages to capture, one per line. Up to 1,000 per run. A missing scheme is treated as https://.",
            "items": {
              "type": "string"
            }
          },
          "device": {
            "title": "Device preset",
            "enum": [
              "desktop-1366",
              "desktop-1920",
              "laptop-1440",
              "iphone-15",
              "pixel-8",
              "ipad"
            ],
            "type": "string",
            "description": "Viewport, pixel ratio and user agent. Overridden by the viewport width/height fields below.",
            "default": "desktop-1366"
          },
          "viewportWidth": {
            "title": "Viewport width (px)",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Overrides the preset width. 200 to 3840."
          },
          "viewportHeight": {
            "title": "Viewport height (px)",
            "minimum": 200,
            "maximum": 4000,
            "type": "integer",
            "description": "Overrides the preset height. 200 to 4000. Only matters when Full page is off."
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole scrollable page instead of only the first viewport. Capped at 16,383 device pixels of height (Chromium texture limit); the output item has truncated: true when the page was longer.",
            "default": true
          },
          "format": {
            "title": "Format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "Output file type. PNG is lossless; JPEG and WebP are smaller and use the quality setting; PDF uses the print layout of the page (A4).",
            "default": "png"
          },
          "quality": {
            "title": "Quality (JPEG and WebP)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1 to 100. Ignored for PNG and PDF.",
            "default": 80
          },
          "selector": {
            "title": "Capture only this element (CSS selector)",
            "type": "string",
            "description": "If set, only the first matching element is captured. If the selector matches nothing, the URL fails with an error item and is not charged."
          },
          "clip": {
            "title": "Crop rectangle",
            "type": "object",
            "description": "Crop in CSS pixels from the top-left of the page, for example {\"x\": 0, \"y\": 0, \"width\": 1200, \"height\": 630}. Ignored when a selector is set."
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "Navigation event to wait for. 'load' also waits 1.5 s for late layout shifts; 'networkidle' waits until the network is quiet for 500 ms.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for selector",
            "type": "string",
            "description": "CSS selector that must be visible before capturing. If it never appears within the page timeout, the URL fails (not charged)."
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Additional wait right before the capture, 0 to 30,000.",
            "default": 0
          },
          "scrollToLoad": {
            "title": "Scroll to trigger lazy loading",
            "type": "boolean",
            "description": "Scrolls through the page in steps before a full-page capture so lazy images and infinite-reveal sections render. Adds 1 to 5 s on long pages.",
            "default": true
          },
          "removeCookieBanners": {
            "title": "Remove cookie banners",
            "type": "boolean",
            "description": "Clicks the reject button of common consent managers (OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics, Klaro and others), then hides what is left and restores page scrolling.",
            "default": true
          },
          "hideSelectors": {
            "title": "Hide elements (CSS selectors)",
            "type": "array",
            "description": "Elements to hide with display:none before the capture, for example chat widgets or newsletter pop-ups.",
            "items": {
              "type": "string"
            }
          },
          "blockAds": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Aborts requests to common ad and tracking domains. Makes pages faster and cleaner, but can occasionally break a layout.",
            "default": false
          },
          "fixStickyHeaders": {
            "title": "Fix sticky and fixed elements",
            "type": "boolean",
            "description": "Before a full-page capture, turns position:fixed into absolute and position:sticky into relative, so a sticky header is not repeated in the middle of the image.",
            "default": true
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Sets prefers-color-scheme: dark. Only sites that implement it will change.",
            "default": false
          },
          "pageTimeoutSecs": {
            "title": "Page timeout (seconds)",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time for navigation and for the whole capture of one URL.",
            "default": 45
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Pages captured at the same time inside one browser. With 1 GB of memory use 1 or 2; with 2 GB use up to 4; with 4 GB up to 8.",
            "default": 3
          },
          "returnBase64": {
            "title": "Include image as base64 in the dataset item",
            "type": "boolean",
            "description": "Adds imageBase64 to the item when the file is 2 MB or smaller. Useful for AI agents that cannot fetch a URL. The file is always stored in the key-value store as well.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Off by default. Datacenter proxy is free of extra event charges. Selecting the RESIDENTIAL group adds the 'residential-page' event per successful capture (see Pricing in the README).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}