{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Website Screenshots & PDFs from URLs",
    "description": "Capture full-page or viewport screenshots (PNG, JPEG, WebP) or PDFs of a list of URLs. Device presets, wait-for-selector, custom CSS, ad blocking and best-effort cookie banner hiding. Accepts the same input as apify/screenshot-url. Failed URLs are free.",
    "version": "0.1",
    "x-build-id": "1WMJzuJd7IzJxtJDf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plainsource~website-screenshot-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plainsource-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/plainsource~website-screenshot-pdf/runs": {
      "post": {
        "operationId": "runs-sync-plainsource-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/plainsource~website-screenshot-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-plainsource-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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Pages to capture. Each URL gives one result row and, if it succeeds, one file. Exact duplicates are captured once.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "format": {
            "title": "Format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "File type to save. PDF uses the paper settings below.",
            "default": "png"
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole scrollable page. Turn off to capture only the visible viewport. Ignored for PDF.",
            "default": true
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "laptop",
              "iphone",
              "ipad",
              "custom"
            ],
            "type": "string",
            "description": "Screen size to emulate. Desktop is 1920x1080, laptop 1366x768, iPhone 390x844 at 3x, iPad 820x1180 at 2x. Choose Custom to use the width and height below. If left empty and a width is set, Custom is used; otherwise Desktop."
          },
          "viewportWidth": {
            "title": "Custom width",
            "minimum": 100,
            "maximum": 3840,
            "type": "integer",
            "description": "Viewport width in CSS pixels for the Custom device. Default 1280."
          },
          "viewportHeight": {
            "title": "Custom height",
            "minimum": 100,
            "maximum": 4320,
            "type": "integer",
            "description": "Viewport height in CSS pixels for the Custom device. Default 1080. With Full page on, this only affects layout, not the image height."
          },
          "deviceScaleFactor": {
            "title": "Custom pixel ratio",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Pixel density for the Custom device. 2 gives a retina-sharp image at twice the width and height.",
            "default": 1
          },
          "quality": {
            "title": "JPEG/WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality for JPEG and WebP, from 1 to 100. Ignored for PNG and PDF.",
            "default": 80
          },
          "maxHeight": {
            "title": "Maximum page height",
            "minimum": 500,
            "maximum": 30000,
            "type": "integer",
            "description": "Full-page captures stop at this height in CSS pixels, and the row is marked truncated. Very tall images are slow and large. WebP is also limited to 16,383 image pixels.",
            "default": 15000
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle2",
              "networkidle0"
            ],
            "type": "string",
            "description": "Page state to wait for before capturing. The wait stops 20 seconds after the HTML has loaded (or at the page load timeout, if shorter). A page that has not reached the state by then is captured as it is, and the row gets a warning.",
            "default": "networkidle2"
          },
          "waitForSelector": {
            "title": "Wait for selector",
            "type": "string",
            "description": "Optional CSS selector that must appear before capturing, for example #main or .product-grid. If it does not appear in time, the URL fails with an explanation and is not charged."
          },
          "waitForSelectorTimeoutSecs": {
            "title": "Selector timeout",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for the selector above.",
            "default": 15
          },
          "delay": {
            "title": "Delay before capture",
            "minimum": 0,
            "maximum": 3600000,
            "type": "integer",
            "description": "Extra time to wait right before capturing, for animations or late content.",
            "default": 0
          },
          "scrollToBottom": {
            "title": "Scroll to bottom first",
            "type": "boolean",
            "description": "Scroll through the page before capturing so lazy-loaded images and sections load. Recommended for full-page captures of long pages.",
            "default": false
          },
          "delayAfterScrolling": {
            "title": "Delay after scrolling",
            "minimum": 0,
            "maximum": 3600000,
            "type": "integer",
            "description": "Time to wait after scrolling, unless the network-idle option below is on.",
            "default": 2500
          },
          "waitUntilNetworkIdleAfterScroll": {
            "title": "Wait for network idle after scrolling",
            "type": "boolean",
            "description": "After scrolling, wait until no requests are running for 0.5 s instead of using the fixed delay.",
            "default": false
          },
          "waitUntilNetworkIdleAfterScrollTimeout": {
            "title": "Network idle timeout after scrolling",
            "minimum": 1000,
            "maximum": 3600000,
            "type": "integer",
            "description": "Longest wait for the network to go idle after scrolling.",
            "default": 30000
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners and pop-ups",
            "type": "boolean",
            "description": "Best effort. Hides banners from common consent tools and fixed overlays that cover the page. Nothing is clicked or accepted. Some banners and full-page consent walls will still show.",
            "default": true
          },
          "blockAdsAndTrackers": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Block requests to 44 well-known ad and analytics services (Google Ads and Analytics, Meta Pixel, Hotjar, Criteo, Taboola and similar). Pages load faster and ad slots stay empty. Turn off if you need the ads in the capture.",
            "default": true
          },
          "selectorsToHide": {
            "title": "Selectors to hide",
            "type": "string",
            "description": "CSS selectors to hide before capturing, one per line, for example .chat-widget or #promo-bar."
          },
          "injectCss": {
            "title": "Custom CSS",
            "type": "string",
            "description": "CSS added to every page before capturing."
          },
          "pdfFormat": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "Letter"
            ],
            "type": "string",
            "description": "Paper size when Format is PDF.",
            "default": "A4"
          },
          "pdfPrintBackground": {
            "title": "Print backgrounds",
            "type": "boolean",
            "description": "Include background colors and images in the PDF.",
            "default": true
          },
          "pdfLandscape": {
            "title": "Landscape",
            "type": "boolean",
            "description": "Use landscape orientation for the PDF.",
            "default": false
          },
          "pdfMediaType": {
            "title": "PDF styles",
            "enum": [
              "print",
              "screen"
            ],
            "type": "string",
            "description": "Print uses the site's print stylesheet, which often hides menus and ads. Screen makes the PDF look like the page in a browser.",
            "default": "print"
          },
          "maxConcurrency": {
            "title": "Pages at a time",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many pages to capture in parallel. Higher values need more memory; with the default 2 GB, keep this at 3 or lower.",
            "default": 3
          },
          "navigationTimeoutSecs": {
            "title": "Page load timeout",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "How long to wait for the page's HTML to load. If it doesn't load in time, the URL is tried once more and then reported as failed.",
            "default": 45
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}