{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot & URL to PDF",
    "description": "Full-page screenshots (PNG, JPEG, WebP) or PDFs of any list of URLs. Desktop, laptop, tablet and mobile views. Cookie banners and chat widgets hidden, lazy images loaded. Failed URLs and blank pages are free.",
    "version": "0.2",
    "x-build-id": "dT2Ih7BV2lKypq4Hx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hpbt~website-screenshot-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hpbt-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/hpbt~website-screenshot-pdf/runs": {
      "post": {
        "operationId": "runs-sync-hpbt-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/hpbt~website-screenshot-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-hpbt-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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Pages to capture, one per line. \"example.com\" works too, https:// is added for you.",
            "items": {
              "type": "string"
            }
          },
          "format": {
            "title": "Format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "PNG is lossless. JPEG and WebP files are several times smaller. PDF gives a printable document with selectable text.",
            "default": "png"
          },
          "devices": {
            "title": "Devices",
            "type": "array",
            "description": "Each URL is captured once per device. Custom uses the viewport width and height under Image options.",
            "items": {
              "type": "string",
              "enum": [
                "desktop",
                "laptop",
                "tablet",
                "mobile",
                "custom"
              ],
              "enumTitles": [
                "Desktop (1920×1080)",
                "Laptop (1440×900)",
                "Tablet (820×1180)",
                "Mobile (393×852)",
                "Custom size"
              ]
            },
            "default": [
              "desktop"
            ]
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole page from top to bottom. Turn off to capture only the first screen.",
            "default": true
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hide cookie and consent pop-ups (OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics, CookieYes and many more), including the dark overlay behind them.",
            "default": true
          },
          "hideChatWidgets": {
            "title": "Hide chat widgets",
            "type": "boolean",
            "description": "Hide floating chat buttons and windows (Intercom, Drift, HubSpot, Zendesk, Crisp, Tidio, LiveChat and others).",
            "default": true
          },
          "hideSelectors": {
            "title": "Also hide these elements",
            "type": "array",
            "description": "CSS selectors of anything else to hide, for example .newsletter-popup or #promo-bar.",
            "items": {
              "type": "string"
            }
          },
          "customCss": {
            "title": "Custom CSS",
            "type": "string",
            "description": "CSS added to every page before it is captured."
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "When the page counts as ready. A page that has not finished loading after 15 seconds is captured anyway.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for element",
            "type": "string",
            "description": "Optional CSS selector to wait for before capturing, for example #chart canvas."
          },
          "delaySecs": {
            "title": "Extra delay",
            "minimum": 0,
            "maximum": 60,
            "type": "number",
            "description": "Seconds to wait after the page is ready, for animations or slow widgets.",
            "default": 0
          },
          "scrollPage": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "Scroll through the page before a full-page, element or PDF capture, so images that load on scroll appear.",
            "default": true
          },
          "colorScheme": {
            "title": "Color scheme",
            "enum": [
              "light",
              "dark"
            ],
            "type": "string",
            "description": "Dark works on sites that support dark mode.",
            "default": "light"
          },
          "locale": {
            "title": "Browser language",
            "type": "string",
            "description": "Locale code such as en-US, de-DE or vi-VN. Sites that adapt to the visitor's language use it.",
            "default": "en-US"
          },
          "timeoutSecs": {
            "title": "Time limit per page",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum time for one URL, from opening it to saving the file.",
            "default": 60
          },
          "selector": {
            "title": "Capture only this element",
            "type": "string",
            "description": "Optional CSS selector, for example #pricing or main. The first visible match is captured. Images only."
          },
          "viewportWidth": {
            "title": "Custom width",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Viewport width for the Custom device.",
            "default": 1280
          },
          "viewportHeight": {
            "title": "Custom height",
            "minimum": 200,
            "maximum": 4320,
            "type": "integer",
            "description": "Viewport height for the Custom device. It also sets the image height when Full page is off.",
            "default": 800
          },
          "deviceScaleFactor": {
            "title": "Pixel density",
            "minimum": 1,
            "maximum": 3,
            "type": "number",
            "description": "1 is standard, 2 is retina: sharper, with files about 4 times larger. Leave empty for 1 on desktop and laptop, 2 on tablet and mobile."
          },
          "maxHeight": {
            "title": "Maximum page height",
            "minimum": 500,
            "maximum": 16384,
            "type": "integer",
            "description": "Full-page captures are cut at this height, so endless pages don't make huge files. Images are at most 16,384 pixels tall (above that, browsers repeat the top of the page). A long page that would be taller at 2× pixel density is captured at 1× so the whole height still fits.",
            "default": 15000
          },
          "quality": {
            "title": "Image quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "For JPEG and WebP. Higher is sharper and larger.",
            "default": 80
          },
          "pdfFormat": {
            "title": "Paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "Tabloid"
            ],
            "type": "string",
            "description": "Pages are laid out for this paper width, as when printing in Chrome.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "Landscape",
            "type": "boolean",
            "description": "Wide pages instead of tall ones.",
            "default": false
          },
          "pdfPrintBackground": {
            "title": "Print backgrounds",
            "type": "boolean",
            "description": "Keep background colors and images, as on screen.",
            "default": true
          },
          "pdfMedia": {
            "title": "Page style",
            "enum": [
              "screen",
              "print"
            ],
            "type": "string",
            "description": "\"As on screen\" keeps the normal look. \"Print\" uses the site's print style, if it has one.",
            "default": "screen"
          },
          "pdfMarginMm": {
            "title": "Margins",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Blank border on every side of each PDF page.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Pages at the same time",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages to capture in parallel. The Actor slows down by itself when memory runs low.",
            "default": 5
          },
          "maxRetries": {
            "title": "Retries per URL",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many more times to try a URL after a server error. A URL that runs out of time is tried once more at most.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional, for sites that show different content per country. Automatic and datacenter Apify Proxy or your own proxy URLs work. Residential and SERP proxies are not supported.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}