{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot & PDF — full page, element, print CSS",
    "description": "Render any public URL in real Chromium: full-page PNG/JPEG, one element by CSS selector, or a print-quality PDF. Wait for JS, suppress consent banners, choose desktop/mobile and 2x retina, and get sha256 metadata per result. Optional proxy; pay per result.",
    "version": "0.1",
    "x-build-id": "nFkGcT2ZPek4cNNed"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/opencrawl~website-screenshot-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-opencrawl-website-screenshot-pdf",
        "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/opencrawl~website-screenshot-pdf/runs": {
      "post": {
        "operationId": "runs-sync-opencrawl-website-screenshot-pdf",
        "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/opencrawl~website-screenshot-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-opencrawl-website-screenshot-pdf",
        "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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Page URLs",
            "type": "array",
            "description": "Public pages to render. Each one becomes a dataset item (and one billed result).",
            "items": {
              "type": "object"
            }
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "pdf"
            ],
            "type": "string",
            "description": "png (lossless screenshot), jpeg (smaller, quality setting applies) or pdf (print layout).",
            "default": "png"
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the entire scrollable page instead of the viewport (ignored for PDF and element captures).",
            "default": true
          },
          "selector": {
            "title": "Element selector (optional)",
            "type": "string",
            "description": "Screenshot only the first element matching this CSS selector, e.g. #main or article. Leave empty for the whole page."
          },
          "viewportWidth": {
            "title": "Viewport width",
            "minimum": 200,
            "maximum": 3000,
            "type": "integer",
            "description": "Browser width in CSS pixels (200–3000). Use 390 for a phone layout.",
            "default": 1280
          },
          "viewportHeight": {
            "title": "Viewport height",
            "minimum": 200,
            "maximum": 3000,
            "type": "integer",
            "description": "Browser height in CSS pixels (200–3000).",
            "default": 800
          },
          "deviceScaleFactor": {
            "title": "Pixel density",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "1 = standard, 2 = retina-quality output (larger file).",
            "default": 1
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle",
              "commit"
            ],
            "type": "string",
            "description": "Navigation readiness. networkidle is best for apps that fetch data after load.",
            "default": "networkidle"
          },
          "waitForSelector": {
            "title": "Wait for selector (optional)",
            "type": "string",
            "description": "Wait until this selector exists before capturing, e.g. main .results."
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Additional wait after navigation, for animations and late paints (0–10000).",
            "default": 0
          },
          "hideBanners": {
            "title": "Hide cookie/consent banners",
            "type": "boolean",
            "description": "Inject CSS that hides common cookie, consent, GDPR and paywall overlays before capture.",
            "default": true
          },
          "hideSelectors": {
            "title": "Extra selectors to hide",
            "type": "array",
            "description": "CSS selectors to hide before capture, e.g. .newsletter-popup or #chat-widget. Up to 20.",
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy. Use it for bot-protected sites; each URL gets its own session. Leave empty for direct access."
          },
          "pdfFormat": {
            "title": "PDF page size",
            "enum": [
              "A4",
              "Letter"
            ],
            "type": "string",
            "description": "Paper size for PDF output.",
            "default": "A4"
          },
          "printBackground": {
            "title": "PDF: print backgrounds",
            "type": "boolean",
            "description": "Include background colours and images in the PDF.",
            "default": true
          },
          "quality": {
            "title": "JPEG quality",
            "minimum": 30,
            "maximum": 100,
            "type": "integer",
            "description": "JPEG quality 30–100 (ignored for PNG/PDF).",
            "default": 80
          },
          "maxPages": {
            "title": "Max URLs",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Upper bound on URLs rendered in one run (1–50).",
            "default": 10
          },
          "timeoutSecs": {
            "title": "Navigation timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Per-URL timeout (5–120).",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}