{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API - Full Page, Mobile, Element & PDF",
    "description": "Website screenshot API for bulk URLs: full-page, visible-screen, element or PDF captures on desktop, laptop, tablet or mobile, with cookie banners hidden, sticky headers fixed, lazy images loaded and a crop height. Failed pages are never charged.",
    "version": "1.0",
    "x-build-id": "bCTMe3fKjyXhLugo0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sonic_scraper~website-screenshot-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sonic_scraper-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/sonic_scraper~website-screenshot-api/runs": {
      "post": {
        "operationId": "runs-sync-sonic_scraper-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/sonic_scraper~website-screenshot-api/run-sync": {
      "post": {
        "operationId": "run-sync-sonic_scraper-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",
        "properties": {
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Pages to capture, one per line. \"https://\" is added when missing.",
            "items": {
              "type": "string"
            }
          },
          "urlsText": {
            "title": "URLs (bulk paste)",
            "type": "string",
            "description": "Paste many URLs at once, separated by new lines, commas or spaces. Combined with the list above."
          },
          "captureMode": {
            "title": "What to capture",
            "enum": [
              "fullPage",
              "viewport",
              "element"
            ],
            "type": "string",
            "description": "Full page (scrolls the whole page, capped by \"Maximum height\"), only the visible screen, or one element.",
            "default": "fullPage"
          },
          "elementSelector": {
            "title": "Element CSS selector",
            "type": "string",
            "description": "For \"One element\": the CSS selector to capture, for example \"#pricing\", \"main\" or \"article\". The first visible match is used."
          },
          "format": {
            "title": "Format",
            "enum": [
              "png",
              "jpeg",
              "pdf"
            ],
            "type": "string",
            "description": "PNG (sharp, larger), JPEG (smaller) or PDF (the page as a single-width PDF).",
            "default": "png"
          },
          "jpegQuality": {
            "title": "JPEG quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1-100. Only for JPEG.",
            "default": 80
          },
          "maxHeight": {
            "title": "Maximum height (px)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Crop full-page captures to this height from the top, for example 1080 for the part above the fold plus a bit, or 0 for the whole page (up to 30,000 px).",
            "default": 15000
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "laptop",
              "tablet",
              "mobile",
              "custom"
            ],
            "type": "string",
            "description": "Desktop 1920x1080, laptop 1366x768, tablet 820x1180 (iPad, 2x), mobile 390x844 (iPhone, 3x), or custom width and height below.",
            "default": "desktop"
          },
          "viewportWidth": {
            "title": "Custom width (px)",
            "minimum": 240,
            "maximum": 3840,
            "type": "integer",
            "description": "Only for \"Custom size\".",
            "default": 1920
          },
          "viewportHeight": {
            "title": "Custom height (px)",
            "minimum": 240,
            "maximum": 4320,
            "type": "integer",
            "description": "Only for \"Custom size\".",
            "default": 1080
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Ask the page for its dark theme (prefers-color-scheme: dark), when it has one.",
            "default": false
          },
          "hideCookieBanners": {
            "title": "Hide cookie and consent banners",
            "type": "boolean",
            "description": "Hides banners of common consent platforms (OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics, CookieYes and others) and consent bars found by their text, without clicking anything.",
            "default": true
          },
          "fixStickyElements": {
            "title": "Fix sticky headers in full-page captures",
            "type": "boolean",
            "description": "Sticky and fixed headers appear once at the top instead of repeating or covering content; chat bubbles and bottom bars are hidden.",
            "default": true
          },
          "loadLazyImages": {
            "title": "Load lazy images",
            "type": "boolean",
            "description": "Scroll through the page (at most 8 seconds) before a full-page capture, so lazy-loaded images appear.",
            "default": true
          },
          "selectorsToHide": {
            "title": "Extra elements to hide",
            "type": "array",
            "description": "CSS selectors to hide before capturing, for example \".newsletter-popup\" or \"#ad-banner\".",
            "items": {
              "type": "string"
            }
          },
          "waitUntil": {
            "title": "Wait for",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "When the page counts as loaded. \"Network idle\" is slower but safest for heavy pages.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for element",
            "type": "string",
            "description": "Optional CSS selector to wait for (up to 20 s) before capturing, for example a chart that loads late."
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Wait this long after loading, for animations to finish.",
            "default": 1000
          },
          "pageTimeoutSecs": {
            "title": "Page timeout (seconds)",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "A page still loading after this is captured as it is (loadedFully: false) instead of failing.",
            "default": 45
          },
          "maxConcurrency": {
            "title": "Pages in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Higher is faster but needs more memory (about 500 MB per heavy page; the default 2 GB run handles 3).",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Use a proxy, for example to load a country-specific version of a page."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}