{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API (Full Page, Mobile, PDF)",
    "description": "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, file size and the cookie banner it closed. Full page, one element, 11 device presets, dark mode. Failed pages free. $0.89 per 1,000 screenshots.",
    "version": "0.2",
    "x-build-id": "4ol3kw6G7ewGxQe9d"
  },
  "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",
              "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. 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
          },
          "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
          },
          "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."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}