{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot & PDF API - Full Page, Mobile, No Popups",
    "description": "Turn any list of URLs into full-page screenshots (PNG/JPEG) or PDFs. Desktop, laptop, tablet and mobile presets, cookie banners hidden, lazy images loaded, optional page text for AI agents. Pay only per successful screenshot.",
    "version": "1.1",
    "x-build-id": "bylX65KYkuiAKRAGD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/markup~website-screenshot-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-markup-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/markup~website-screenshot-api/runs": {
      "post": {
        "operationId": "runs-sync-markup-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/markup~website-screenshot-api/run-sync": {
      "post": {
        "operationId": "run-sync-markup-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Pages to capture. https:// is added if missing. You are charged only for pages that are captured successfully.",
            "items": {
              "type": "string"
            }
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "laptop",
              "tablet",
              "mobile"
            ],
            "type": "string",
            "description": "Viewport preset. desktop = 1920x1080, laptop = 1366x768, tablet = 820x1180 (2x), mobile = 390x844 (3x, iPhone user agent).",
            "default": "desktop"
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole scrollable page instead of only the first screen.",
            "default": true
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "pdf"
            ],
            "type": "string",
            "description": "png (sharp, larger), jpeg (smaller) or pdf (A4, printable, selectable text).",
            "default": "png"
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hide common consent popups (OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics, TrustArc, CookieYes and more) without clicking accept.",
            "default": true
          },
          "includeText": {
            "title": "Include page text",
            "type": "boolean",
            "description": "Also return the page's visible text, so an AI agent can see and read the page in one call.",
            "default": false
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Ask the site for its dark color scheme (prefers-color-scheme: dark).",
            "default": false
          },
          "width": {
            "title": "Custom viewport width (px)",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Overrides the device preset width."
          },
          "height": {
            "title": "Custom viewport height (px)",
            "minimum": 200,
            "maximum": 4320,
            "type": "integer",
            "description": "Overrides the device preset height."
          },
          "selector": {
            "title": "Capture only this element (CSS selector)",
            "type": "string",
            "description": "Screenshot just the first element matching this selector, e.g. #pricing or main."
          },
          "waitForSelector": {
            "title": "Wait for selector",
            "type": "string",
            "description": "Wait until this CSS selector appears before capturing."
          },
          "hideSelectors": {
            "title": "Hide these elements (CSS selectors)",
            "type": "array",
            "description": "Extra elements to hide, e.g. chat widgets or sticky headers.",
            "items": {
              "type": "string"
            }
          },
          "waitUntil": {
            "title": "Page load event",
            "enum": [
              "domcontentloaded",
              "load",
              "networkidle"
            ],
            "type": "string",
            "description": "When the page counts as loaded. networkidle is slowest but safest for heavy JavaScript sites.",
            "default": "load"
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Wait this long after loading, before capturing (animations, fonts).",
            "default": 500
          },
          "scrollToBottom": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "Scroll through the page first so lazy-loaded images appear in full-page shots.",
            "default": true
          },
          "maxFullPageHeight": {
            "title": "Max full-page height (px)",
            "minimum": 1000,
            "maximum": 30000,
            "type": "integer",
            "description": "Very long pages are cut at this height (the result is flagged truncated).",
            "default": 15000
          },
          "jpegQuality": {
            "title": "JPEG quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1-100, only used for jpeg.",
            "default": 80
          },
          "maxTextChars": {
            "title": "Max text characters",
            "minimum": 100,
            "maximum": 200000,
            "type": "integer",
            "description": "Cap on returned page text.",
            "default": 20000
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Pages captured at the same time. Raise memory for higher values.",
            "default": 4
          },
          "pageTimeoutSecs": {
            "title": "Page timeout (s)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Give up on a page after this many seconds.",
            "default": 45
          },
          "maxRetries": {
            "title": "Retries per URL",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Extra attempts for a page that fails to load. Failed pages are not charged.",
            "default": 1
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Use a proxy for sites that block data-center traffic or to capture from another country."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}