{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API: Full Page, PDF & Mobile",
    "description": "Capture any URL as PNG, JPEG, WebP or PDF: viewport, full page or one element. Desktop, laptop, tablet, iPhone & Android presets, dark mode, cookie banner & ad hiding. Pay only per successful screenshot.",
    "version": "1.0",
    "x-build-id": "M1aE3P2XzYoRCmphz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parth-tools~website-screenshot-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parth-tools-website-screenshot-api",
        "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/parth-tools~website-screenshot-api/runs": {
      "post": {
        "operationId": "runs-sync-parth-tools-website-screenshot-api",
        "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/parth-tools~website-screenshot-api/run-sync": {
      "post": {
        "operationId": "run-sync-parth-tools-website-screenshot-api",
        "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 to capture",
            "type": "array",
            "description": "One web page per line. <code>https://</code> is added when missing (e.g. <code>example.com</code>). Each URL becomes one file in the run's key-value store and one row in the dataset. URLs that fail, time out or are blocked produce a free error row.",
            "items": {
              "type": "string"
            }
          },
          "format": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "<b>PNG</b> – lossless, best for UI and text. <b>JPEG</b> – smaller files for photos (see <i>Quality</i>). <b>WebP</b> – smallest files, modern browsers (max 16,383 px per side). <b>PDF</b> – printable document of the whole page (always billed as a full-page capture).",
            "default": "png"
          },
          "mode": {
            "title": "Capture mode",
            "enum": [
              "viewport",
              "fullPage",
              "element"
            ],
            "type": "string",
            "description": "<b>Viewport</b> – what is visible on screen (e.g. 1920×1080 above the fold). <b>Full page</b> – the whole scrollable page, top to bottom (lazy-loaded images are triggered by scrolling first). <b>Element</b> – only the first element matching the <i>CSS selector</i> below. Ignored for PDF.",
            "default": "viewport"
          },
          "selector": {
            "title": "CSS selector (element mode)",
            "type": "string",
            "description": "Used only in <i>Element</i> mode: the first visible element matching this selector is captured, e.g. <code>header</code>, <code>#pricing</code>, <code>.product-card</code>, <code>main article</code>. If nothing matches within 10 s, you get a free error row."
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "laptop",
              "tablet",
              "iphone",
              "android",
              "custom"
            ],
            "type": "string",
            "description": "Screen size, pixel density, user agent and touch/mobile emulation.<ul><li><b>Desktop</b> 1920×1080</li><li><b>Laptop</b> 1440×900</li><li><b>Tablet</b> iPad 810×1080 @2x</li><li><b>iPhone</b> iPhone 15, 393×659 @3x</li><li><b>Android</b> Pixel 7, 412×839 @2.6x</li><li><b>Custom</b> 1280×800 unless you set width/height below</li></ul>",
            "default": "desktop"
          },
          "viewportWidth": {
            "title": "Custom width (px)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Overrides the device's viewport width. <code>0</code> = use the device preset. Max 7680.",
            "default": 0
          },
          "viewportHeight": {
            "title": "Custom height (px)",
            "minimum": 0,
            "maximum": 4320,
            "type": "integer",
            "description": "Overrides the device's viewport height (the visible area; full-page captures still grow to the page's height). <code>0</code> = use the device preset. Max 4320.",
            "default": 0
          },
          "deviceScaleFactor": {
            "title": "Pixel density (retina)",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Device pixel ratio: <code>2</code> gives a sharp retina image twice the width/height in pixels. <code>0</code> = device preset (desktop/laptop 1, tablet 2, iPhone 3, Android 2.625). Max 3.",
            "default": 0
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Emulate <code>prefers-color-scheme: dark</code>. Sites that support a dark theme render it; others look unchanged.",
            "default": false
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hide consent pop-ups from 35+ common consent tools (OneTrust, Cookiebot, Usercentrics, Quantcast, Didomi, TrustArc, Sourcepoint, Iubenda, CookieYes, Osano, HubSpot…) and generic cookie bars, and unlock page scrolling. Banners are hidden with CSS, never accepted or declined.",
            "default": true
          },
          "hideSelectors": {
            "title": "Extra elements to hide (CSS selectors)",
            "type": "array",
            "description": "Your own CSS selectors to hide before capturing, one per line, e.g. a chat widget <code>#intercom-container</code>, a newsletter modal <code>.newsletter-popup</code>, or a sticky header <code>header.sticky</code>.",
            "items": {
              "type": "string"
            }
          },
          "blockAdsAndTrackers": {
            "title": "Block ads & trackers",
            "type": "boolean",
            "description": "Block requests to ~100 ad, analytics and tracking networks (Google Ads/Analytics/Tag Manager, Meta pixel, Taboola, Outbrain, Criteo, Hotjar…) and hide common ad slots. On by default: ad-heavy pages load up to 5× faster and look cleaner. Turn off if you need to capture the ads themselves (ad verification, compliance archives) or if a site breaks without its scripts.",
            "default": true
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "networkidle",
              "domcontentloaded"
            ],
            "type": "string",
            "description": "When the page counts as loaded. <b>load</b>: the window load event, waited for up to 15 s after the HTML arrives (good default). <b>networkidle</b>: also wait until there have been no network requests for 0.5 s (best for single-page apps and dashboards; capped at 15 s and never fails the capture). <b>domcontentloaded</b>: the HTML is parsed (fastest).",
            "default": "load"
          },
          "delayMs": {
            "title": "Extra delay before capture (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Wait this many milliseconds after the page loaded, e.g. for animations, carousels or charts. Max 60,000.",
            "default": 0
          },
          "scrollToLoadLazyContent": {
            "title": "Scroll to load lazy images (full page)",
            "type": "boolean",
            "description": "In full-page mode, scroll through the page first so lazy-loaded images and sections render, then scroll back to the top.",
            "default": true
          },
          "timeoutSecs": {
            "title": "Page load timeout (seconds)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time for the page's HTML to arrive. After that, the Actor waits up to 15 s more for the <code>load</code> event (slow ad or analytics scripts can't hold the capture up) and then captures the page as rendered. If the HTML never arrives, you get a free error row.",
            "default": 30
          },
          "quality": {
            "title": "JPEG / WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality for JPEG and WebP (1–100). Lower = smaller files. Ignored for PNG and PDF.",
            "default": 80
          },
          "maxFullPageHeight": {
            "title": "Max full-page height (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Cut extremely long pages (infinite feeds) at this height in CSS pixels. <code>0</code> = no limit. Each image is also capped at ~36 megapixels for reliability (≈18,000 px tall at 1920 px wide, ≈10,000 CSS px on iPhone 3×), and WebP at 16,383 px per side. The output's <code>truncated</code> field tells you when this happened.",
            "default": 15000
          },
          "pdfPageFormat": {
            "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 orientation for PDF output.",
            "default": false
          },
          "pdfMedia": {
            "title": "PDF CSS media",
            "enum": [
              "screen",
              "print"
            ],
            "type": "string",
            "description": "<b>screen</b> – the PDF looks like the website on screen (default). <b>print</b> – use the site's print stylesheet (often hides navigation and ads).",
            "default": "screen"
          },
          "maxConcurrency": {
            "title": "Parallel captures",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "How many pages are captured at the same time in one shared browser. <code>0</code> = automatic: one per GB of run memory (2 at the default 2048 MB). Higher values on low memory make heavy pages time out or crash; raise memory together with this setting. Max 8.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "No proxy is used by default. Turn on Apify Proxy (billed to your account as proxy usage) or add your own proxy URLs to capture geo-specific versions of pages. A proxy does not bypass bot protection or CAPTCHAs.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}