{
  "openapi": "3.0.1",
  "info": {
    "title": "Screenshot Saver",
    "description": "Capture screenshots of websites and save to cloud storage. Supports multiple URLs, full page capture, custom viewports, and various output destinations.",
    "version": "1.0",
    "x-build-id": "vzpsOZRpWyi4oRLr0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/codingfrontend~screenshot-saver/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-codingfrontend-screenshot-saver",
        "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/codingfrontend~screenshot-saver/runs": {
      "post": {
        "operationId": "runs-sync-codingfrontend-screenshot-saver",
        "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/codingfrontend~screenshot-saver/run-sync": {
      "post": {
        "operationId": "run-sync-codingfrontend-screenshot-saver",
        "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",
            "type": "array",
            "description": "List of URLs to capture screenshots of.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "format": {
            "title": "Output Format",
            "enum": [
              "png",
              "jpeg",
              "pdf"
            ],
            "type": "string",
            "description": "Screenshot format. PNG is lossless, JPEG is smaller, PDF renders the whole page as a document.",
            "default": "png"
          },
          "fullPage": {
            "title": "Full Page Screenshot",
            "type": "boolean",
            "description": "Capture the entire scrollable page height, not just the visible viewport.",
            "default": true
          },
          "windowWidth": {
            "title": "Viewport Width (px)",
            "minimum": 100,
            "maximum": 3840,
            "type": "integer",
            "description": "Browser window width in pixels. Use 375 for mobile, 768 for tablet, 1920 for desktop.",
            "default": 1920
          },
          "windowHeight": {
            "title": "Viewport Height (px)",
            "minimum": 100,
            "maximum": 2160,
            "type": "integer",
            "description": "Browser window height in pixels.",
            "default": 1080
          },
          "quality": {
            "title": "JPEG Quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "JPEG compression quality (1–100). Lower = smaller file size. Only applies when format is 'jpeg'.",
            "default": 80
          },
          "waitUntil": {
            "title": "Wait Until",
            "enum": [
              "domcontentloaded",
              "load",
              "networkidle0",
              "networkidle2"
            ],
            "type": "string",
            "description": "When to consider the page fully loaded before taking the screenshot.",
            "default": "networkidle2"
          },
          "waitForSelector": {
            "title": "Wait For Selector",
            "type": "string",
            "description": "CSS selector to wait for before taking the screenshot. Useful for dynamic pages. Example: '#main-content' or '.product-list'"
          },
          "waitForTimeout": {
            "title": "Extra Wait Time (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Additional time to wait (in milliseconds) after the page loads before taking the screenshot. Useful for animations or lazy-loading content.",
            "default": 0
          },
          "scrollToBottom": {
            "title": "Scroll To Bottom Before Screenshot",
            "type": "boolean",
            "description": "Slowly scroll to the bottom of the page before taking the screenshot, triggering lazy-loaded images and content.",
            "default": true
          },
          "clickSelector": {
            "title": "Click Element Before Screenshot",
            "type": "string",
            "description": "CSS selector of an element to click before taking the screenshot. Useful for closing cookie banners, opening menus, or dismissing popups. Example: '.cookie-accept', '#close-popup'"
          },
          "selectorsToHide": {
            "title": "Hide Elements (CSS selectors)",
            "type": "string",
            "description": "Comma-separated CSS selectors of elements to hide before taking the screenshot. Example: '.cookie-banner, .ads, .newsletter-popup'"
          },
          "injectCss": {
            "title": "Inject Custom CSS",
            "type": "string",
            "description": "Custom CSS to inject into the page before taking the screenshot. Example: 'body { background: white; } .banner { display: none; }'"
          },
          "injectJs": {
            "title": "Inject Custom JavaScript",
            "type": "string",
            "description": "Custom JavaScript to execute on the page before taking the screenshot. Example: 'document.querySelector(\".sidebar\").remove();'"
          },
          "captureSelector": {
            "title": "Capture Specific Element",
            "type": "string",
            "description": "CSS selector of a specific element to screenshot instead of the whole page. Example: '#product-card' or '.data-table'. Overrides fullPage setting."
          },
          "mobileEmulation": {
            "title": "Mobile Device Emulation",
            "enum": [
              "",
              "iPhone 15 Pro",
              "iPhone SE",
              "Pixel 7",
              "iPad Pro",
              "Galaxy S23",
              "Samsung Galaxy Tab S8"
            ],
            "type": "string",
            "description": "Emulate a specific mobile device. Overrides windowWidth/windowHeight settings.",
            "default": ""
          },
          "deviceScaleFactor": {
            "title": "Device Scale Factor (DPR)",
            "minimum": 1,
            "maximum": 4,
            "type": "number",
            "description": "Device pixel ratio for retina/HiDPI screenshots. Use 1 for standard, 2 for retina quality.",
            "default": 1
          },
          "blockResources": {
            "title": "Block Resource Types",
            "type": "array",
            "description": "Block specific resource types to speed up page loading. Useful for getting a text-only or CSS-only view.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "username": {
            "title": "HTTP Basic Auth — Username",
            "type": "string",
            "description": "Username for HTTP Basic Authentication (for password-protected pages)."
          },
          "password": {
            "title": "HTTP Basic Auth — Password",
            "type": "string",
            "description": "Password for HTTP Basic Authentication."
          },
          "cookies": {
            "title": "Custom Cookies",
            "type": "array",
            "description": "Array of cookies to set before navigating. Use to bypass cookie consent or inject session tokens. Example: [{\"name\": \"session\", \"value\": \"abc123\", \"domain\": \".example.com\"}]",
            "items": {
              "type": "object"
            }
          },
          "headers": {
            "title": "Custom HTTP Headers",
            "type": "object",
            "description": "Additional HTTP headers to send with every request. Example: {\"Authorization\": \"Bearer token123\", \"X-Custom\": \"value\"}"
          },
          "proxy": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. Use Apify Proxy for better success rates on protected sites.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}