{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot and URL/HTML to PDF Renderer",
    "version": "0.1",
    "x-build-id": "4Po5qqm8FHyH754Yn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bravona~screenshot-pdf-renderer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bravona-screenshot-pdf-renderer",
        "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/bravona~screenshot-pdf-renderer/runs": {
      "post": {
        "operationId": "runs-sync-bravona-screenshot-pdf-renderer",
        "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/bravona~screenshot-pdf-renderer/run-sync": {
      "post": {
        "operationId": "run-sync-bravona-screenshot-pdf-renderer",
        "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": "URLs",
            "type": "array",
            "description": "Public http(s) pages to capture, one file per URL. One URL per line in the form; the API also accepts plain strings [\"https://…\"] or request objects [{\"url\": \"https://…\"}]. Private, internal and loopback addresses are refused.",
            "items": {
              "type": "string"
            }
          },
          "html": {
            "title": "Raw HTML",
            "type": "string",
            "description": "One HTML document to render (up to 5 MB). Relative links resolve against “HTML base URL”."
          },
          "htmlBaseUrl": {
            "title": "HTML base URL",
            "type": "string",
            "description": "Optional public base URL for relative links and assets in “Raw HTML”."
          },
          "htmlDocuments": {
            "title": "HTML documents (batch)",
            "type": "array",
            "description": "Several HTML documents: [{\"name\": \"invoice-1\", \"html\": \"<html>…\", \"baseUrl\": \"https://…\"}]. Up to 500 per run, 5 MB each."
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "PNG, JPEG or WebP screenshot, or a PDF.",
            "default": "png"
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole scrollable page (up to “Max page height”). Off = the visible viewport only. Images only.",
            "default": true
          },
          "devicePreset": {
            "title": "Device preset",
            "enum": [
              "custom",
              "desktop",
              "desktopHd",
              "laptopRetina",
              "iPhone15Pro",
              "pixel5",
              "iPadPro11"
            ],
            "type": "string",
            "description": "Sets viewport, scale, mobile mode and user agent. “Custom” uses the fields below.",
            "default": "custom"
          },
          "viewportWidth": {
            "title": "Viewport width (px)",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "320–3840.",
            "default": 1280
          },
          "viewportHeight": {
            "title": "Viewport height (px)",
            "minimum": 240,
            "maximum": 2160,
            "type": "integer",
            "description": "240–2160.",
            "default": 800
          },
          "deviceScaleFactor": {
            "title": "Device scale factor",
            "enum": [
              "1",
              "1.5",
              "2",
              "3"
            ],
            "type": "string",
            "description": "1, 1.5, 2 or 3 (2 = retina). Higher values make bigger files.",
            "default": "1"
          },
          "quality": {
            "title": "JPEG/WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1–100. Ignored for PNG and PDF.",
            "default": 80
          },
          "captureSelector": {
            "title": "Capture element (CSS selector)",
            "type": "string",
            "description": "Capture only this element instead of the page. Images only."
          },
          "maxPageHeight": {
            "title": "Max page height (px)",
            "minimum": 240,
            "maximum": 30000,
            "type": "integer",
            "description": "Full-page captures stop at this CSS height (240–30000); a warning says when a page was cut.",
            "default": 20000
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "domcontentloaded",
              "load",
              "networkidle"
            ],
            "type": "string",
            "description": "When the page counts as loaded before capture.",
            "default": "networkidle"
          },
          "networkIdleTimeoutSecs": {
            "title": "Network idle wait (s)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Longest wait for network idle (0–60). Pages that never go idle are captured anyway.",
            "default": 5
          },
          "waitForSelector": {
            "title": "Wait for selector",
            "type": "string",
            "description": "CSS selector that must appear before capture; if it never appears the source fails with SELECTOR_TIMEOUT (no charge)."
          },
          "delaySecs": {
            "title": "Extra delay (s)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Wait this long after loading, before capture (0–30).",
            "default": 0
          },
          "scrollToLoadLazyContent": {
            "title": "Scroll to load lazy content",
            "type": "boolean",
            "description": "Scroll down the page before a full-page capture so lazy images load.",
            "default": true
          },
          "timeoutSecs": {
            "title": "Per-source timeout (s)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Hard time limit per URL or HTML document, load and capture included (5–180). Over the limit = TIMEOUT error, no charge.",
            "default": 60
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners (CSS only)",
            "type": "boolean",
            "description": "Hide common cookie/consent banners with CSS. Nothing is clicked or accepted.",
            "default": false
          },
          "hideSelectors": {
            "title": "Hide elements",
            "type": "array",
            "description": "CSS selectors to hide before capture.",
            "items": {
              "type": "string"
            }
          },
          "injectCss": {
            "title": "Custom CSS",
            "type": "string",
            "description": "Extra CSS injected before capture (up to 100,000 characters)."
          },
          "blockAdsAndTrackers": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Refuse requests to about 90 well-known ad, analytics and tag-manager domains. Pages load faster, cost less and show no ad slots. Turn off to capture pages exactly as a visitor with no ad blocker sees them.",
            "default": true
          },
          "pdfPageSize": {
            "title": "PDF page size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "A5",
              "Tabloid"
            ],
            "type": "string",
            "description": "Paper size for PDF output.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "Landscape",
            "type": "boolean",
            "description": "Landscape orientation.",
            "default": false
          },
          "pdfMarginTop": {
            "title": "Margin top",
            "type": "string",
            "description": "CSS length, e.g. 10mm, 0.5in, 20px.",
            "default": "0"
          },
          "pdfMarginRight": {
            "title": "Margin right",
            "type": "string",
            "description": "CSS length.",
            "default": "0"
          },
          "pdfMarginBottom": {
            "title": "Margin bottom",
            "type": "string",
            "description": "CSS length.",
            "default": "0"
          },
          "pdfMarginLeft": {
            "title": "Margin left",
            "type": "string",
            "description": "CSS length.",
            "default": "0"
          },
          "pdfPrintBackground": {
            "title": "Print backgrounds",
            "type": "boolean",
            "description": "Include background colors and images.",
            "default": true
          },
          "pdfMediaType": {
            "title": "CSS media",
            "enum": [
              "print",
              "screen"
            ],
            "type": "string",
            "description": "Render with print CSS (as the browser's Print does) or screen CSS (looks like the screen).",
            "default": "print"
          },
          "pdfScale": {
            "title": "PDF scale",
            "type": "string",
            "description": "Zoom 0.1–2 (e.g. 0.8).",
            "default": "1"
          },
          "maxPdfPages": {
            "title": "Max PDF pages",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Keep at most this many pages per PDF (1–500); a warning says when a PDF was cut.",
            "default": 50
          },
          "captureErrorPages": {
            "title": "Capture HTTP error pages",
            "type": "boolean",
            "description": "Capture pages that answer with HTTP 4xx/5xx (charged as captures). Off = an HTTP_ERROR record, no charge. Bot walls and login pages are never captured.",
            "default": false
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip URLs that robots.txt disallows for this actor (ROBOTS_DISALLOWED, no charge).",
            "default": true
          },
          "maxCaptures": {
            "title": "Max sources per run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety cap on URLs + HTML documents per run (1–5000).",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "0 = automatic by memory (1 GB: 1, 2 GB: 2, 4 GB: 4, 8 GB: 6). Max 10.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}