{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API: Full Page, Mobile & Desktop",
    "description": "Turn web page URLs or your own HTML into PNG or JPEG images with public links. Choose device, dark mode, full page or a single element, hide cookie banners, and wait for dynamic content. Failed captures are not charged.",
    "version": "0.0",
    "x-build-id": "2jkJ9oYH4KxP8UVKT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bite-sized-insights~website-screenshot-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bite-sized-insights-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/bite-sized-insights~website-screenshot-api/runs": {
      "post": {
        "operationId": "runs-sync-bite-sized-insights-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/bite-sized-insights~website-screenshot-api/run-sync": {
      "post": {
        "operationId": "run-sync-bite-sized-insights-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": "Web page URLs",
            "maxItems": 100,
            "type": "array",
            "description": "Public pages to capture, one image each. Domain or URL. Empty it to capture only HTML.",
            "items": {
              "type": "string",
              "maxLength": 2048
            },
            "default": [
              "https://example.com"
            ]
          },
          "htmlDocuments": {
            "title": "HTML documents",
            "maxItems": 20,
            "type": "array",
            "description": "Complete HTML documents, one image each. Images and styles: inline or public URLs.",
            "items": {
              "type": "string",
              "maxLength": 1000000
            },
            "default": []
          },
          "devicePreset": {
            "title": "Device",
            "enum": [
              "desktop",
              "laptop",
              "tablet",
              "mobile"
            ],
            "type": "string",
            "description": "Window size and pixel density. Phones and tablets also get touch and mobile page layout.",
            "default": "desktop"
          },
          "viewportWidth": {
            "title": "Window width (px)",
            "minimum": 200,
            "maximum": 4000,
            "type": "integer",
            "description": "Overrides the device's window width. Responsive pages react to it."
          },
          "viewportHeight": {
            "title": "Window height (px)",
            "minimum": 200,
            "maximum": 4000,
            "type": "integer",
            "description": "Overrides the device's window height. Also the height of the image unless full page is on."
          },
          "deviceScaleFactor": {
            "title": "Pixel density",
            "minimum": 1,
            "maximum": 4,
            "type": "number",
            "description": "Overrides the device's pixel density, 1 to 4. At 2 the image is twice as wide and tall."
          },
          "colorScheme": {
            "title": "Color scheme",
            "enum": [
              "light",
              "dark"
            ],
            "type": "string",
            "description": "Light or dark mode, for sites that follow the visitor's preference.",
            "default": "light"
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole scrollable page, not only the first screen. Max 40 million pixels.",
            "default": false
          },
          "selector": {
            "title": "Capture one element",
            "maxLength": 200,
            "type": "string",
            "description": "CSS selector, e.g. <code>#pricing</code>. First match only. Not combinable with full page."
          },
          "format": {
            "title": "Image format",
            "enum": [
              "png",
              "jpeg"
            ],
            "type": "string",
            "description": "PNG is lossless and supports a transparent background; JPEG is smaller.",
            "default": "png"
          },
          "quality": {
            "title": "JPEG quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1 (smallest file) to 100 (best quality). Used for JPEG only.",
            "default": 80
          },
          "omitBackground": {
            "title": "Transparent background",
            "type": "boolean",
            "description": "Leave the page background transparent where the page does not paint one. PNG only.",
            "default": false
          },
          "hideSelectors": {
            "title": "Hide elements",
            "maxItems": 25,
            "type": "array",
            "description": "CSS selectors of elements to hide, e.g. <code>.cookie-banner</code>.",
            "items": {
              "type": "string",
              "maxLength": 200
            },
            "default": []
          },
          "customCss": {
            "title": "Custom CSS",
            "maxLength": 20000,
            "type": "string",
            "description": "Extra styles for the capture, e.g. <code>.sticky-header { position: static; }</code>."
          },
          "disableAnimations": {
            "title": "Freeze animations",
            "type": "boolean",
            "description": "Finish running animations and stop endless ones before capturing, for steady results.",
            "default": false
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "When the page counts as loaded. Network idle waits for late content but takes longest.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for element",
            "maxLength": 200,
            "type": "string",
            "description": "CSS selector (e.g. <code>#content</code>) that must be on the page before it is captured."
          },
          "waitMs": {
            "title": "Extra wait (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Pause in milliseconds after the page is ready, for animations or late content.",
            "default": 0
          },
          "timeoutSeconds": {
            "title": "Time limit per screenshot (s)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum seconds per screenshot, including loading and waiting. Timeouts are not charged.",
            "default": 30
          },
          "failOnHttpError": {
            "title": "Fail on page errors",
            "type": "boolean",
            "description": "Skip the screenshot when the page answers with an error status such as 404 or 500.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}