{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API: Full Page, Bulk & Sitemap",
    "description": "Take full-page screenshots of any list of URLs or a whole website from its sitemap, with cookie banners hidden and lazy images loaded. PNG, JPEG, WebP or PDF, desktop, tablet or mobile. Also a real-time API that returns the image directly.",
    "version": "0.0",
    "x-build-id": "03X3Ga0KLJadXNdhX"
  },
  "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": "Single pages, each captured as given. Add as many as you like.",
            "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 URLs across all inputs. Each URL is captured once per device.",
            "default": 100
          },
          "devices": {
            "title": "Devices",
            "type": "array",
            "description": "Capture each URL as it looks on these devices. Each device is a separate screenshot.",
            "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 much of the page to capture, from the top.",
            "default": 1080
          },
          "selector": {
            "title": "Element selector",
            "type": "string",
            "description": "With One element, a CSS selector for the element to capture, like #pricing or .hero."
          },
          "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": "From 1 to 100. Higher is sharper and larger.",
            "default": 80
          },
          "viewportWidth": {
            "title": "Desktop width (px)",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "The desktop browser window's width. Tablet and mobile use their own sizes.",
            "default": 1920
          },
          "viewportHeight": {
            "title": "Desktop height (px)",
            "minimum": 200,
            "maximum": 2160,
            "type": "integer",
            "description": "The desktop browser window's height. It's the size of a Visible screen capture.",
            "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": "Wait this long after the page loads, for animations to finish.",
            "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": "CSS selectors for anything else to hide, like a promo popup (#newsletter-modal).",
            "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
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}