{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API: Full Page, Mobile, PDF",
    "description": "Capture full-page screenshots or PDFs of up to 5,000 URLs per run: PNG, JPEG or WebP, desktop, tablet and mobile, one element only, dark mode. Cookie banners hidden, lazy images loaded, one file link per URL. Failed URLs are free.",
    "version": "0.1",
    "x-build-id": "d0ZL2Ba2MJWKf1taJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/magicfingers~website-screenshot-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-magicfingers-website-screenshot-api",
        "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/magicfingers~website-screenshot-api/runs": {
      "post": {
        "operationId": "runs-sync-magicfingers-website-screenshot-api",
        "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/magicfingers~website-screenshot-api/run-sync": {
      "post": {
        "operationId": "run-sync-magicfingers-website-screenshot-api",
        "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",
            "minItems": 1,
            "maxItems": 5000,
            "type": "array",
            "description": "Web pages to capture, one per line (1 to 5,000 URLs per run). A bare domain such as apify.com is read as https://apify.com. Only public http and https addresses are captured. Duplicates are skipped.",
            "items": {
              "type": "string"
            }
          },
          "format": {
            "title": "Format",
            "enum": [
              "png",
              "jpeg",
              "webp",
              "pdf"
            ],
            "type": "string",
            "description": "File format of each capture: PNG (lossless), JPEG or WebP (smaller files, see Quality) or PDF (the page printed to A4 with its backgrounds, up to 100 pages).",
            "default": "png"
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole page height instead of the visible viewport only. Captures are cut at 20,000 px of page height (less for very wide or high-density captures and for WebP; see the README) and marked truncated. Ignored when Element selector is set.",
            "default": true
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "desktop-hd",
              "tablet",
              "mobile"
            ],
            "type": "string",
            "description": "Viewport preset: desktop 1366 x 768, desktop-hd 1920 x 1080, tablet 820 x 1180 at 2x pixel density, mobile 390 x 844 at 2x pixel density (tablet and mobile also emulate touch and the mobile viewport).",
            "default": "desktop"
          },
          "viewportWidth": {
            "title": "Viewport width",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Custom viewport width that replaces the preset width (unit: CSS pixels, 320 to 3,840). Leave empty to use the device preset."
          },
          "viewportHeight": {
            "title": "Viewport height",
            "minimum": 320,
            "maximum": 4320,
            "type": "integer",
            "description": "Custom viewport height that replaces the preset height (unit: CSS pixels, 320 to 4,320). With Full page off, this is the height of the image."
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Ask the page for its dark colour scheme (prefers-color-scheme: dark). Pages without a dark theme look the same.",
            "default": false
          },
          "selector": {
            "title": "Element selector",
            "type": "string",
            "description": "Capture only the first element that matches this CSS selector, for example table.infobox or #pricing. When no element matches, the URL fails (not charged). Not available with PDF."
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners and chat widgets",
            "type": "boolean",
            "description": "Hide common cookie consent banners and chat widgets with CSS before the capture. Nothing is clicked: no consent is given or refused on your behalf.",
            "default": true
          },
          "hideSelectors": {
            "title": "Extra elements to hide",
            "maxItems": 50,
            "type": "array",
            "description": "More CSS selectors to hide before the capture, one per line, for example .newsletter-popup or #promo-bar (up to 50).",
            "items": {
              "type": "string"
            }
          },
          "scrollToLoad": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "Before a full-page, element or PDF capture, scroll down the page one screen at a time (up to 15 seconds and the height limit) so lazy-loaded images and sections appear, then scroll back to the top.",
            "default": true
          },
          "waitUntil": {
            "title": "Wait for",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "Page event to wait for before the capture: load (all images and scripts loaded, the default), domcontentloaded (the HTML is parsed, fastest) or networkidle (no network traffic for 0.5 s; waits at most 15 s more, then captures anyway).",
            "default": "load"
          },
          "delayMs": {
            "title": "Extra delay",
            "minimum": 0,
            "maximum": 15000,
            "type": "integer",
            "description": "Extra wait after the page event, before the capture, for animations and late content (unit: milliseconds, 0 to 15,000).",
            "default": 1000
          },
          "waitForSelector": {
            "title": "Wait for element",
            "type": "string",
            "description": "Wait until an element matching this CSS selector is visible before the capture. When it does not appear within the page timeout, the URL fails (not charged)."
          },
          "quality": {
            "title": "Quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Image quality for JPEG and WebP (1 to 100; WebP at 100 is lossless). Ignored for PNG and PDF.",
            "default": 85
          },
          "pageTimeoutSecs": {
            "title": "Page timeout",
            "minimum": 15,
            "maximum": 180,
            "type": "integer",
            "description": "Longest time for one attempt at one URL, from opening it to the stored file (unit: seconds, 15 to 180). Timeouts and network errors are tried 3 times in total.",
            "default": 60
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Most pages captured at the same time (1 to 10). The run also allows about one page per 600 MB of memory, so at the default 2,048 MB it captures up to 3 pages at a time.",
            "default": 3
          },
          "keyValueStoreName": {
            "title": "Named store",
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]*$",
            "maxLength": 63,
            "type": "string",
            "description": "Optional name of a key-value store that keeps the files after the run's retention period (letters, digits and hyphens, at most 63 characters). It is created when missing. The same URL with the same settings keeps the same key, so a scheduled run replaces the previous capture and its link stays the same. Empty: the run's own store, kept for the retention period of your plan."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional proxy for the pages, for example Apify Proxy with a country to see the page as visitors from that country do. No proxy is used by default."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}