{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot & PDF API: Full Page, Mobile, Cookie-Free",
    "description": "Returns a public file URL plus page title, HTTP status, size and timings for each screenshot (PNG, JPEG, WebP) or PDF of a URL, taken in Chrome on desktop, tablet or mobile. Full page or viewport, cookie banners rejected, ads blocked, element capture. $2 per 1,000 screenshots; failures are free.",
    "version": "1.0",
    "x-build-id": "nfuBiazOlFZV0EPaY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidewell~website-screenshot-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidewell-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/tidewell~website-screenshot-pdf/runs": {
      "post": {
        "operationId": "runs-sync-tidewell-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/tidewell~website-screenshot-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-tidewell-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 per line. 'https://' is added when missing. Duplicates are removed. Each URL is captured once per device below.",
            "items": {
              "type": "string"
            }
          },
          "devices": {
            "title": "Devices",
            "type": "array",
            "description": "Capture every URL on each selected device. Desktop 1920x1080, Laptop 1366x768, Tablet (iPad Air) 820x1180 @2x, Mobile (iPhone 15) 393x852 @2x, Android (Pixel 9) 412x915 @2x. 'Custom' uses the viewport width and height below. Each device is one charged capture.",
            "items": {
              "type": "string",
              "enum": [
                "desktop",
                "laptop",
                "tablet",
                "mobile",
                "android",
                "custom"
              ],
              "enumTitles": [
                "Desktop (1920x1080)",
                "Laptop (1366x768)",
                "Tablet (iPad, 820x1180 @2x)",
                "Mobile (iPhone, 393x852 @2x)",
                "Android (Pixel, 412x915 @2x)",
                "Custom (width x height below)"
              ]
            },
            "default": [
              "desktop"
            ]
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "PNG is lossless, JPEG and WebP are smaller (use Quality). PDF renders the page as a printable document (see the PDF section).",
            "default": "png"
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole scrollable page. Off captures only the visible viewport (above the fold).",
            "default": true
          },
          "quality": {
            "title": "Quality (JPEG / WebP)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1-100. Ignored for PNG and PDF.",
            "default": 80
          },
          "selector": {
            "title": "Element only (CSS selector)",
            "type": "string",
            "description": "Capture just the first visible element matching this selector, e.g. '#pricing' or 'main article'. The capture fails (free) if no element matches. Images only."
          },
          "html": {
            "title": "HTML to render",
            "type": "string",
            "description": "Optional raw HTML to render as an extra capture (HTML to image / HTML to PDF). Relative links won't resolve; use absolute URLs for images and CSS."
          },
          "viewportWidth": {
            "title": "Viewport width (px)",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "200-3840. Default for Custom: 1280."
          },
          "viewportHeight": {
            "title": "Viewport height (px)",
            "minimum": 200,
            "maximum": 4320,
            "type": "integer",
            "description": "200-4320. Default for Custom: 800. For full-page captures this only affects the layout, not the image height."
          },
          "deviceScaleFactor": {
            "title": "Device scale factor (retina)",
            "minimum": 0.5,
            "maximum": 4,
            "type": "number",
            "description": "Pixel density, 0.5-4. Leave empty for the device's own (desktop and laptop 1, tablet and phones 2). 3 matches a real iPhone. 2 gives a crisp retina image twice the width."
          },
          "maxHeight": {
            "title": "Maximum image height (px)",
            "minimum": 500,
            "maximum": 60000,
            "type": "integer",
            "description": "Full-page screenshots of endless pages are cut at this height (CSS pixels), with a warning in the row.",
            "default": 20000
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "networkidle",
              "domcontentloaded"
            ],
            "type": "string",
            "description": "'Load' suits most sites. 'Network idle' waits until no requests for 500 ms (best for SPAs and charts; capped at 20 s, then captured anyway). 'DOM ready' is fastest.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for selector",
            "type": "string",
            "description": "Wait until an element matching this CSS selector is visible, e.g. '.chart canvas'. If it never appears the capture fails and is not charged."
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Wait this long after everything else, just before the capture. Helps with animations and late widgets.",
            "default": 500
          },
          "scrollToLoadLazyContent": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "For full-page captures and PDFs, scroll through the page first so lazy-loaded images and sections appear.",
            "default": true
          },
          "navigationTimeoutSecs": {
            "title": "Navigation timeout (s)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time for the page to load. If the page is usable when it runs out, it is captured anyway with a warning.",
            "default": 45
          },
          "dismissCookieBanners": {
            "title": "Remove cookie banners",
            "type": "boolean",
            "description": "Best effort: clicks 'Reject all' / 'Only necessary' on 25+ consent platforms (OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics, Google, Sourcepoint, TrustArc...) and in 14 languages. Never clicks 'Accept all'. If there is no reject button, the banner is hidden instead.",
            "default": true
          },
          "hideSelectors": {
            "title": "Hide elements (CSS selectors)",
            "type": "array",
            "description": "Elements to remove before the capture, one selector per line, e.g. '#chat-widget', '.newsletter-popup'.",
            "items": {
              "type": "string"
            }
          },
          "blockAds": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Blocks requests to ~150 ad, analytics and tracking networks and collapses common ad slots. Faster captures, cleaner pages.",
            "default": false
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Emulate prefers-color-scheme: dark. Only sites that support dark mode change.",
            "default": false
          },
          "disableAnimations": {
            "title": "Freeze animations",
            "type": "boolean",
            "description": "Stop CSS animations and transitions and ask for reduced motion, so captures are consistent.",
            "default": true
          },
          "customCss": {
            "title": "Custom CSS",
            "type": "string",
            "description": "Injected into the page before the capture, e.g. 'header { position: static !important; }'."
          },
          "customJs": {
            "title": "Custom JavaScript",
            "type": "string",
            "description": "Runs in the page before the capture, as the body of an async function (await works). Example: document.querySelector('#tab-2').click(); await new Promise(r => setTimeout(r, 500));"
          },
          "userAgent": {
            "title": "User agent",
            "type": "string",
            "description": "Override the device's user agent. Leave empty for a normal Chrome (or iPhone / iPad / Android) user agent."
          },
          "pdfFormat": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "A5",
              "Tabloid",
              "single-page"
            ],
            "type": "string",
            "description": "'Single long page' puts the whole page on one tall page, exactly as it looks on screen (up to 200 inches).",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "Landscape",
            "type": "boolean",
            "description": "Landscape orientation.",
            "default": false
          },
          "pdfMargin": {
            "title": "Margin",
            "type": "string",
            "description": "Same margin on all sides, with a unit: px, mm, cm or in, e.g. '10mm' or '0.5in'. 0 for none.",
            "default": "10mm"
          },
          "pdfPrintBackground": {
            "title": "Print background",
            "type": "boolean",
            "description": "Include background colours and images (as on screen).",
            "default": true
          },
          "pdfMediaType": {
            "title": "CSS media",
            "enum": [
              "screen",
              "print"
            ],
            "type": "string",
            "description": "'Screen' renders the page as it looks in the browser. 'Print' uses the site's print stylesheet, if it has one.",
            "default": "screen"
          },
          "pdfScale": {
            "title": "Scale",
            "minimum": 0.1,
            "maximum": 2,
            "type": "number",
            "description": "Zoom of the rendered page, 0.1-2.",
            "default": 1
          },
          "captureErrorPages": {
            "title": "Capture error pages (HTTP 4xx/5xx)",
            "type": "boolean",
            "description": "By default a page that answers 404, 500, 403 etc. is reported as failed and not charged. Turn on to capture (and pay for) error pages too.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Pages in parallel",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "How many pages to capture at once. Also limited by memory (about 512 MB per page).",
            "default": 4
          },
          "maxRetries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries for timeouts, connection errors and HTTP 429/5xx. Retries are free.",
            "default": 1
          },
          "keyValueStoreName": {
            "title": "Save files to a named key-value store",
            "type": "string",
            "description": "Leave empty to use the run's own store. A named store (e.g. 'site-archive') keeps files beyond the data retention period and collects captures from many runs."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Use Apify Proxy to capture pages as seen from another country, or when a site blocks datacenter traffic.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}