{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API",
    "description": "Screenshot any URL in a real browser: full-page or viewport PNG/JPEG, desktop and mobile presets, dark mode, cookie banners hidden, optional PDF. Pay per page.",
    "version": "0.2",
    "x-build-id": "HBSkZNWFafbH5Z0Ms"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/josh99smith~website-screenshot-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-josh99smith-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/josh99smith~website-screenshot-api/runs": {
      "post": {
        "operationId": "runs-sync-josh99smith-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/josh99smith~website-screenshot-api/run-sync": {
      "post": {
        "operationId": "run-sync-josh99smith-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": "Website URLs",
            "uniqueItems": true,
            "type": "array",
            "description": "One URL per line. The scheme is optional (`example.com` works). Duplicates are removed.",
            "items": {
              "type": "string"
            }
          },
          "device": {
            "title": "Device preset",
            "enum": [
              "laptop",
              "desktop",
              "tablet",
              "mobile",
              "custom"
            ],
            "type": "string",
            "description": "Viewport, pixel density and user agent preset. Choose `custom` to set width, height and scale factor yourself.",
            "default": "laptop"
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole scrollable page instead of just the first screen.",
            "default": true
          },
          "format": {
            "title": "Image format",
            "enum": [
              "png",
              "jpeg"
            ],
            "type": "string",
            "description": "PNG is lossless; JPEG files are much smaller and support the quality setting.",
            "default": "png"
          },
          "quality": {
            "title": "JPEG quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1 to 100. Ignored for PNG.",
            "default": 80
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hide the most common cookie / consent pop-ups (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast and 60+ others) with CSS before capturing. Nothing is clicked or accepted.",
            "default": true
          },
          "renderPdf": {
            "title": "Also render a PDF",
            "type": "boolean",
            "description": "Additionally save the page as a PDF (billed as a separate PDF event).",
            "default": false
          },
          "pdfFormat": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal"
            ],
            "type": "string",
            "description": "Paper size used when rendering PDFs.",
            "default": "A4"
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Emulate `prefers-color-scheme: dark` so sites with a dark theme render it.",
            "default": false
          },
          "viewportWidth": {
            "title": "Viewport width (custom)",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Only used with the `custom` device preset.",
            "default": 1366
          },
          "viewportHeight": {
            "title": "Viewport height (custom)",
            "minimum": 240,
            "maximum": 2160,
            "type": "integer",
            "description": "Only used with the `custom` device preset.",
            "default": 768
          },
          "deviceScaleFactor": {
            "title": "Device scale factor (custom)",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "1 = standard, 2 = retina, 3 = high-density phone. Only used with the `custom` preset.",
            "default": 1
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "networkidle",
              "load",
              "domcontentloaded"
            ],
            "type": "string",
            "description": "When the page is considered ready. `networkidle` additionally waits (up to 15 s) for background requests to settle after the load event, which gives the most complete render.",
            "default": "networkidle"
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 15000,
            "type": "integer",
            "description": "Additional wait after the page is ready, for animations or late scripts.",
            "default": 500
          },
          "autoScroll": {
            "title": "Scroll before capture",
            "type": "boolean",
            "description": "Scroll through the page first so lazy-loaded images render in full-page screenshots.",
            "default": true
          },
          "unstickFixed": {
            "title": "Un-stick fixed and sticky elements",
            "type": "boolean",
            "description": "Un-stick fixed and sticky elements in full-page captures, so headers, navbars and floating bars appear once at their natural place instead of repeating or covering content. Only applies when Full page is on.",
            "default": true
          },
          "waitForSelector": {
            "title": "Wait for element (CSS selector)",
            "type": "string",
            "description": "Wait until this element exists before capturing, e.g. `.chart-rendered` or `#main img`. Waits up to the page timeout; if it never appears the page is still captured and the record gets a `warnings` entry."
          },
          "hideSelectors": {
            "title": "Hide elements (CSS selectors)",
            "type": "array",
            "description": "Extra CSS selectors to hide before capturing, e.g. `.chat-widget`, `#newsletter-popup`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "clipSelector": {
            "title": "Capture only this element (CSS selector)",
            "type": "string",
            "description": "Screenshot a single element, e.g. `#pricing-table`, instead of the page."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages to render in parallel. Each browser tab uses roughly 200 to 400 MB of memory.",
            "default": 5
          },
          "timeoutSecs": {
            "title": "Page timeout (seconds)",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "Give up on a page after this long.",
            "default": 60
          },
          "maxRetries": {
            "title": "Retries per page",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Retry a page that failed to load this many times before reporting it.",
            "default": 1
          },
          "cookies": {
            "title": "Cookies",
            "type": "array",
            "description": "Cookies to set before loading each page, for logged-in or consent-preset captures. Playwright format: `[{\"name\": \"session\", \"value\": \"abc\", \"domain\": \".example.com\", \"path\": \"/\"}]`. Treated as secrets: values are never logged or stored in the output. Only use sessions you are allowed to use.",
            "default": []
          },
          "extraHeaders": {
            "title": "Extra HTTP headers",
            "type": "object",
            "description": "Headers sent with every request, e.g. `{\"Authorization\": \"Bearer ...\", \"Accept-Language\": \"de-DE\"}`. Treated as secrets: values are never logged or stored in the output.",
            "default": {}
          },
          "blockResources": {
            "title": "Block resource types",
            "uniqueItems": true,
            "type": "array",
            "description": "Abort requests for these resource types to speed up captures of heavy pages. Blocking `image`, `media` or `font` is usually safe; blocking `stylesheet`, `script` or `xhr` (XHR and fetch) changes how the page renders.",
            "items": {
              "type": "string",
              "enum": [
                "image",
                "media",
                "font",
                "stylesheet",
                "script",
                "xhr"
              ],
              "enumTitles": [
                "Images",
                "Audio and video",
                "Fonts",
                "Stylesheets (changes rendering)",
                "Scripts (changes rendering)",
                "XHR and fetch (changes rendering)"
              ]
            },
            "default": []
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Use Apify Proxy for sites that block cloud IP addresses or to render geo-specific content. Proxy traffic is billed by Apify separately."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}