{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot and PDF",
    "description": "Capture a batch of public web pages as PNG, JPEG, WebP or PDF: full page or viewport, one element by CSS selector, desktop, tablet and mobile presets, dark mode, hidden cookie banners. One result per URL with file URL and size; failed URLs are not charged.",
    "version": "0.1",
    "x-build-id": "kTlIWfzkhdaVLBLKe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/reestri~web-screenshot/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-reestri-web-screenshot",
        "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/reestri~web-screenshot/runs": {
      "post": {
        "operationId": "runs-sync-reestri-web-screenshot",
        "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/reestri~web-screenshot/run-sync": {
      "post": {
        "operationId": "run-sync-reestri-web-screenshot",
        "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": "Public http or https pages to capture, up to 1,000 per run. A domain without a scheme gets https. Duplicates are captured once. Pages behind a login, local addresses and private networks are refused.",
            "items": {
              "type": "string"
            }
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "PNG is lossless, JPEG and WebP are smaller, PDF prints the page into a document.",
            "default": "png"
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole scrollable page instead of the visible viewport. Very long pages are cut at the maximum height and marked truncated.",
            "default": false
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "laptop",
              "tablet",
              "mobile",
              "custom"
            ],
            "type": "string",
            "description": "Viewport preset. Desktop 1920x1080, laptop 1366x768, tablet 800x1280 at 2x, mobile 412x915 at 2.625x (Chrome on Android). Width, height and scale below override the preset.",
            "default": "desktop"
          },
          "colorScheme": {
            "title": "Color scheme",
            "enum": [
              "light",
              "dark",
              "no-preference"
            ],
            "type": "string",
            "description": "Emulates the visitor's light or dark mode preference. Only pages that support prefers-color-scheme change.",
            "default": "light"
          },
          "selector": {
            "title": "Capture one element (CSS selector)",
            "type": "string",
            "description": "Capture only the first element matching this CSS selector, for example header or #pricing. If nothing matches, the URL is reported as selector_not_found and not charged. Ignored for PDF."
          },
          "quality": {
            "title": "JPEG and WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1 to 100. Ignored for PNG and PDF.",
            "default": 80
          },
          "hideSelectors": {
            "title": "Hide elements (CSS selectors)",
            "type": "array",
            "description": "Elements to hide before capture, such as a chat widget, a promo bar or a cookie banner your page shows. Hiding is done with CSS; nothing is clicked or accepted.",
            "items": {
              "type": "string"
            }
          },
          "hideCookieBanners": {
            "title": "Hide common cookie consent banners",
            "type": "boolean",
            "description": "Also hides the containers of widely used consent tools (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast and others) with CSS. Consent is not given or refused; banners from other tools stay visible unless you add their selectors above.",
            "default": false
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle",
              "commit"
            ],
            "type": "string",
            "description": "When the page counts as ready. The HTML must arrive within the navigation timeout. The load event or network idle (500 ms without requests) is then awaited for up to the same timeout; if it never comes, the page is captured as it is and the result has pageLoaded false.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for element (CSS selector)",
            "type": "string",
            "description": "Wait until an element matching this selector is visible before capturing. If it does not appear within the navigation timeout, the URL is reported as wait_for_selector_timeout and not charged."
          },
          "delayMs": {
            "title": "Extra delay before capture",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Waits this long after the page is ready, for animations or late content. 0 to 30,000 ms.",
            "default": 0
          },
          "scrollToBottom": {
            "title": "Scroll through the page first",
            "type": "boolean",
            "description": "Scrolls down the page and back to the top before capture, so lazy-loaded images appear. Useful with full page.",
            "default": false
          },
          "viewportWidth": {
            "title": "Viewport width",
            "minimum": 240,
            "maximum": 3840,
            "type": "integer",
            "description": "Overrides the device preset. 240 to 3,840 CSS pixels."
          },
          "viewportHeight": {
            "title": "Viewport height",
            "minimum": 240,
            "maximum": 4320,
            "type": "integer",
            "description": "Overrides the device preset. 240 to 4,320 CSS pixels."
          },
          "deviceScaleFactor": {
            "title": "Pixel density",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "1 for standard, 2 or 3 for retina-sharp images (larger files). Overrides the device preset."
          },
          "maxHeight": {
            "title": "Maximum full page height",
            "minimum": 1000,
            "maximum": 30000,
            "type": "integer",
            "description": "Full page captures stop at this height in CSS pixels and are marked truncated. 1,000 to 30,000. WebP is additionally limited to 16,383 image pixels.",
            "default": 15000
          },
          "pdfFormat": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "Tabloid"
            ],
            "type": "string",
            "description": "Only for PDF output.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "PDF landscape",
            "type": "boolean",
            "description": "Only for PDF output.",
            "default": false
          },
          "pdfPrintBackground": {
            "title": "PDF background colors and images",
            "type": "boolean",
            "description": "Only for PDF output. Off gives a printer-friendly white page.",
            "default": true
          },
          "pdfMedia": {
            "title": "PDF CSS media",
            "enum": [
              "screen",
              "print"
            ],
            "type": "string",
            "description": "Screen keeps the page looking as it does in a browser; print uses the site's print stylesheet if it has one.",
            "default": "screen"
          },
          "headers": {
            "title": "Extra request headers",
            "type": "object",
            "description": "Optional headers, limited to Accept-Language, Referer, DNT, Sec-GPC, Cache-Control and Pragma. For example {\"Accept-Language\": \"de-DE\"} to see the German version of a site. Any other header (Authorization, Cookie, User-Agent) is ignored."
          },
          "navigationTimeoutSecs": {
            "title": "Navigation timeout",
            "minimum": 5,
            "maximum": 90,
            "type": "integer",
            "description": "How long to wait for the HTML before reporting a timeout, and again for the load state. Rendering the image has its own limit of at least 60 seconds. 5 to 90 seconds.",
            "default": 30
          },
          "maxRetries": {
            "title": "Retries per URL",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "Retries after a dropped connection or a browser crash. Timeouts, DNS, TLS and HTTP error statuses are not retried. 0 to 2.",
            "default": 1
          },
          "captureErrorPages": {
            "title": "Capture pages that return an error status",
            "type": "boolean",
            "description": "By default a page answering 400 or above (404, 403, 500) is reported as http_error_status and not charged. Turn on to capture and pay for it anyway, for example to archive your own 404 page.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Pages in parallel",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many pages are open at once. 1 to 5. Two suits the default 2 GB memory; raise it only for light pages.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}