{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API",
    "description": "Screenshot any list of URLs as PNG, JPEG or WebP: desktop, mobile, tablet or custom size, full page or a single element. Hides cookie banners and ads. Pay only for successful screenshots.",
    "version": "0.1",
    "x-build-id": "AwBkl3W7igNaOHodi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/evermore_lancet_yhd~website-screenshot-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-evermore_lancet_yhd-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/evermore_lancet_yhd~website-screenshot-api/runs": {
      "post": {
        "operationId": "runs-sync-evermore_lancet_yhd-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/evermore_lancet_yhd~website-screenshot-api/run-sync": {
      "post": {
        "operationId": "run-sync-evermore_lancet_yhd-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",
            "minItems": 1,
            "type": "array",
            "description": "Web pages to screenshot, one per line. The scheme is optional (\"example.com\" becomes \"https://example.com\"). Each URL produces exactly one dataset item and, if it succeeds, one image in the key-value store. Invalid or unreachable URLs are reported as status \"failed\" and are not charged.",
            "items": {
              "type": "string"
            }
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "mobile",
              "tablet",
              "custom"
            ],
            "type": "string",
            "description": "Which device to emulate. \"desktop\" = 1920x1080 viewport. \"mobile\" = 390x844 phone (2x pixel ratio, touch, mobile user agent). \"tablet\" = 820x1180 (2x, touch). \"custom\" = use the Width, Height and Pixel ratio fields below.",
            "default": "desktop"
          },
          "width": {
            "title": "Custom width (px)",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Viewport width in CSS pixels. Used only when device is \"custom\".",
            "default": 1920
          },
          "height": {
            "title": "Custom height (px)",
            "minimum": 200,
            "maximum": 4320,
            "type": "integer",
            "description": "Viewport height in CSS pixels. Used only when device is \"custom\". With fullPage off, this is exactly the height of the image (times pixel ratio), so use it to capture just the top part of a page.",
            "default": 1080
          },
          "deviceScaleFactor": {
            "title": "Custom pixel ratio",
            "minimum": 1,
            "maximum": 3,
            "type": "number",
            "description": "Device pixel ratio for device \"custom\" (1 = normal, 2 = retina). The image is width x ratio pixels wide.",
            "default": 1
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "If true, capture the whole scrollable page instead of only the visible viewport. Lazy-loaded images are loaded first by scrolling (see \"Scroll to load lazy content\"). Very long pages are cut at \"Max full-page height\" and marked truncated: true. Priced as a full-page screenshot ($0.01 instead of $0.005), because the whole page is rendered.",
            "default": false
          },
          "selector": {
            "title": "Element selector (optional)",
            "type": "string",
            "description": "CSS selector of a single element to capture instead of the page, e.g. \"#main\", \"header\" or \".product-card\". The first matching element is used. If nothing matches, the URL fails with a clear error and is not charged. Leave empty to capture the page."
          },
          "format": {
            "title": "Image format",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ],
            "type": "string",
            "description": "\"png\" is lossless (best for text/UI, larger files). \"jpeg\" and \"webp\" are smaller; webp is usually ~30% smaller than jpeg at the same quality.",
            "default": "png"
          },
          "quality": {
            "title": "Quality (jpeg/webp)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality from 1 to 100 for jpeg and webp. Ignored for png.",
            "default": 80
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "When the page counts as loaded. \"load\" (default) waits for images and scripts; \"domcontentloaded\" is fastest; \"networkidle\" waits until no network requests for 500 ms (best for single-page apps). If the event never happens (e.g. a site that polls forever), the screenshot is taken anyway instead of failing.",
            "default": "load"
          },
          "extraDelayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Additional wait in milliseconds after the page loaded and overlays were hidden, right before the screenshot. Use it for animations, charts or slow widgets. 0 = no extra delay.",
            "default": 0
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Dismiss or hide cookie/consent popups (OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics, Sourcepoint and thousands of others) and unlock scrolling they block.",
            "default": true
          },
          "blockAds": {
            "title": "Block ads",
            "type": "boolean",
            "description": "Block requests to major ad networks and trackers and hide leftover ad slots. Also makes pages load faster.",
            "default": true
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Emulate the dark color scheme (prefers-color-scheme: dark). Only sites that support dark mode will look different.",
            "default": false
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of pages captured in parallel. The Actor runs at most 2 pages per CPU core (Apify gives 1 core per 4 GB of memory), so the default 2 GB run captures one page at a time. Give the run more memory (up to 8 GB) to go faster on large batches.",
            "default": 5
          },
          "timeoutSecs": {
            "title": "Timeout per attempt (seconds)",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum time for one attempt at one URL (loading, waiting and capturing). A slow URL never blocks the rest of the run.",
            "default": 60
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many times to retry a URL after a temporary failure (timeout, network error, HTTP 429/5xx), with exponential backoff (1 s, 2 s, 4 s...). Each retry of a slow page can take up to timeoutSecs, so raise this only for flaky sites. Permanent failures such as HTTP 404 or an unknown domain are not retried.",
            "default": 1
          },
          "hideSelectors": {
            "title": "Hide elements",
            "type": "array",
            "description": "CSS selectors of elements to hide before the screenshot, e.g. chat widgets, sticky headers or newsletter popups: [\"#intercom-container\", \".sticky-header\"].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "scrollToLoadLazyContent": {
            "title": "Scroll to load lazy content",
            "type": "boolean",
            "description": "With full page on, scroll through the page first so lazy-loaded images and sections appear, then scroll back to the top. Bounded to 10 seconds and Max full-page height, so infinite feeds can't stall the run.",
            "default": true
          },
          "maxFullPageHeight": {
            "title": "Max full-page height (px)",
            "minimum": 1000,
            "maximum": 30000,
            "type": "integer",
            "description": "Full-page and element screenshots are cut at this height in CSS pixels (the item gets truncated: true). Protects against infinite-scroll pages. WebP is additionally limited to 16383 image pixels.",
            "default": 15000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy for sites that block data-center IPs or show region-specific content. Leave empty to connect directly."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}