{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API (Full Page, Mobile, PDF)",
    "description": "Website screenshot API: capture screenshots or PDFs of up to 5,000 web pages or your own HTML per run. Each row gives a public image link, final URL, HTTP status, title and file size. Full page, one element, 11 device presets, dark mode. Failed pages free. $0.89 per 1,000 screenshots.",
    "version": "0.2",
    "x-build-id": "N6sDLT4W2habAqgyH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/locaihost~screenshot/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-locaihost-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/locaihost~screenshot/runs": {
      "post": {
        "operationId": "runs-sync-locaihost-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/locaihost~screenshot/run-sync": {
      "post": {
        "operationId": "run-sync-locaihost-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": "Page URLs",
            "type": "array",
            "description": "One web page per line, up to 5,000 per run. Bare domains like example.com get https:// added. Duplicates are removed; invalid entries are listed in the output with an error and never charged. Leave empty if you only want to render HTML below. (API callers can also send a single \"url\".)",
            "items": {
              "type": "string"
            }
          },
          "html": {
            "title": "HTML to render (instead of, or as well as, URLs)",
            "type": "string",
            "description": "Optional. Paste a full HTML document (inline CSS, images by absolute URL or data URI) and get it back as an image or PDF, e.g. for social cards, invoices or email previews. Max 5,000,000 characters. For several documents, use HTML documents below."
          },
          "htmlDocuments": {
            "title": "HTML documents (several)",
            "type": "array",
            "description": "Optional list of up to 100 HTML documents, one image or PDF each, rendered after the URLs and the HTML field above. Example: [\"<h1>One</h1>\", \"<h1>Two</h1>\"]."
          },
          "format": {
            "title": "Format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "PNG is lossless and sharp. JPEG and WebP are much smaller (set Quality below). PDF prints the page as a searchable, selectable document.",
            "default": "png"
          },
          "fullPage": {
            "title": "Full page ($)",
            "type": "boolean",
            "description": "Capture the whole scrollable page instead of just the first screen. Very tall pages stop at Max height. Full-page captures of web pages are charged as a full-page screenshot ($2.00 per 1,000 instead of $0.89), because they take about twice the computing. Element, region, HTML and PDF captures stay at $0.89.",
            "default": false
          },
          "viewport": {
            "title": "Device / viewport",
            "enum": [
              "desktop",
              "desktop_hd",
              "laptop",
              "macbook",
              "mobile",
              "iphone_se",
              "iphone_pro_max",
              "pixel",
              "galaxy",
              "tablet",
              "ipad_pro",
              "social_square",
              "social_portrait",
              "og_image",
              "custom"
            ],
            "type": "string",
            "description": "Desktop and laptop sizes, or a real phone or tablet: its screen size, pixel density, touch and mobile user agent, so sites serve their phone layout. Social sizes give an image exactly the size people post (keep Full page off). Custom uses the width and height below. API callers can also send \"device\" with names like iphone_15, pixel_7, galaxy_s23 or ipad.",
            "default": "desktop"
          },
          "selector": {
            "title": "Capture only this element (CSS selector)",
            "type": "string",
            "description": "Optional. Screenshot just the first element matching this selector, e.g. #pricing, main, .hero. If it isn't on the page, that URL gets an error and is not charged."
          },
          "clip": {
            "title": "Capture only this region",
            "type": "object",
            "description": "Optional rectangle in CSS pixels from the page's top-left: {\"x\": 0, \"y\": 0, \"width\": 1200, \"height\": 630}. It can reach below the first screen. Ignored when an element selector is set."
          },
          "viewportWidth": {
            "title": "Custom width (px)",
            "minimum": 240,
            "maximum": 3840,
            "type": "integer",
            "description": "Used only when Device is Custom. 240–3840.",
            "default": 1440
          },
          "viewportHeight": {
            "title": "Custom height (px)",
            "minimum": 240,
            "maximum": 8000,
            "type": "integer",
            "description": "Used only when Device is Custom. 240–8000. With Full page on, this is just the window height; the image grows to the page.",
            "default": 900
          },
          "deviceScaleFactor": {
            "title": "Device scale factor",
            "minimum": 0,
            "maximum": 3,
            "type": "number",
            "description": "Pixel density: 2 gives retina-sharp images at twice the width and height. 0 = the device's own (1 for desktop/laptop, 2 tablet, 3 mobile). Max 3.",
            "default": 0
          },
          "isMobile": {
            "title": "Mobile emulation (custom size)",
            "type": "boolean",
            "description": "Custom size only: behave like a phone at the width and height above (touch, mobile viewport and a phone user agent), so sites serve their phone layout. Device presets already set this."
          },
          "hasTouch": {
            "title": "Touch screen (custom size)",
            "type": "boolean",
            "description": "Custom size only: turn touch events on or off. Device presets already set this."
          },
          "maxHeight": {
            "title": "Max height (px)",
            "minimum": 200,
            "maximum": 30000,
            "type": "integer",
            "description": "Full-page captures stop at this many CSS pixels (and never beyond the 16,383-pixel image limit, divided by the scale factor). Taller pages are cut and marked truncated.",
            "default": 16000
          },
          "keepStickyElements": {
            "title": "Keep sticky headers as they are",
            "type": "boolean",
            "description": "Full page only. By default, headers, chat buttons and other bars that stay on screen while you scroll are shown once, where they sit on the first screen, instead of repeating or landing further down the image. Turn this on to capture them exactly as the page positions them.",
            "default": false
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Close or hide consent banners from ~30 known consent platforms (OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics, TrustArc and more), preferring 'reject'. Buttons on unknown banners are never clicked.",
            "default": true
          },
          "blockAds": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Block requests to common ad, analytics and tracking domains (on by default). Cleaner, faster captures; turn off if you need the page exactly as visitors see it, ads included.",
            "default": true
          },
          "hideSelectors": {
            "title": "Also hide these elements",
            "type": "array",
            "description": "Optional CSS selectors to hide before capturing, e.g. a chat widget (#intercom-container) or a promo bar (.announcement-bar).",
            "items": {
              "type": "string"
            }
          },
          "blurSelectors": {
            "title": "Blur these elements",
            "type": "array",
            "description": "Optional CSS selectors to blur in place (layout unchanged), e.g. to redact emails, prices or account numbers in shared screenshots.",
            "items": {
              "type": "string"
            }
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Ask the page for its dark theme (prefers-color-scheme: dark). Sites without a dark theme look the same.",
            "default": false
          },
          "blockImages": {
            "title": "Block images",
            "type": "boolean",
            "description": "Don't load images. Faster, lighter captures of text and layout.",
            "default": false
          },
          "blockMedia": {
            "title": "Block video and audio",
            "type": "boolean",
            "description": "Don't load video and audio files. Saves time on pages with autoplay video.",
            "default": false
          },
          "customCss": {
            "title": "Custom CSS",
            "type": "string",
            "description": "Optional CSS injected before capturing, e.g. body { font-size: 18px }. Max 20,000 characters."
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "networkidle",
              "load",
              "domcontentloaded"
            ],
            "type": "string",
            "description": "When the page counts as loaded. Load is the default and suits most sites. Network idle also waits (up to 3 s) for late requests to finish; DOM ready is fastest. Pages that never settle are still captured when the timeout runs out.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for this element",
            "type": "string",
            "description": "Optional CSS selector. Capture only once it is visible, e.g. #app .loaded or .chart canvas. Useful for single-page apps. If it never appears within the timeout, that page gets an error and is not charged."
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Wait this long after loading, before capturing. Useful for animations, charts and slow widgets. 0–60000.",
            "default": 0
          },
          "timeoutSecs": {
            "title": "Page timeout (seconds)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Give up on a page that hasn't started loading within this time. Timeouts are retried once. 5–180.",
            "default": 45
          },
          "scrollToLoad": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "Scroll through the page before a full-page or element capture so lazy-loaded images and sections appear.",
            "default": true
          },
          "reduceMotion": {
            "title": "Reduce motion",
            "type": "boolean",
            "description": "Ask pages to skip animations (prefers-reduced-motion), the way a visitor with that accessibility setting sees them. Faster and steadier captures; turn off to capture animated sites mid-motion.",
            "default": true
          },
          "webgl": {
            "title": "Render WebGL (3D and some maps)",
            "type": "boolean",
            "description": "Turn on for pages built on WebGL: 3D scenes, some maps and charts. Off by default because software WebGL is slow; most sites show a normal fallback without it.",
            "default": false
          },
          "quality": {
            "title": "Quality (JPEG / WebP)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1–100. Higher is sharper and bigger. Ignored for PNG and PDF.",
            "default": 80
          },
          "transparentBackground": {
            "title": "Transparent background",
            "type": "boolean",
            "description": "Pages without their own background colour come out transparent instead of white. PNG and WebP only.",
            "default": false
          },
          "pdfPageSize": {
            "title": "PDF page size",
            "enum": [
              "A4",
              "Letter",
              "A3",
              "Legal"
            ],
            "type": "string",
            "description": "Paper size when Format is PDF.",
            "default": "A4"
          },
          "locale": {
            "title": "Browser language",
            "type": "string",
            "description": "Optional, e.g. en-GB, de-DE, ja-JP. Sets the browser's language, so sites that follow it show that version. Default en-US."
          },
          "timezone": {
            "title": "Time zone",
            "type": "string",
            "description": "Optional IANA name, e.g. Europe/London or America/New_York. Changes the times and dates pages show."
          },
          "userAgent": {
            "title": "Custom user agent",
            "type": "string",
            "description": "Optional. Replaces the browser's (or the device preset's) User-Agent string."
          },
          "cookies": {
            "title": "Cookies (your own sites and sessions only)",
            "type": "array",
            "description": "Optional. For your own sites and sessions only, such as a staging site or a dashboard you are signed in to. A list like [{\"name\": \"session\", \"value\": \"…\", \"domain\": \"app.example.com\", \"path\": \"/\"}]. Without a domain, a cookie goes to each page's own host. Kept in memory for this run only, never logged, and removed from every message."
          },
          "headers": {
            "title": "Extra request headers (your own sites only)",
            "type": "object",
            "description": "Optional. For your own sites and sessions only. An object like {\"Authorization\": \"Bearer …\"}, sent only to each page's own site (its host and subdomains), never to other sites the page loads from. Kept in memory for this run only, never logged, and removed from every message."
          },
          "proxyUrl": {
            "title": "Proxy URL (your own proxy)",
            "type": "string",
            "description": "Optional. Your own proxy, as http://username:password@host:port (https and socks5 work too; SOCKS5 without a password only). Every page of the run opens through it, for example to see a page as visitors in another country do, or to reach a site that only allows your addresses. Kept in memory for this run only, never logged, and removed from every message."
          },
          "geolocation": {
            "title": "Location shared with pages",
            "type": "object",
            "description": "Optional. For pages that ask for your location (store finders, maps): {\"latitude\": 51.5072, \"longitude\": -0.1276}. The browser allows the request and reports this place. Pair it with Time zone and Locale for a local view."
          },
          "captureConsole": {
            "title": "Record console errors",
            "type": "boolean",
            "description": "Adds consoleErrors to each row: the page's console errors and warnings and any uncaught script errors while it loaded (up to 50 lines of 500 characters). Useful for site checks. Same price.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}