{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot & PDF Renderer",
    "description": "Turn web page URLs into PNG, JPEG or WebP screenshots or PDF files. Full page or viewport, single element, dark mode, cookie banner and ad removal. One row per URL with the file link, size and final URL. Pay only per successful render.",
    "version": "1.0",
    "x-build-id": "EZvUChm76NlXwy0AM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sapphire_studio~screenshot-pdf-renderer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sapphire_studio-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/sapphire_studio~screenshot-pdf-renderer/runs": {
      "post": {
        "operationId": "runs-sync-sapphire_studio-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/sapphire_studio~screenshot-pdf-renderer/run-sync": {
      "post": {
        "operationId": "run-sync-sapphire_studio-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Page URLs",
            "type": "array",
            "description": "Public web pages to render, one per line, as full http or https addresses. One dataset row per URL. Only rows with status \"ok\" are charged; invalid, duplicate, not found and blocked URLs are free. Up to 1000 URLs per run.",
            "items": {
              "type": "string"
            }
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "File type to produce. PNG is lossless, JPEG and WebP are much smaller, PDF gives a printable, text-searchable document.",
            "default": "png"
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole scrollable page instead of only the visible viewport. The page is scrolled first so lazy-loaded images appear. Very long pages are cut at \"Maximum full-page height\". Ignored for PDF, which always contains the whole page.",
            "default": false
          },
          "selector": {
            "title": "Element to capture (CSS selector)",
            "type": "string",
            "description": "Optional. Screenshot only the first element that matches this CSS selector, for example #main or .pricing-table. If no visible element matches, the row gets status \"not_found\" and is not charged. Not available for PDF."
          },
          "viewportWidth": {
            "title": "Viewport width (px)",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Browser window width in CSS pixels. 1280 is a typical laptop, 390 a phone.",
            "default": 1280
          },
          "viewportHeight": {
            "title": "Viewport height (px)",
            "minimum": 240,
            "maximum": 2160,
            "type": "integer",
            "description": "Browser window height in CSS pixels. This is the screenshot height unless Full page is on.",
            "default": 800
          },
          "deviceScaleFactor": {
            "title": "Pixel density",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "1 for standard screens, 2 for retina-quality images (twice the width and height in pixels, larger files).",
            "default": 1
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Ask the page for its dark color scheme (prefers-color-scheme: dark). Pages without a dark theme look the same.",
            "default": false
          },
          "removeCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hide cookie banners and consent pop-ups from common consent tools and skip loading those tools. Nothing is accepted or clicked on your behalf.",
            "default": true
          },
          "blockAds": {
            "title": "Skip ads and trackers",
            "type": "boolean",
            "description": "Do not load requests to common ad and analytics networks. Renders are faster and cleaner; ad slots may appear empty.",
            "default": true
          },
          "hideSelectors": {
            "title": "Elements to hide (CSS selectors)",
            "type": "array",
            "description": "Optional CSS selectors of elements to hide before capturing, for example a chat widget (#intercom-container) or a sticky header. Up to 50.",
            "items": {
              "type": "string"
            }
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "networkidle",
              "domcontentloaded"
            ],
            "type": "string",
            "description": "When the page counts as loaded. \"Load\" suits most pages. \"Network idle\" waits for late requests (up to 20 seconds, then the page is captured anyway). \"DOM ready\" is fastest but images may still be missing.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for element (CSS selector)",
            "type": "string",
            "description": "Optional. Wait up to 15 seconds for this element to be visible before capturing. If it never appears, the row gets status \"not_found\" and is not charged."
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 15000,
            "type": "integer",
            "description": "Additional wait after loading and before capturing, for animations and late content.",
            "default": 500
          },
          "timeoutSecs": {
            "title": "Page load timeout (s)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for a page to start loading before the attempt fails. Failed loads are retried up to 3 times.",
            "default": 30
          },
          "imageQuality": {
            "title": "Image quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality for JPEG and WebP, 1 to 100. Ignored for PNG and PDF.",
            "default": 80
          },
          "maxHeight": {
            "title": "Maximum full-page height (px)",
            "minimum": 500,
            "maximum": 16000,
            "type": "integer",
            "description": "Full-page screenshots are cut at this height in CSS pixels. Lowered automatically for high pixel density and very wide viewports so images stay within browser limits.",
            "default": 10000
          },
          "pdfPaperFormat": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "Tabloid"
            ],
            "type": "string",
            "description": "Paper size for PDF output.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "PDF landscape",
            "type": "boolean",
            "description": "Landscape page orientation for PDF output.",
            "default": false
          },
          "pdfPrintBackground": {
            "title": "PDF backgrounds",
            "type": "boolean",
            "description": "Include background colors and images in PDF output, so the PDF looks like the page on screen.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Number of pages rendered at the same time. More is faster but needs memory and CPU: the Actor also caps this at (memory MB minus 512) divided by 512. With the default 4096 MB, 3 is a good balance.",
            "default": 3
          },
          "debug": {
            "title": "Save debug data",
            "type": "boolean",
            "description": "Save the HTML of failed pages and traffic per host to the run's key-value store to help diagnose problems. Never added to the dataset. Leave off unless support asks for it.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}