{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot & URL to PDF API",
    "description": "Full page website screenshots and URL to PDF in bulk. Cookie banners removed automatically, lazy images loaded, sticky headers fixed. PNG, JPEG, WebP or PDF. Failed captures are free.",
    "version": "1.0",
    "x-build-id": "Ymb0gpkZWo4AO9qei"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/faisal_ahmed1931~website-screenshot-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-faisal_ahmed1931-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/faisal_ahmed1931~website-screenshot-pdf/runs": {
      "post": {
        "operationId": "runs-sync-faisal_ahmed1931-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/faisal_ahmed1931~website-screenshot-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-faisal_ahmed1931-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",
        "properties": {
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Pages to capture. One URL per line, or upload a text/CSV file. URLs without http(s):// get https:// added. Each URL becomes one dataset row with a link to the file. Required unless you use \"Raw HTML to render\".",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "PNG (lossless), JPEG or WebP (smaller files, use Quality), or PDF (URL to PDF).",
            "default": "png"
          },
          "fullPage": {
            "title": "Full page screenshot",
            "type": "boolean",
            "description": "Capture the whole scrollable page. Turn off to capture only the visible viewport (above the fold), sized by Device / Width / Height.",
            "default": true
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "desktop-hd",
              "desktop-retina",
              "laptop",
              "tablet",
              "tablet-landscape",
              "mobile",
              "mobile-android"
            ],
            "type": "string",
            "description": "Viewport preset. Mobile and tablet presets also send a mobile user agent and enable touch, so you get the real mobile layout.",
            "default": "desktop"
          },
          "width": {
            "title": "Viewport width (px)",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Overrides the device width. Leave empty to use the preset."
          },
          "height": {
            "title": "Viewport height (px)",
            "minimum": 200,
            "maximum": 4320,
            "type": "integer",
            "description": "Overrides the device height. With Full page OFF this is the exact image height (e.g. 630 for a social preview)."
          },
          "quality": {
            "title": "Quality (JPEG/WebP)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1–100. Ignored for PNG and PDF.",
            "default": 80
          },
          "cookieBanners": {
            "title": "Cookie banners & consent popups",
            "enum": [
              "reject",
              "accept",
              "hide",
              "off"
            ],
            "type": "string",
            "description": "How to deal with cookie/GDPR consent popups, using the open-source DuckDuckGo Autoconsent rules for 300+ consent platforms plus a fallback that hides leftovers. 'Accept' clicks 'Accept all' like a normal visitor, so the content is always visible (recommended). 'Reject' clicks 'Reject all' (privacy-first, but some news sites then show a 'subscribe or accept' wall instead of the article). 'Hide' only hides popups without clicking.",
            "default": "accept"
          },
          "scrollToBottom": {
            "title": "Load lazy content (scroll through page)",
            "type": "boolean",
            "description": "Scrolls down the page before capturing so lazy-loaded images and sections appear, then scrolls back to the top so sticky headers stay at the top.",
            "default": true
          },
          "closePopups": {
            "title": "Close newsletter & promo popups",
            "type": "boolean",
            "description": "Closes or hides modal popups (newsletter sign-ups, membership offers, 'subscribe' dialogs) and their dark backdrops.",
            "default": true
          },
          "blockAds": {
            "title": "Block ads & trackers",
            "type": "boolean",
            "description": "Blocks ads and tracking scripts (EasyList / EasyPrivacy via the open-source Ghostery engine). Cleaner screenshots and faster loads.",
            "default": false
          },
          "fixedElements": {
            "title": "Sticky headers & fixed elements",
            "enum": [
              "keep",
              "unstick",
              "hide"
            ],
            "type": "string",
            "description": "'Keep' captures the page as a visitor sees it from the top. 'Unstick' makes sticky headers/chat widgets scroll with the page so they appear only once. 'Hide' removes all fixed/sticky elements.",
            "default": "keep"
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Emulates prefers-color-scheme: dark (works on sites that support a dark theme).",
            "default": false
          },
          "maxHeight": {
            "title": "Max full-page height (px)",
            "minimum": 100,
            "maximum": 32000,
            "type": "integer",
            "description": "Full-page captures are cut at this height (CSS px) so endless/infinite-scroll pages don't produce giant files or time out. The dataset shows truncated=true when this happens.",
            "default": 16000
          },
          "selector": {
            "title": "Capture only this element (CSS selector)",
            "type": "string",
            "description": "E.g. `#pricing` or `main article`. Captures just that element. The run fails (free) for a URL where it is not found."
          },
          "thumbnailWidth": {
            "title": "Resize output to width (px)",
            "minimum": 50,
            "maximum": 3840,
            "type": "integer",
            "description": "Optional. Downscales the final image to this width keeping the aspect ratio (great for thumbnails / link previews)."
          },
          "deviceScaleFactor": {
            "title": "Device scale factor (pixel density)",
            "minimum": 0.5,
            "maximum": 4,
            "type": "number",
            "description": "Overrides the preset. 2 = retina-sharp images (4× pixels)."
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle",
              "commit"
            ],
            "type": "string",
            "description": "When navigation counts as done. 'Page load' stops early once the network has been quiet for a moment (max 10 s), so ad-heavy pages don't stall. 'Network idle' is applied softly (max 10 s).",
            "default": "load"
          },
          "delay": {
            "title": "Extra delay before capture (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Wait this long after the page is ready (animations, charts, sliders).",
            "default": 500
          },
          "waitForSelector": {
            "title": "Wait for element (CSS selector)",
            "type": "string",
            "description": "Wait until this element is visible before capturing, e.g. `.chart-loaded`. Best fix for pages that show a loading spinner."
          },
          "waitForSelectorTimeoutSecs": {
            "title": "Wait for element timeout (s)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "If the element doesn't appear in time, the URL is retried and then marked failed (free).",
            "default": 15
          },
          "scrollMaxSecs": {
            "title": "Max scrolling time (s)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Upper limit for lazy-load scrolling, so infinite-scroll pages can't run forever.",
            "default": 10
          },
          "hideSelectors": {
            "title": "Hide elements (CSS selectors)",
            "type": "array",
            "description": "Elements to hide before capture, e.g. chat widgets `#intercom-container`, promo bars `.announcement`.",
            "items": {
              "type": "string"
            }
          },
          "customCss": {
            "title": "Custom CSS",
            "type": "string",
            "description": "Injected into every page before capture."
          },
          "customJs": {
            "title": "Custom JavaScript",
            "type": "string",
            "description": "Runs in the page right before capture (async allowed), e.g. `document.querySelector('.tab-2').click(); await new Promise(r => setTimeout(r, 500));`"
          },
          "html": {
            "title": "Raw HTML to render (HTML to image / HTML to PDF)",
            "type": "string",
            "description": "Optional. Renders this HTML as an extra item (e.g. invoices, OG cards). Remote CSS/images referenced with absolute URLs are loaded."
          },
          "locale": {
            "title": "Browser language (locale)",
            "type": "string",
            "description": "E.g. en-US, de-DE, fr-FR. Affects Accept-Language and site localisation.",
            "default": "en-US"
          },
          "timezoneId": {
            "title": "Time zone",
            "type": "string",
            "description": "IANA time zone, e.g. Europe/Berlin."
          },
          "userAgent": {
            "title": "Custom user agent",
            "type": "string",
            "description": "Leave empty to use a current Chrome user agent (or the device's mobile one)."
          },
          "pdfFormat": {
            "title": "PDF page size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "A5",
              "Tabloid"
            ],
            "type": "string",
            "description": "Only for PDF output.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "Landscape",
            "type": "boolean",
            "description": "Only for PDF output.",
            "default": false
          },
          "pdfMargin": {
            "title": "Margins",
            "type": "string",
            "description": "CSS length for all four margins, e.g. 0, 10mm, 0.5in, 20px.",
            "default": "10mm"
          },
          "pdfPrintBackground": {
            "title": "Print backgrounds",
            "type": "boolean",
            "description": "Include background colours and images.",
            "default": true
          },
          "pdfMediaType": {
            "title": "CSS media",
            "enum": [
              "screen",
              "print"
            ],
            "type": "string",
            "description": "Screen gives a PDF that looks like the live site.",
            "default": "screen"
          },
          "pdfSinglePage": {
            "title": "Single long page",
            "type": "boolean",
            "description": "Put the whole website on one tall PDF page instead of splitting it into A4/Letter pages.",
            "default": false
          },
          "captureErrorPages": {
            "title": "Capture error pages (HTTP 4xx/5xx)",
            "type": "boolean",
            "description": "By default 404/500 pages are treated as failures and not charged. Turn on to capture (and pay for) them anyway.",
            "default": false
          },
          "navigationTimeoutSecs": {
            "title": "Page load timeout (s)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Max time for the page to load per attempt.",
            "default": 45
          },
          "maxRetries": {
            "title": "Retries per URL",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Failed attempts are retried automatically. You are never charged for failures.",
            "default": 2
          },
          "maxConcurrency": {
            "title": "Max parallel pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Upper limit for parallel pages. The Actor also caps it by run memory (about 650 MB per full-page/PDF page, 420 MB per viewport page), so give the run more memory for big batches.",
            "default": 5
          },
          "throttleAnimations": {
            "title": "Low-CPU animation mode",
            "type": "boolean",
            "description": "Draws JavaScript/WebGL animations at ~5 fps instead of 60 while the page loads. The captured image looks the same, but heavy animated pages (3D, canvas, gradients) capture much faster. Turn off only if a page's JS animation must run at full speed before capture.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Use Apify Proxy (residential helps on sites that block data centers) or your own proxies.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}