{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API - URL to PNG, JPEG & PDF",
    "description": "Take screenshots of any web page, or of your own HTML, in bulk: PNG, JPEG or PDF, full page or one element, any screen size, retina scale, dark mode, delay and wait settings. Files are stored with a link for each. Export the list to Excel, CSV or API.",
    "version": "0.1",
    "x-build-id": "dUdpNILmFCcIgiNlA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pshivam~website-screenshot-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pshivam-website-screenshot-scraper",
        "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/pshivam~website-screenshot-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pshivam-website-screenshot-scraper",
        "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/pshivam~website-screenshot-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pshivam-website-screenshot-scraper",
        "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": "Page links",
            "type": "array",
            "description": "The pages to capture, one link per line. Public web addresses only: addresses inside a private network (localhost, 10.x.x.x, 192.168.x.x, internal names) are refused. Leave empty to capture two example pages.",
            "items": {
              "type": "string"
            }
          },
          "html": {
            "title": "HTML to draw (optional)",
            "type": "string",
            "description": "A whole HTML document to draw instead of, or as well as, the links: invoices, emails, reports, social cards. Up to 2 MB. It is drawn by the same browser, with its own styles and images."
          },
          "formats": {
            "title": "File formats",
            "type": "array",
            "description": "What to make for each page. Choose several to get all of them in one record. PNG is the default.",
            "items": {
              "type": "string",
              "enum": [
                "png",
                "jpeg",
                "pdf"
              ],
              "enumTitles": [
                "PNG (lossless image)",
                "JPEG (smaller image)",
                "PDF (print version)"
              ]
            },
            "default": [
              "png"
            ]
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole page from top to bottom instead of only the first screen. The browser limits an image to about 16,384 pixels in height.",
            "default": false
          },
          "viewportWidth": {
            "title": "Screen width (px)",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "The width of the browser window: 1280 for a laptop, 390 for a phone, 1920 for a desktop screen.",
            "default": 1280
          },
          "viewportHeight": {
            "title": "Screen height (px)",
            "minimum": 200,
            "maximum": 4000,
            "type": "integer",
            "description": "The height of the browser window (the first screen). Full page ignores it.",
            "default": 800
          },
          "deviceScaleFactor": {
            "title": "Pixel density",
            "minimum": 1,
            "maximum": 3,
            "type": "number",
            "description": "1 is a normal screen, 2 a retina screen (twice as many pixels in each direction), 3 a high-density phone.",
            "default": 1
          },
          "delaySeconds": {
            "title": "Seconds to wait before the shot",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Extra time after the page has loaded, for animations, lazy images and scripts that draw the page.",
            "default": 1
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "When the page counts as loaded.",
            "default": "load"
          },
          "colorScheme": {
            "title": "Light or dark",
            "enum": [
              "light",
              "dark"
            ],
            "type": "string",
            "description": "The colour scheme the browser reports. Pages that follow the visitor's setting show their dark version.",
            "default": "light"
          },
          "selector": {
            "title": "Capture one element (CSS selector)",
            "type": "string",
            "description": "Capture only the element that matches this selector, for example #chart or .product-card, instead of the page. Applies to PNG and JPEG."
          },
          "jpegQuality": {
            "title": "JPEG quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "From 1 (smallest file) to 100 (best picture). Only for JPEG.",
            "default": 80
          },
          "pdfFormat": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3"
            ],
            "type": "string",
            "description": "The paper size of the PDF.",
            "default": "A4"
          },
          "requestTimeoutSeconds": {
            "title": "Seconds to wait for a page",
            "minimum": 5,
            "maximum": 120,
            "type": "number",
            "description": "Give up on a page that has not loaded after this many seconds. A page that is given up on is not returned and not charged.",
            "default": 45
          },
          "skipErrorPages": {
            "title": "Skip error pages",
            "type": "boolean",
            "description": "Do not return a page that answers with an error (404, 500 ...). Turn it off to capture the error page too.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new records",
            "type": "boolean",
            "description": "Skip pages that earlier runs of this same input already captured, so you get and pay for new ones only. The first run works as usual and remembers what it returned, in your key-value store 'website-screenshot-scraper-only-new'.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 10000000,
            "type": "integer",
            "description": "Stop after this many screenshots (one record per page, whatever the number of formats). You are charged per record.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Pages at the same time",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many pages the browser captures at the same time. Raise it together with the memory of the run for big lists.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}