{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API: Full Page, PNG & PDF",
    "description": "Capture any public web page as a screenshot or PDF in a real browser: visible area or full page, PNG, JPEG or WebP, up to 3840 px wide, retina, dark mode, cookie banners hidden, Chinese, Japanese and emoji text rendered. You pay only for files you receive; failed pages are free.",
    "version": "0.1",
    "x-build-id": "CTb3bWUtQETanyIun"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fetchgrove~website-screenshot/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fetchgrove-website-screenshot",
        "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/fetchgrove~website-screenshot/runs": {
      "post": {
        "operationId": "runs-sync-fetchgrove-website-screenshot",
        "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/fetchgrove~website-screenshot/run-sync": {
      "post": {
        "operationId": "run-sync-fetchgrove-website-screenshot",
        "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": "Public web pages to capture, one per line. A missing https:// is added for you. Addresses with a user name or password (\"name:password@\") are refused: logging in is not supported. Only the pages listed are opened; links are never followed. Each site's robots.txt is respected: a page it closes to automated visitors (or a redirect to one) gets an error row and is not charged. To render your own HTML instead, leave this list empty and use \"HTML documents\" below (one run takes URLs or HTML, not both). If both are empty, the run captures https://example.com.",
            "items": {
              "type": "string"
            }
          },
          "output": {
            "title": "What to capture",
            "enum": [
              "viewport",
              "fullPage",
              "pdf"
            ],
            "type": "string",
            "description": "Visible area: what fits in the window size below. Full page: the whole scrollable page, up to 16,383 pixels tall; a page so long or heavy that its screenshot cannot be drawn within 60 seconds gets an error row and is not charged. PDF: web pages print on pages the size of the window, HTML documents on A4; choose a paper size, orientation and margins under \"PDF pages\".",
            "default": "viewport"
          },
          "format": {
            "title": "Image format",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ],
            "type": "string",
            "description": "File format for screenshots. Ignored for PDF.",
            "default": "png"
          },
          "width": {
            "title": "Window width",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Width of the browser window in CSS pixels (320 to 3840).",
            "default": 1280
          },
          "height": {
            "title": "Window height",
            "minimum": 320,
            "maximum": 2160,
            "type": "integer",
            "description": "Height of the browser window in CSS pixels (320 to 2160).",
            "default": 800
          },
          "deviceScaleFactor": {
            "title": "Pixel density",
            "minimum": 1,
            "maximum": 3,
            "type": "number",
            "description": "Image pixels per CSS pixel (1 to 3). Use 2 for sharp, retina-style screenshots; the image is then twice as wide and tall.",
            "default": 1
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "iphone-15",
              "pixel-8",
              "ipad"
            ],
            "type": "string",
            "description": "Capture the page as a phone or tablet shows it: that device's screen size, pixel density, mobile layout, touch input and browser identity. A device replaces the window width, height and pixel density above. iPhone 15: 393 x 659 at 3x. Pixel 8: 412 x 839 at 2.625x. iPad: 834 x 1194 at 2x (iPad Pro 11 inch, portrait).",
            "default": "desktop"
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "When the page counts as loaded. Page loaded: all images and styles are in. Page ready: the HTML is ready, images may still be loading. Network quiet: no requests for half a second, best for pages that load content after they open. Each page gets 45 seconds; a page whose HTML is in but that never finishes loading (an image or request that never arrives) is captured as it is when the time is up, and its row says so. A page still busy well past its time (the 45 seconds, the waits and extra wait you set and, for full pages, elements, areas and PDFs, the scroll and drawing time, added up, plus 30 seconds; never more than 3 minutes) is stopped, for example when a script on it never stops: error row, not charged.",
            "default": "load"
          },
          "delayMs": {
            "title": "Extra wait",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Extra time to wait after loading, before capturing (0 to 10,000 ms). Helps with animations and late content.",
            "default": 0
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Web pages only: hide common cookie consent banners before capturing. Banners are only hidden, never accepted; a page a banner locked from scrolling is unlocked for full-page, PDF, element and area captures. HTML documents are captured as written.",
            "default": true
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Ask the page for its dark colour scheme, on sites that have one.",
            "default": false
          },
          "html": {
            "title": "HTML documents",
            "description": "One HTML document as text, or a list of documents (each item is one complete document). From the API, send a string or a list of strings; in this form, write it as JSON, for example [\"<h1>Invoice 1001</h1>\"]. Scripts in the document run, so charts and templates drawn by script work (use \"Wait for element\" or \"Extra wait\" if they need time). Up to 50 documents per run and 5 MB each; an empty or oversized document gets an error row and is not charged. Anything in this field makes the run an HTML run, even blank text (one error row, not charged); leave it out to capture web pages. Leave \"URLs\" empty: one run takes URLs or HTML, not both. Each document gets 45 seconds to load, including waits; one still busy well past its time (at most 3 minutes) is stopped and not charged. Everything the document loads is fetched from the public internet only: private and local network addresses are blocked, and frames are checked against their site's robots.txt. Your HTML is never written to the run log; it is stored only in the run's own storage, and kept as a file only if you turn on \"Save page HTML\"."
          },
          "baseUrl": {
            "title": "Base URL for relative links",
            "type": "string",
            "description": "Where relative addresses in the HTML point, such as https://example.com/assets/. Images, styles and fonts written as logo.png or /css/invoice.css are then loaded from there. Leave empty when the HTML uses only full addresses or embedded images. A document with its own <base href> keeps it. No user name or password in it. HTML documents only."
          },
          "css": {
            "title": "Extra CSS",
            "type": "string",
            "description": "A stylesheet added to every HTML document after its own styles, before it is captured, such as body { font-family: Georgia, serif } or .draft-stamp { display: none }. HTML documents only (for web pages, use \"Hide elements\")."
          },
          "pdfFormat": {
            "title": "Paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "A5"
            ],
            "type": "string",
            "description": "Paper size for PDFs. Empty: HTML documents print on A4 (or the size the document sets with a CSS @page rule) with their print styles, as a browser's Save as PDF does; web pages print on pages the size of the window and look as they do on screen. Choosing a size here prints either on that paper."
          },
          "pdfLandscape": {
            "title": "Landscape",
            "type": "boolean",
            "description": "Turn the paper sideways. For PDFs on paper: every HTML document, and web pages when a paper size is chosen above (pages the size of the window follow the window instead).",
            "default": false
          },
          "pdfMargin": {
            "title": "Page margins",
            "type": "string",
            "description": "PDF page margins, written like a CSS margin: one to four lengths in mm, cm, in or px. 10mm: all sides. 15mm 10mm: top and bottom, then left and right. 1in 0.5in 1in 0.5in: top, right, bottom, left. At least 1 inch of the page must be left between them. Empty: no margin. A document that sets its own margins with a CSS @page rule keeps them."
          },
          "printBackground": {
            "title": "Print backgrounds",
            "type": "boolean",
            "description": "Include background colours and images in PDFs. Turn off for a lighter, printer-friendly file.",
            "default": true
          },
          "selector": {
            "title": "Capture one element",
            "type": "string",
            "description": "CSS selector, such as #pricing or main h1. Only the first matching element is captured, all of it, even when it is taller than the window. It is waited for for up to 45 seconds after the page loads; if it does not appear, or it is inside an element you hide below, that URL gets an error row and is not charged. Pseudo-elements such as ::before cannot be captured. Charged as a visible-area screenshot when the captured element is at most one window high (the window height above, or the device's); a taller element is charged as a full-page screenshot. Works with screenshots, not PDF."
          },
          "clip": {
            "title": "Capture one area",
            "type": "object",
            "description": "An area of the page in CSS pixels, measured from the top-left corner of the page (not the window): {\"x\": 0, \"y\": 0, \"width\": 800, \"height\": 600}. x and y from 0 to 100,000, width from 1 to 3,840, height from 1 to 16,383; at pixel density above 1 the image must also stay within 16,383 pixels tall and 64 million pixels. Any part beyond the edge of the page is left out (the row then says truncated); an area that starts outside the page gives an error row and is not charged. Charged as a visible-area screenshot when the captured part is at most one window high (the window height above, or the device's); a taller area is charged as a full-page screenshot. Not with \"Capture one element\", not with PDF."
          },
          "hideSelectors": {
            "title": "Hide elements",
            "type": "array",
            "description": "CSS selectors of elements to hide before capturing, one per line, such as chat buttons, ads or a newsletter popup. Hidden elements keep their space, so nothing else moves, and everything inside them is hidden too. Up to 50.",
            "items": {
              "type": "string"
            }
          },
          "waitForSelector": {
            "title": "Wait for element",
            "type": "string",
            "description": "CSS selector to wait for after the page loads: the capture starts once a matching element is visible. Waits up to 45 seconds; if it never appears, that URL gets an error row and is not charged. Pseudo-elements such as ::before cannot be waited for. The extra wait above runs after this."
          },
          "fixStickyHeaders": {
            "title": "Unstick headers on full pages",
            "type": "boolean",
            "description": "For full-page screenshots and PDFs: headers, bars and buttons that stay on screen while you scroll are put back in their place in the page, so they appear once instead of covering content or repeating on every PDF page. Elements you hide, and ones nobody can see, are left alone. The page layout can shift slightly where they were.",
            "default": false
          },
          "includeEvidence": {
            "title": "Evidence record",
            "type": "boolean",
            "description": "Add an evidence record to each saved screenshot or PDF: the SHA-256 hash of the file, the capture time (UTC), the browser identity, the window size and the page title; for a web page also the requested and final URL, every redirect with its status code and the page's response headers (cookies left out); for an HTML document the SHA-256 hash of the HTML as you sent it and the base URL. No extra charge.",
            "default": false
          },
          "saveHtml": {
            "title": "Save page HTML",
            "type": "boolean",
            "description": "With the evidence record on: also save the HTML next to the screenshot, linked from the record. For a web page, the HTML as the browser received it, decoded (compression removed, so not byte for byte what the server sent), with its own SHA-256 hash; a JSON page is saved as .json. For an HTML document, the document exactly as you sent it. Saved only in the run's own storage. No extra charge.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}