{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot Generator",
    "description": "Takes screenshots of any list of web pages: full page or viewport, desktop, laptop, tablet or phone, PNG, JPEG or WebP, with cookie banners hidden, ads blocked, dark mode and optional PDFs.",
    "version": "0.0",
    "x-build-id": "ilKPThltyayktEn0f"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mina_safwat~website-screenshot-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mina_safwat-website-screenshot-generator",
        "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/mina_safwat~website-screenshot-generator/runs": {
      "post": {
        "operationId": "runs-sync-mina_safwat-website-screenshot-generator",
        "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/mina_safwat~website-screenshot-generator/run-sync": {
      "post": {
        "operationId": "run-sync-mina_safwat-website-screenshot-generator",
        "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": "Web pages",
            "type": "array",
            "description": "Links to capture, one per line. Links without https:// work too (example.com). API callers can also pass objects such as {\"url\": \"https://example.com\"}. Pages that do not exist, time out, refuse access, show a bot check or come out blank are listed in the FAILED_INPUTS record and are not billed.",
            "items": {
              "type": "string"
            }
          },
          "device": {
            "title": "Device",
            "enum": [
              "custom",
              "desktop",
              "laptop",
              "tablet",
              "iphone",
              "android"
            ],
            "type": "string",
            "description": "Window size to capture with. Tablet and phone presets also send that device's browser identity and touch support, so sites serve their mobile layout, and keep its pixel density (an iPhone screenshot is 1179 pixels wide).",
            "default": "custom"
          },
          "width": {
            "title": "Width (pixels)",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Browser window width, used with the Custom size device.",
            "default": 1280
          },
          "height": {
            "title": "Height (pixels)",
            "minimum": 200,
            "maximum": 2160,
            "type": "integer",
            "description": "Browser window height, used with the Custom size device. Full-page screenshots grow past it.",
            "default": 800
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Captures the whole scrolling page instead of just the window, up to the maximum height below.",
            "default": false
          },
          "maxHeight": {
            "title": "Maximum full-page height (pixels)",
            "minimum": 1000,
            "maximum": 20000,
            "type": "integer",
            "description": "Full-page screenshots stop at this height, so endless feeds don't produce giant images. Images are also kept under 16,383 pixels tall in total (5,461 page pixels on an iPhone at 3×). Rows report croppedAtMaxHeight when a page was taller.",
            "default": 10000
          },
          "format": {
            "title": "Image format",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ],
            "type": "string",
            "description": "PNG keeps every pixel; JPEG and WebP files are several times smaller.",
            "default": "png"
          },
          "quality": {
            "title": "JPEG / WebP quality",
            "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 ready. If a page never reaches this point (some sites keep loading forever), it is captured anyway, at most 15 seconds after its HTML arrived.",
            "default": "load"
          },
          "delay": {
            "title": "Extra delay (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Waits this long after the page is ready, for animations and late content.",
            "default": 1
          },
          "waitForSelector": {
            "title": "Wait for element (CSS selector)",
            "type": "string",
            "description": "Optional. Waits until an element matching this CSS selector is visible, for example #main or .product-grid. A page where it never appears is listed in FAILED_INPUTS."
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hides the cookie and consent pop-ups of common consent tools (OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics and others) with CSS. Nothing is clicked, so no consent is given. Best effort: home-made banners may still show.",
            "default": true
          },
          "blockAds": {
            "title": "Block ads",
            "type": "boolean",
            "description": "Blocks requests to about 40 well-known ad and tracking networks, which makes pages load faster and cleaner.",
            "default": true
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Asks pages for their dark theme (prefers-color-scheme: dark). Sites without one look the same.",
            "default": false
          },
          "scrollToLoadLazyImages": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "For full-page screenshots, scrolls down the page first so images that load on scroll appear in the picture.",
            "default": true
          },
          "timeoutSecs": {
            "title": "Page timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for a page to load. A page that has not even started rendering by then is listed in FAILED_INPUTS.",
            "default": 30
          },
          "pdf": {
            "title": "Also save a PDF",
            "type": "boolean",
            "description": "Also saves each page as an A4 PDF (as the browser would print it) next to the screenshot. News sites can produce PDFs of tens of megabytes.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed for most sites. Turn on Apify Proxy (residential, optionally with a country) for sites that block cloud servers or show different content by country.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}