{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API: Full Page & Sitemap",
    "description": "Website screenshot API for full-page, bulk and whole-sitemap captures. Cookie banners hidden and lazy images loaded. JPEG, PNG, WebP or PDF on desktop, tablet or mobile, plus a real-time API that returns the image. Failed screenshots are free. $8 per 1,000.",
    "version": "0.0",
    "x-build-id": "Ze1OuaaTM5uWOmUCc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bjgomes~website-screenshot/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bjgomes-website-screenshot",
        "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/bjgomes~website-screenshot/runs": {
      "post": {
        "operationId": "runs-sync-bjgomes-website-screenshot",
        "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/bjgomes~website-screenshot/run-sync": {
      "post": {
        "operationId": "run-sync-bjgomes-website-screenshot",
        "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 URLs to screenshot",
            "type": "array",
            "description": "Pages to capture exactly as given, as objects like {\"url\": \"https://example.com/pricing\"}. Each URL is one screenshot per device. No sitemap is read for these. Give this, Whole websites or sitemaps, or both. These pages are captured first.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "startUrls": {
            "title": "Whole websites or sitemaps",
            "type": "array",
            "description": "A website (example.com) to find its sitemaps from robots.txt, /sitemap.xml and /sitemap_index.xml, or a sitemap URL to read directly. Every page the sitemap lists is captured, up to Maximum URLs. Pages that robots.txt disallows are skipped.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxUrls": {
            "title": "Maximum URLs",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many unique URLs across page URLs and sitemap pages. Each URL is captured once per device, so URLs times devices is how many screenshots you pay for.",
            "default": 100
          },
          "devices": {
            "title": "Devices",
            "type": "array",
            "description": "Capture each URL on these devices: desktop, tablet (iPad size) or mobile (iPhone size). Each device is a separate screenshot and a separate charge.",
            "items": {
              "type": "string",
              "enum": [
                "desktop",
                "tablet",
                "mobile"
              ],
              "enumTitles": [
                "Desktop",
                "Tablet (iPad)",
                "Mobile (iPhone)"
              ]
            },
            "default": [
              "desktop"
            ]
          },
          "captureMode": {
            "title": "What to capture",
            "enum": [
              "fullPage",
              "viewport",
              "height",
              "element"
            ],
            "type": "string",
            "description": "Full page: the whole page, top to bottom, up to Maximum height. Visible screen: only what fits in the browser window. Fixed height: the top of the page, down to Height. One element: the first element that matches Element selector.",
            "default": "fullPage"
          },
          "height": {
            "title": "Height (px)",
            "minimum": 100,
            "maximum": 20000,
            "type": "integer",
            "description": "With Fixed height, how many pixels to capture from the top of the page. Ignored for Full page, Visible screen, One element and PDF.",
            "default": 1080
          },
          "selector": {
            "title": "Element selector",
            "type": "string",
            "description": "With One element, a CSS selector for the element to capture, such as #pricing or .hero. If it never appears, the row says so and is not charged."
          },
          "format": {
            "title": "Image format",
            "enum": [
              "jpeg",
              "png",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "JPEG is fast and small, and right for most uses. PNG is lossless, but a full-page PNG is much larger and slower to make. WebP is smaller still. PDF prints the page on A4 pages, with backgrounds.",
            "default": "jpeg"
          },
          "quality": {
            "title": "JPEG and WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "JPEG and WebP quality, from 1 (smallest) to 100 (sharpest). Ignored for PNG and PDF.",
            "default": 80
          },
          "viewportWidth": {
            "title": "Desktop width (px)",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Desktop browser window width in pixels. Tablet and mobile use their own sizes and ignore this.",
            "default": 1920
          },
          "viewportHeight": {
            "title": "Desktop height (px)",
            "minimum": 200,
            "maximum": 2160,
            "type": "integer",
            "description": "Desktop browser window height in pixels. A Visible screen capture is this tall. Tablet and mobile use their own heights.",
            "default": 1080
          },
          "maxHeight": {
            "title": "Maximum height (px)",
            "minimum": 1000,
            "maximum": 20000,
            "type": "integer",
            "description": "A Full page capture stops at this height. A taller page is cut off there, and its row says truncated.",
            "default": 15000
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "When the page counts as loaded. Load works for most sites: it waits for the load event (at most 15 seconds, since ads can hold it back for minutes), then up to 3 seconds for the network to go quiet. Network idle waits up to 15 seconds for it. DOM ready doesn't wait for images.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for element",
            "type": "string",
            "description": "Wait until an element matching this CSS selector is visible before capturing. If it never shows up, the row says so and isn't charged."
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Extra wait after the page counts as loaded, in milliseconds, so animations can finish. 0 waits only for the load setting above.",
            "default": 0
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners and pop-ups",
            "type": "boolean",
            "description": "Hide cookie and consent banners, sign-up and discount pop-ups, and the dark overlays behind them, and let the page scroll again. It hides them; it doesn't click accept or reject.",
            "default": true
          },
          "hideStickyElements": {
            "title": "Hide chat widgets and bottom bars",
            "type": "boolean",
            "description": "Hide chat widgets. On a Full page or Fixed height capture, also hide fixed bars stuck to the bottom of the window, which otherwise float over the middle of the image. A fixed header at the top stays.",
            "default": true
          },
          "scrollToLoad": {
            "title": "Scroll to load images",
            "type": "boolean",
            "description": "Scroll through the page before capturing, so lazy-loaded images and sections appear, then scroll back to the top.",
            "default": true
          },
          "blockAds": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Don't load ads, analytics and tracking scripts. Pages load faster, screenshots are cleaner, and fewer runs time out. Turn it off to capture a page exactly as a visitor without an ad blocker sees it.",
            "default": true
          },
          "hideSelectors": {
            "title": "Also hide these elements",
            "type": "array",
            "description": "Extra CSS selectors to hide before the capture, one per item, such as #newsletter-modal or .promo-bar. Cookie banners and chat widgets already have their own switches.",
            "items": {
              "type": "string"
            }
          },
          "maxConcurrency": {
            "title": "Screenshots at once",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many pages load at the same time. Loading pages is CPU work, and Apify gives a run 1 CPU per 4 GB of memory: keep it at 2 for every 4 GB.",
            "default": 2
          },
          "timeoutSecs": {
            "title": "Timeout per screenshot (seconds)",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "The longest a page may take to load and get ready. Capturing the image then gets up to 45 seconds more, for very tall pages. Past either, its row says it timed out, and it isn't charged.",
            "default": 60
          },
          "galleryImages": {
            "title": "Gallery images",
            "enum": [
              "embedded",
              "linked"
            ],
            "type": "string",
            "description": "Every run also saves GALLERY.html: all its screenshots on one scrolling page. 'embedded': smaller copies of the images (at most 1,100 pixels wide) inside the file, so it works offline and once downloaded. If that would be over 9 MB, the images are linked instead and the status says so. 'linked': the page links to the screenshots in the run's storage, so the file stays small. Free either way.",
            "default": "embedded"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}