{
  "openapi": "3.0.1",
  "info": {
    "title": "ScreenshotKit: Website Screenshot, Scrolling Video & PDF API",
    "description": "Screenshots, smooth scrolling videos (MP4/GIF) and PDFs of any website or HTML. Full page, element, retina, mobile, dark mode, proxies, cookie-banner removal. Batch or real-time API.",
    "version": "1.0",
    "x-build-id": "LIRh0sfA2Xq1fEPw0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ayushunleashed~screenshotkit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ayushunleashed-screenshotkit",
        "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/ayushunleashed~screenshotkit/runs": {
      "post": {
        "operationId": "runs-sync-ayushunleashed-screenshotkit",
        "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/ayushunleashed~screenshotkit/run-sync": {
      "post": {
        "operationId": "run-sync-ayushunleashed-screenshotkit",
        "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": "Website URLs",
            "type": "array",
            "description": "Pages to capture. https:// is added if missing (stripe.com works).",
            "items": {
              "type": "string"
            }
          },
          "html": {
            "title": "HTML to render",
            "type": "string",
            "description": "Optional: raw HTML to capture instead of (or in addition to) URLs. Handy for OG images and templates."
          },
          "action": {
            "title": "Output",
            "enum": [
              "screenshot",
              "video",
              "pdf"
            ],
            "type": "string",
            "description": "Screenshot image, auto-scrolling video, or PDF of the page.",
            "default": "screenshot"
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "laptop",
              "tablet",
              "phone",
              "custom"
            ],
            "type": "string",
            "description": "Viewport preset. Tablet and phone load the mobile version of sites.",
            "default": "desktop"
          },
          "width": {
            "title": "Custom width",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Viewport width. Used only when device is Custom."
          },
          "height": {
            "title": "Custom height",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Viewport height. Used only when device is Custom."
          },
          "device_scale_factor": {
            "title": "Pixel density (retina)",
            "minimum": 1,
            "maximum": 3,
            "type": "number",
            "description": "2 = retina (twice the pixels), 3 = high-end phones. Applies to screenshots.",
            "default": 1
          },
          "full_page": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the entire scrollable page instead of just the visible viewport.",
            "default": false
          },
          "selector": {
            "title": "Capture element",
            "type": "string",
            "description": "CSS selector of a single element to capture, e.g. #pricing or .hero. Overrides full page."
          },
          "clip": {
            "title": "Capture region",
            "type": "string",
            "description": "Capture a rectangle: \"x,y,width,height\" in CSS pixels, e.g. 0,0,1200,630."
          },
          "image_format": {
            "title": "Image format",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ],
            "type": "string",
            "description": "Screenshot file format.",
            "default": "png"
          },
          "image_quality": {
            "title": "Image quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Quality for JPEG/WebP (1-100). Ignored for PNG."
          },
          "video_duration": {
            "title": "Video duration",
            "minimum": 0.1,
            "maximum": 30,
            "type": "number",
            "description": "Exact length of the video. The page scrolls from top to bottom over this time.",
            "default": 10
          },
          "video_format": {
            "title": "Video format",
            "enum": [
              "mp4",
              "webm",
              "gif"
            ],
            "type": "string",
            "description": "MP4 plays everywhere; GIF is for embeds in docs and emails.",
            "default": "mp4"
          },
          "pdf_format": {
            "title": "PDF paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal"
            ],
            "type": "string",
            "description": "Paper size when Output is PDF. Backgrounds are included.",
            "default": "A4"
          },
          "hide_cookie_banners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Remove cookie and consent popups.",
            "default": true
          },
          "hide_chat_widgets": {
            "title": "Hide chat widgets",
            "type": "boolean",
            "description": "Remove Intercom, Drift, Crisp, HubSpot, Zendesk, Tawk and similar chat bubbles.",
            "default": true
          },
          "block_ads": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Drop requests to major ad networks and trackers.",
            "default": false
          },
          "hide_selectors": {
            "title": "Hide elements",
            "type": "array",
            "description": "CSS selectors of elements to remove before capturing, e.g. .promo-bar.",
            "items": {
              "type": "string"
            }
          },
          "custom_css": {
            "title": "Custom CSS",
            "type": "string",
            "description": "CSS injected into the page before capturing."
          },
          "custom_js": {
            "title": "Custom JavaScript",
            "type": "string",
            "description": "JavaScript run in the page before capturing (await is allowed)."
          },
          "click_selector": {
            "title": "Click element",
            "type": "string",
            "description": "CSS selector to click before capturing, e.g. a tab or \"Accept\" button."
          },
          "wait_until": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle",
              "time"
            ],
            "type": "string",
            "description": "When the page counts as ready.",
            "default": "load"
          },
          "wait_for_selector": {
            "title": "Wait for element",
            "type": "string",
            "description": "Wait until this CSS selector appears (up to 20s) before capturing."
          },
          "wait_time": {
            "title": "Extra wait time",
            "minimum": 0,
            "maximum": 60,
            "type": "number",
            "description": "Seconds to wait after the page loads. Required when Wait until is Fixed time."
          },
          "dark_mode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Ask the site for its dark theme (prefers-color-scheme: dark). Works on sites that support a system dark mode.",
            "default": false
          },
          "timezone": {
            "title": "Timezone",
            "type": "string",
            "description": "IANA timezone, e.g. America/New_York."
          },
          "locale": {
            "title": "Locale",
            "type": "string",
            "description": "Browser language, e.g. de-DE. Sites that localize will show this language."
          },
          "user_agent": {
            "title": "User agent",
            "type": "string",
            "description": "Override the browser user agent."
          },
          "headers": {
            "title": "HTTP headers",
            "type": "object",
            "description": "Extra headers for every request, e.g. {\"Authorization\": \"Bearer ...\"}."
          },
          "cookies": {
            "title": "Cookies",
            "type": "array",
            "description": "Cookies to set, e.g. [{\"name\": \"session\", \"value\": \"abc\"}] (domain defaults to the URL). Use this to capture logged-in pages."
          },
          "proxy": {
            "title": "Proxy",
            "enum": [
              "none",
              "datacenter",
              "residential"
            ],
            "type": "string",
            "description": "Residential proxies get through sites that block cloud servers (e.g. NYT, Reddit). Datacenter proxies only change the IP/country and are still blocked by those sites.",
            "default": "none"
          },
          "proxy_country": {
            "title": "Proxy country",
            "type": "string",
            "description": "Two-letter country code for the proxy IP, e.g. US, DE."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}